From sean at clipperadams.com Sun Aug 2 15:21:17 2015 From: sean at clipperadams.com (Sean P. DeNigris) Date: Sun Aug 2 15:23:31 2015 Subject: [squeak-dev] Google Code Shutdown Message-ID: <1438528877158-4840718.post@n4.nabble.com> Sean P. DeNigris wrote > In case anyone hasn't heard, Google Code will shut down entirely on > January 25, 2016. UPDATE: Impending Deadline: "Google Code will be turning read-only on August 25th" Already Moved: magritte-metamodel phratch seaside metacello Unknown: moose-technology marsonpharo nativeboost squeaksource3 ----- Cheers, Sean -- View this message in context: http://forum.world.st/Google-Code-Shutdown-tp4840718.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lewis at mail.msen.com Mon Aug 3 22:54:03 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Aug 3 22:54:11 2015 Subject: [squeak-dev] The squeaksource.com welcome page needs an update Message-ID: <20150803225403.GA64013@shell.msen.com> The squeaksource.com home page presents a warning that out of date. I would like to update that message with something more appropriate. The home page currently says this: Note: The creation of new projects has been disabled. If you would like to create a new project please consider moving to: http://ss3.gemstone.com/ or http://www.smalltalkhub.com/. And it might be better to say something like this: Note: If you would like to create a new project please consider using http://ss3.gemstone.com/. Rationale: New project creation is no longer disabled on squeaksource.com. The smalltalkhub.com site is still beta so I am not sure that it should be recommended. The ss3.gemstone.com seems to be solid and well supported. Does that sound right? Advice is welcome. Thanks, Dave From leves at elte.hu Mon Aug 3 23:13:32 2015 From: leves at elte.hu (Levente Uzonyi) Date: Mon Aug 3 23:13:36 2015 Subject: [squeak-dev] The squeaksource.com welcome page needs an update In-Reply-To: <20150803225403.GA64013@shell.msen.com> References: <20150803225403.GA64013@shell.msen.com> Message-ID: That sounds right to me. Levente On Mon, 3 Aug 2015, David T. Lewis wrote: > The squeaksource.com home page presents a warning that out of date. I > would like to update that message with something more appropriate. The > home page currently says this: > > Note: The creation of new projects has been disabled. If you would like > to create a new project please consider moving to: http://ss3.gemstone.com/ > or http://www.smalltalkhub.com/. > > And it might be better to say something like this: > > Note: If you would like to create a new project please consider using > http://ss3.gemstone.com/. > > Rationale: New project creation is no longer disabled on squeaksource.com. > The smalltalkhub.com site is still beta so I am not sure that it should > be recommended. The ss3.gemstone.com seems to be solid and well supported. > > Does that sound right? Advice is welcome. > > Thanks, > Dave > > From asqueaker at gmail.com Tue Aug 4 04:35:14 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Aug 4 04:35:16 2015 Subject: [squeak-dev] The squeaksource.com welcome page needs an update In-Reply-To: <20150803225403.GA64013@shell.msen.com> References: <20150803225403.GA64013@shell.msen.com> Message-ID: The first paragraph says, "Welcome to SqueakSource", why should the second paragraph recommend users to go elsewhere? I miss the clean, welcoming, original look of SqueakSource. Does anyone remember why those confusing messages were put there in the first place? PS -- we should ask Pharo if they prefer to have "and Pharo" removed too so it doesn't create confusion for their users if have moved on from Squeaksource. On Mon, Aug 3, 2015 at 5:54 PM, David T. Lewis wrote: > The squeaksource.com home page presents a warning that out of date. I > would like to update that message with something more appropriate. The > home page currently says this: > > Note: The creation of new projects has been disabled. If you would like > to create a new project please consider moving to: http://ss3.gemstone.com/ > or http://www.smalltalkhub.com/. > > And it might be better to say something like this: > > Note: If you would like to create a new project please consider using > http://ss3.gemstone.com/. > > Rationale: New project creation is no longer disabled on squeaksource.com. > The smalltalkhub.com site is still beta so I am not sure that it should > be recommended. The ss3.gemstone.com seems to be solid and well supported. > > Does that sound right? Advice is welcome. > > Thanks, > Dave > From asqueaker at gmail.com Tue Aug 4 04:45:01 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Aug 4 04:45:03 2015 Subject: [squeak-dev] The squeaksource.com welcome page needs an update In-Reply-To: <20150803225403.GA64013@shell.msen.com> References: <20150803225403.GA64013@shell.msen.com> Message-ID: Looks like the hosting message credit is out of date too.. On Mon, Aug 3, 2015 at 5:54 PM, David T. Lewis wrote: > The squeaksource.com home page presents a warning that out of date. I > would like to update that message with something more appropriate. The > home page currently says this: > > Note: The creation of new projects has been disabled. If you would like > to create a new project please consider moving to: http://ss3.gemstone.com/ > or http://www.smalltalkhub.com/. > > And it might be better to say something like this: > > Note: If you would like to create a new project please consider using > http://ss3.gemstone.com/. > > Rationale: New project creation is no longer disabled on squeaksource.com. > The smalltalkhub.com site is still beta so I am not sure that it should > be recommended. The ss3.gemstone.com seems to be solid and well supported. > > Does that sound right? Advice is welcome. > > Thanks, > Dave > From lewis at mail.msen.com Tue Aug 4 12:41:15 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Aug 4 12:41:29 2015 Subject: [squeak-dev] The squeaksource.com welcome page needs an update In-Reply-To: References: <20150803225403.GA64013@shell.msen.com> Message-ID: <20150804124115.GA90405@shell.msen.com> On Mon, Aug 03, 2015 at 11:35:14PM -0500, Chris Muller wrote: > The first paragraph says, "Welcome to SqueakSource", why should the > second paragraph recommend users to go elsewhere? > > I miss the clean, welcoming, original look of SqueakSource. Does > anyone remember why those confusing messages were put there in the > first place? At one time, there was an announced plan to shut down the service. The warning messages were added at that time. I'm happy either way, although I do think that some kind of message encouraging folks to consider other services is still appropriate. After all, we are not trying to attract a lot of new users to squeaksource.com, the emphasis is on maintaining the reliability and availibility of the existing service. > > PS -- we should ask Pharo if they prefer to have "and Pharo" removed > too so it doesn't create confusion for their users if have moved on > from Squeaksource. The squeaksource.com service is quite actively used by the Pharo community. Maybe we get get some input from the Pharo perspective (this message is cross posted to both lists). From my point of view, it seems good to say "for Squeak and Pharo" here. Dave > > On Mon, Aug 3, 2015 at 5:54 PM, David T. Lewis wrote: > > The squeaksource.com home page presents a warning that out of date. I > > would like to update that message with something more appropriate. The > > home page currently says this: > > > > Note: The creation of new projects has been disabled. If you would like > > to create a new project please consider moving to: http://ss3.gemstone.com/ > > or http://www.smalltalkhub.com/. > > > > And it might be better to say something like this: > > > > Note: If you would like to create a new project please consider using > > http://ss3.gemstone.com/. > > > > Rationale: New project creation is no longer disabled on squeaksource.com. > > The smalltalkhub.com site is still beta so I am not sure that it should > > be recommended. The ss3.gemstone.com seems to be solid and well supported. > > > > Does that sound right? Advice is welcome. > > > > Thanks, > > Dave > > From eliot.miranda at gmail.com Tue Aug 4 17:33:59 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Aug 4 17:34:02 2015 Subject: [squeak-dev] The squeaksource.com welcome page needs an update In-Reply-To: <20150803225403.GA64013@shell.msen.com> References: <20150803225403.GA64013@shell.msen.com> Message-ID: On Mon, Aug 3, 2015 at 3:54 PM, David T. Lewis wrote: > The squeaksource.com home page presents a warning that out of date. I > would like to update that message with something more appropriate. The > home page currently says this: > > Note: The creation of new projects has been disabled. If you would like > to create a new project please consider moving to: > http://ss3.gemstone.com/ > or http://www.smalltalkhub.com/. > > And it might be better to say something like this: > > Note: If you would like to create a new project please consider using > http://ss3.gemstone.com/. > > Rationale: New project creation is no longer disabled on squeaksource.com. > The smalltalkhub.com site is still beta so I am not sure that it should > be recommended. The ss3.gemstone.com seems to be solid and well supported. > > Does that sound right? Advice is welcome. > Looks sensible to me. But I'd really like that front page to explain who "We" is. Also, the code is the most important thing. Is there a backup of the packages? We need to make sure there is a reliable backup of all that code. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150804/53867137/attachment.htm From commits at source.squeak.org Wed Aug 5 13:48:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Aug 5 13:48:04 2015 Subject: [squeak-dev] The Inbox: VMMaker-bak.364.mcz Message-ID: A new version of VMMaker was added to project The Inbox: http://source.squeak.org/inbox/VMMaker-bak.364.mcz ==================== Summary ==================== Name: VMMaker-bak.364 Author: bak Time: 5 August 2015, 3:47:17.348 pm UUID: 06b91ee8-1ea3-4d7e-a3a4-da0ef88d6e3c Ancestors: VMMaker-bak.363 simulate SNAPSHOT primitive in RSqueak (requires SystemTracer2 to be installed) =============== Diff against VMMaker-bak.363 =============== Item was changed: ----- Method: SmalltalkImage>>simulatePrimitive:args: (in category '*VMMaker-Interpreter') ----- + simulatePrimitive: aPrimitive args: args + "simulate primitives in RSqueak" + "SNAPSHOT" + (aPrimitive = 97 or: [aPrimitive = 247]) + ifTrue: [ + Smalltalk at: #SystemTracer2 ifPresent: [:st | + |resuming| + Smalltalk processStartUpList: false. + [resuming := (st writeImage: Smalltalk imageName interactive: false) isStartingClone.] + on: FileExistsException + do: [ :e | e resume: (e fileClass forceNewFileNamed: e fileName)]. + Smalltalk processShutDownList: false. + ^resuming]]. + ^InterpreterProxy new primitiveFailFor: 255.! - simulatePrimitive: aPrimitive args: args - "simulate primitives in RSqueak" - "IMAGE_NAME" - aPrimitive = 121 - ifTrue: [^ self getSystemAttribute: 1]. - "SNAPSHOT" - aPrimitive = 97 - ifTrue: [Smalltalk - at: #SystemTracer2 - ifPresent: [:st | ^ st writeImage: Smalltalk imageName]]. - "SNAPSHOT_EMBEDDED" - aPrimitive = 247 - ifTrue: [Smalltalk - at: #SystemTracer2 - ifPresent: [:st | ^ st writeImage: Smalltalk imageName]]. - ^ InterpreterProxy new primitiveFailFor: 255 - ! From commits at source.squeak.org Wed Aug 5 21:41:32 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Aug 5 21:41:33 2015 Subject: [squeak-dev] The Inbox: Kernel-cmm.937.mcz Message-ID: A new version of Kernel was added to project The Inbox: http://source.squeak.org/inbox/Kernel-cmm.937.mcz ==================== Summary ==================== Name: Kernel-cmm.937 Author: cmm Time: 5 August 2015, 4:41:15.204 pm UUID: 874460df-769a-4381-8d3e-29c2e118b7f6 Ancestors: Kernel-cmm.936 Move CompiledMethod>>#hasBreakpoint back to Kernel where it belongs. =============== Diff against Kernel-cmm.936 =============== Item was changed: + ----- Method: CompiledMethod>>hasBreakpoint (in category '*kernel') ----- - ----- Method: CompiledMethod>>hasBreakpoint (in category 'testing') ----- hasBreakpoint + ^BreakpointManager methodHasBreakpoint: self! - ^false! From commits at source.squeak.org Wed Aug 5 21:47:08 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Aug 5 21:47:09 2015 Subject: [squeak-dev] The Inbox: System-cmm.756.mcz Message-ID: A new version of System was added to project The Inbox: http://source.squeak.org/inbox/System-cmm.756.mcz ==================== Summary ==================== Name: System-cmm.756 Author: cmm Time: 5 August 2015, 4:46:49.93 pm UUID: 5ec8c2f7-f93d-4162-81dc-306f5961725a Ancestors: System-cmm.755 Move CompiledMethod>>#hasBreakpoint back to Kernel where it belongs. =============== Diff against System-cmm.755 =============== Item was removed: - ----- Method: CompiledMethod>>hasBreakpoint (in category '*System-Tools-debugger support-override') ----- - hasBreakpoint - ^BreakpointManager methodHasBreakpoint: self! From Das.Linux at gmx.de Wed Aug 5 21:52:18 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Aug 5 21:52:22 2015 Subject: [squeak-dev] The Inbox: Kernel-cmm.937.mcz Message-ID: <5C63F9E0-9089-4FD4-AA85-1D7E9E1306A9@gmx.de> On 05.08.2015, at 21:41, commits@source.squeak.org wrote: > A new version of Kernel was added to project The Inbox: > http://source.squeak.org/inbox/Kernel-cmm.937.mcz > > ==================== Summary ==================== > > Name: Kernel-cmm.937 > Author: cmm > Time: 5 August 2015, 4:41:15.204 pm > UUID: 874460df-769a-4381-8d3e-29c2e118b7f6 > Ancestors: Kernel-cmm.936 > > Move CompiledMethod>>#hasBreakpoint back to Kernel where it belongs. Questionable, as BreakpointManager is (rightfully) not in Kernel? (apart from the private reply) what about hasBreakpoint ^ self class environment at: #BreakpointManager ifPresent: [:bpm | bpm methodHasBreakpoint: self] ifAbsent: [false] ? Best regards -Tobias From asqueaker at gmail.com Wed Aug 5 23:51:48 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Aug 5 23:51:51 2015 Subject: [squeak-dev] The Inbox: Kernel-cmm.937.mcz In-Reply-To: <5C63F9E0-9089-4FD4-AA85-1D7E9E1306A9@gmx.de> References: <5C63F9E0-9089-4FD4-AA85-1D7E9E1306A9@gmx.de> Message-ID: > Questionable, as BreakpointManager is (rightfully) not in Kernel? Oh right, I agree. > (apart from the private reply) what about > > hasBreakpoint > ^ self class environment > at: #BreakpointManager > ifPresent: [:bpm | bpm methodHasBreakpoint: self] > ifAbsent: [false] If #hasBreakpoint is not a performance-critical method, then I like the above. If it is performance-critical, then I think your other suggestion (in the other email) to put Object>>#hasBreakpoint ^false in Kernel with the current one in System would perform faster. We should wait until after the release to discuss the radical idea (scrapping BreakpointManager, etc.). - Chris From brasspen at gmail.com Thu Aug 6 00:06:06 2015 From: brasspen at gmail.com (Chris Cunnington) Date: Thu Aug 6 00:06:10 2015 Subject: [squeak-dev] Seaside 64-bit Message-ID: <970CAF93-8FA2-4836-ADB4-9794475D5474@gmail.com> This is a script to load Seaside2.8 into 64-bit Squeak (and will work on 32-bit as I just did on the 4.6 All-In-One). The Projects page has a Seaside3 Metacello script which I find incomplete as it includes no server, no subclass of the Seaside adaptor class and does not present the server control panel on the World or in the menu. Chris [1] Installer ss project: 'KomHttpServer'; install: 'KomServices-lr.21'; install: 'DynamicBindings-lr.1'; install: 'KomHttpServer-DwightManhertz.67'. (Installer ss3) project: 'SeasideLemon'; install: 'Seaside2'. WAKom start: 9666 From commits at source.squeak.org Thu Aug 6 01:06:43 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 6 01:06:45 2015 Subject: [squeak-dev] The Inbox: Kernel-cmm.937.mcz Message-ID: A new version of Kernel was added to project The Inbox: http://source.squeak.org/inbox/Kernel-cmm.937.mcz ==================== Summary ==================== Name: Kernel-cmm.937 Author: cmm Time: 5 August 2015, 8:06:28.072 pm UUID: 191e34d9-22d7-4e46-ac5d-cb3cd9baf203 Ancestors: Kernel-cmm.936 - #hasBreakpoint is now needed by Kernel, but must be able to operate independently of System's BreakpointManager. =============== Diff against Kernel-cmm.936 =============== Item was changed: + ----- Method: CompiledMethod>>hasBreakpoint (in category '*Kernel-tool support') ----- - ----- Method: CompiledMethod>>hasBreakpoint (in category 'testing') ----- hasBreakpoint + ^ self class environment + at: #BreakpointManager + ifPresent: [:bpm | bpm methodHasBreakpoint: self] + ifAbsent: [false]! - ^false! From commits at source.squeak.org Thu Aug 6 01:08:34 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 6 01:08:35 2015 Subject: [squeak-dev] The Inbox: System-cmm.756.mcz Message-ID: A new version of System was added to project The Inbox: http://source.squeak.org/inbox/System-cmm.756.mcz ==================== Summary ==================== Name: System-cmm.756 Author: cmm Time: 5 August 2015, 8:08:16.737 pm UUID: db631a26-1d20-4e39-966b-cb9b59755b7f Ancestors: System-cmm.755 CompiledMethod>>#hasBreakpoint was moved back to Kernel. =============== Diff against System-cmm.755 =============== Item was removed: - ----- Method: CompiledMethod>>hasBreakpoint (in category '*System-Tools-debugger support-override') ----- - hasBreakpoint - ^BreakpointManager methodHasBreakpoint: self! From asqueaker at gmail.com Thu Aug 6 01:19:44 2015 From: asqueaker at gmail.com (Chris Muller) Date: Thu Aug 6 01:19:47 2015 Subject: [squeak-dev] The Inbox: Kernel-cmm.937.mcz In-Reply-To: <55c2b32a.07868c0a.2f7fd.ffffced3SMTPIN_ADDED_MISSING@mx.google.com> References: <55c2b32a.07868c0a.2f7fd.ffffced3SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: This is Tobias' idea to soften the reference from Kernel. My plan is to move this to trunk and build the new image from the existing 15110 RC instead of the earlier alpha, so we don't have to generate a new SqueakV50.sources and changes. I've already got SqueakV50.sources all over the place. This time, there are no obstacles to running #prepareNewRelease for 5.0, so the version will be set properly. I'll have to revert my earlier change to condenseSources within that process, but we have to do a trunk commit anyway. Hopefully, this will result in a perfect image we can re-insert into the All-In-One and release by end of week. On Wed, Aug 5, 2015 at 8:06 PM, wrote: > A new version of Kernel was added to project The Inbox: > http://source.squeak.org/inbox/Kernel-cmm.937.mcz > > ==================== Summary ==================== > > Name: Kernel-cmm.937 > Author: cmm > Time: 5 August 2015, 8:06:28.072 pm > UUID: 191e34d9-22d7-4e46-ac5d-cb3cd9baf203 > Ancestors: Kernel-cmm.936 > > - #hasBreakpoint is now needed by Kernel, but must be able to operate independently of System's BreakpointManager. > > =============== Diff against Kernel-cmm.936 =============== > > Item was changed: > + ----- Method: CompiledMethod>>hasBreakpoint (in category '*Kernel-tool support') ----- > - ----- Method: CompiledMethod>>hasBreakpoint (in category 'testing') ----- > hasBreakpoint > + ^ self class environment > + at: #BreakpointManager > + ifPresent: [:bpm | bpm methodHasBreakpoint: self] > + ifAbsent: [false]! > - ^false! > > From lewis at mail.msen.com Thu Aug 6 04:02:35 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Aug 6 04:02:37 2015 Subject: [squeak-dev] Update stream transition Message-ID: <20150806040235.GA62405@shell.msen.com> I would like to confirm my understanding of what will happen in the trunk update stream as we make the transition to Spur image format in Squeak 5.0. We currently have the trunk update stream, which is governed by update maps called 'update' in the source.squeak.org/trunk repository. This update stream is applicable to Squeak images up to the initial release of the Squeak 4.6 image. These are images in the non-Spur image formats (6504 or 6505 for 32-bit images, and 68002 for a 64-bit image). During the development period leading up to Squeak 5.0, which uses the new Spur image (format number 6521 for the 32-bit Spur image), the update stream has been governed by update maps called 'update.spur' in source.squeak.org/trunk. For Squeak 5.0, the update stream will continue to be governed by update maps called 'update' in the source.squeak.org/trunk repository. Users of Squeak 5.0 will see a normal trunk update stream from that point forward, and will now be using the Spur image format. For Squeak 4.6, the update stream will continue to be called 'update', but will now be in the source.squeak.org/squeak46 repository. These update maps are not yet in the squeak46 repository, but will be added as required. The Squeak 4.6 release image points to this update stream. An effort will be made to keep the squeak46 update stream in sync with trunk through the next Squeak release cycle. For an existing trunk image, such as a Squeak 4.5 image that has been kept up to date with the trunk, it will be necessary to switch from source.squeak.org/trunk with update map name 'update', to a new setting of source.squeak.org/squeak46 with update map name 'update', This change must be made more or less concurrently with the Squeak 5.0 release. Questions: 1) Is the above summary correct? 2) Is it possible for the trunk update stream to force an existing trunk image (originating from Squeak 4.5 or earlier) to switch over to the squeak46 repository automatically, such that updates can proceed without loading Spur-specific changes into a non-Spur trunk image? 3) Previously, the release-specific repository (e.g. source.squeak.org/squeak45 for Squeak 4.5) was used for applying a few important fixes to a stable release. Assuming that this is also the intent for Squeak 4.6, and that we also want to make an effort to permit non-Spur images to stay in sync with trunk for some period of time (nominally one release cycle), then would it be helpful to consider providing a trunk-compatible update stream for non-Spur images during the transition period? I am not sure how that should work (possibly something involving an 'update.classic' update map), but I would like to know if conceptually it is something we should be trying to do. Thanks, Dave From asqueaker at gmail.com Thu Aug 6 14:47:46 2015 From: asqueaker at gmail.com (Chris Muller) Date: Thu Aug 6 14:47:49 2015 Subject: [squeak-dev] Update stream transition In-Reply-To: <20150806040235.GA62405@shell.msen.com> References: <20150806040235.GA62405@shell.msen.com> Message-ID: > We currently have the trunk update stream, which is governed by update maps > called 'update' in the source.squeak.org/trunk repository. This update > stream is applicable to Squeak images up to the initial release of the > Squeak 4.6 image. These are images in the non-Spur image formats (6504 > or 6505 for 32-bit images, and 68002 for a 64-bit image). The .spur branch has already been collapsed onto trunk. There is no way to advance a non-spur image except through commits to the release repositories (e.g., 'squea46'). > During the development period leading up to Squeak 5.0, which uses the > new Spur image (format number 6521 for the 32-bit Spur image), the > update stream has been governed by update maps called 'update.spur' in > source.squeak.org/trunk. > > For Squeak 5.0, the update stream will continue to be governed by update > maps called 'update' in the source.squeak.org/trunk repository. Users of > Squeak 5.0 will see a normal trunk update stream from that point forward, > and will now be using the Spur image format. Yes. > For Squeak 4.6, the update stream will continue to be called 'update', > but will now be in the source.squeak.org/squeak46 repository. These update > maps are not yet in the squeak46 repository, I just made the first one in 'squeak46'. > but will be added as required. > The Squeak 4.6 release image points to this update stream. An effort will > be made to keep the squeak46 update stream in sync with trunk through the > next Squeak release cycle. Oh really, who is going to do that? > For an existing trunk image, such as a Squeak 4.5 image that has been kept > up to date with the trunk, it will be necessary to switch from > source.squeak.org/trunk with update map name 'update', to a new setting > of source.squeak.org/squeak46 with update map name 'update', This change > must be made more or less concurrently with the Squeak 5.0 release. > > Questions: > > 1) Is the above summary correct? > > 2) Is it possible for the trunk update stream to force an existing trunk > image (originating from Squeak 4.5 or earlier) to switch over to the squeak46 > repository automatically, such that updates can proceed without loading > Spur-specific changes into a non-Spur trunk image? You would need to make sure not to update past update-topa.322.mcm. Probably the code is not set up to do a limited updated. No, you have to update the updateURL in Preferences. > 3) Previously, the release-specific repository (e.g. source.squeak.org/squeak45 > for Squeak 4.5) was used for applying a few important fixes to a stable > release. Assuming that this is also the intent for Squeak 4.6, and that we > also want to make an effort to permit non-Spur images to stay in sync with > trunk for some period of time (nominally one release cycle), then would it > be helpful to consider providing a trunk-compatible update stream for non-Spur > images during the transition period? I am not sure how that should work > (possibly something involving an 'update.classic' update map), but I would > like to know if conceptually it is something we should be trying to do. Basically you are talking about a fork of Squeak. Unless someone has some kind of compatibility issue with their application, I don't know why anyone would want to expend resources maintaining an old fork.. From commits at source.squeak.org Thu Aug 6 15:14:16 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 6 15:14:18 2015 Subject: [squeak-dev] The Trunk: Kernel-cmm.937.mcz Message-ID: Chris Muller uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-cmm.937.mcz ==================== Summary ==================== Name: Kernel-cmm.937 Author: cmm Time: 5 August 2015, 8:06:28.072 pm UUID: 191e34d9-22d7-4e46-ac5d-cb3cd9baf203 Ancestors: Kernel-cmm.936 - #hasBreakpoint is now needed by Kernel, but must be able to operate independently of System's BreakpointManager. =============== Diff against Kernel-cmm.936 =============== Item was changed: + ----- Method: CompiledMethod>>hasBreakpoint (in category '*Kernel-tool support') ----- - ----- Method: CompiledMethod>>hasBreakpoint (in category 'testing') ----- hasBreakpoint + ^ self class environment + at: #BreakpointManager + ifPresent: [:bpm | bpm methodHasBreakpoint: self] + ifAbsent: [false]! - ^false! From commits at source.squeak.org Thu Aug 6 15:14:44 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 6 15:14:46 2015 Subject: [squeak-dev] The Trunk: System-cmm.756.mcz Message-ID: Chris Muller uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-cmm.756.mcz ==================== Summary ==================== Name: System-cmm.756 Author: cmm Time: 5 August 2015, 8:08:16.737 pm UUID: db631a26-1d20-4e39-966b-cb9b59755b7f Ancestors: System-cmm.755 CompiledMethod>>#hasBreakpoint was moved back to Kernel. =============== Diff against System-cmm.755 =============== Item was removed: - ----- Method: CompiledMethod>>hasBreakpoint (in category '*System-Tools-debugger support-override') ----- - hasBreakpoint - ^BreakpointManager methodHasBreakpoint: self! From commits at source.squeak.org Thu Aug 6 15:22:20 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 6 15:22:21 2015 Subject: [squeak-dev] The Trunk: ReleaseBuilder-cmm.128.mcz Message-ID: Chris Muller uploaded a new version of ReleaseBuilder to project The Trunk: http://source.squeak.org/trunk/ReleaseBuilder-cmm.128.mcz ==================== Summary ==================== Name: ReleaseBuilder-cmm.128 Author: cmm Time: 6 August 2015, 10:22:09.19 am UUID: ebb20ee3-1ebb-4d49-aa9f-ecc993ade233 Ancestors: ReleaseBuilder-cmm.127 - Ensure a "FileList initialize" per request from Karl. - Ensure to flushAllCaches of Monticello for the release. - Reverse decision to #condenseSources as part of #prepareNewRelease, because we need to release a new 5.0 without a new SqueakV50.sources. - Certainly don't condenseSources in #prepareNextVersionAlpha either. - Set some preferences which were not explicitly set. =============== Diff against ReleaseBuilder-cmm.127 =============== Item was changed: ----- Method: ReleaseBuilder class>>prepareNewBuild: (in category 'scripts') ----- prepareNewBuild: anMCRepository "ReleaseBuilderTrunk prepareNewBuild" "Prepare everything that should be done for a new image build" MCMcmUpdater updateMissingPackages: true. MCMcmUpdater enableUpdatesForAllPackages. TTCFont registerAll. + FileList initialize. RealEstateAgent standardSize: 600 @ 400. SystemVersion newVersion: self versionString. SMLoaderPlus setDefaultFilters: (OrderedCollection with: #filterSafelyAvailable). " Preferences outOfTheBox." "<-- uncomment after #defaultValueTableForCurrentRelease is fixed up." self setDisplayExtent: 800 @ 600 ; switchToNewRepository: anMCRepository ; setPreferences ; "<-- remove this after defaultValueTableForCurrentRelease is fixed up." checkForDirtyPackages ; configureDesktop. Smalltalk cleanUp: true. + MCFileBasedRepository flushAllCaches. - "Let's be explicit about clearing passwords for the publicly-consumed build." - "clearPasswords is not very thorough, it should be improved." MCHttpRepository clearCredentials. Utilities setAuthorInitials: String empty. Environment allInstancesDo: [ : env | env purgeUndeclared ]. Undeclared removeUnreferencedKeys. Smalltalk garbageCollect. [ self loadWellKnownPackages "<-- 4.5 is not ready for unloaded / reloaded packages" ]. Compiler recompileAll. self setProjectBackground: Color darkGray ; openWelcomeWorkspaces! Item was changed: ----- Method: ReleaseBuilder class>>prepareNewRelease (in category 'scripts') ----- prepareNewRelease "This method is run at time of release to transfer the top trunk versions into my releaseRepository, and produce a release image." self transferCurrentPackagesAsUser: Utilities authorInitials password: (UIManager default requestPassword: 'Enter password for ' , self projectUrl). + self prepareNewBuild: self releaseRepository! - self prepareNewBuild: self releaseRepository. - Smalltalk condenseSources! Item was changed: ----- Method: ReleaseBuilder class>>prepareNextVersionAlpha (in category 'scripts') ----- prepareNextVersionAlpha "Prepare the first alpha image for next release." SystemVersion newVersion: ((UIManager default request: 'Please specify the name of the\new version of Squeak.' withCRs initialAnswer: SystemVersion current version) ifEmpty: [^ self inform: 'Aborted.']). MCFileBasedRepository flushAllCaches. MCHttpRepository clearCredentials. Utilities setAuthorInitials: String empty. + self switchToNewRepository: self buildRepository! - self switchToNewRepository: self buildRepository. - Smalltalk condenseSources! Item was changed: ----- Method: ReleaseBuilder class>>setPreferences (in category 'preferences') ----- setPreferences "Preferences class defaultValueTableForCurrentRelease" self setProjectBackground: Color darkGray. "General User interaction" Preferences + enable: #generalizedYellowButtonMenu ; + disable: #mouseOverForKeyboardFocus ; + enable: #swapMouseButtons. - enable: #swapMouseButtons; - disable: #mouseOverForKeyboardFocus. Morph indicateKeyboardFocus: true. + SearchBar useScratchPad: false. "Text input." TextEditor autoEnclose: true ; autoIndent: true ; destructiveBackWord: false ; blinkingCursor: true ; dumbbellCursor: false. Preferences insertionPointColor: Color red. PluggableTextMorph simpleFrameAdornments: false. "Windows" Preferences installUniformWindowColors. SystemWindow reuseWindows: false. Model windowActiveOnFirstClick: false. "Not good for 800x600" Preferences disable: #showSplitterHandles; enable: #fastDragWindowForMorphic. CornerGripMorph drawCornerResizeHandles: false. ProportionalSplitterMorph smartHorizontalSplitters: false ; smartVerticalSplitters: false. "Scroll bars." Preferences enable: #scrollBarsNarrow; enable: #scrollBarsOnRight; disable: #alwaysHideHScrollbar; disable: #alwaysShowHScrollbar; disable: #alwaysShowVScrollbar. ScrollBar scrollBarsWithoutArrowButtons: true; scrollBarsWithoutMenuButton: true. ScrollPane useRetractableScrollBars: false. "Rounded corners." Morph preferredCornerRadius: 6. Preferences disable: #roundedWindowCorners. PluggableButtonMorph roundedButtonCorners: false. FillInTheBlankMorph roundedDialogCorners: false. MenuMorph roundedMenuCorners: false. ScrollBar roundedScrollBarLook: false. "Gradients." Preferences disable: #gradientScrollBars. SystemWindow gradientWindow: false. MenuMorph gradientMenu: false. PluggableButtonMorph gradientButton: false. "Shadows" Preferences enable: #menuAppearance3d. MenuMorph menuBorderWidth: 1; menuBorderColor: Color lightGray; menuLineColor: Color lightGray. Morph useSoftDropShadow: true.. "Lists and Trees" PluggableListMorph filterableLists: true; clearFilterAutomatically: false; highlightHoveredRow: true; menuRequestUpdatesSelection: true. PluggableTreeMorph filterByLabelsOnly: false; maximumSearchDepth: 1. LazyListMorph listSelectionTextColor: Color black; listSelectionColor: (Color r: 0.72 g: 0.72 b: 0.9). "Standard Tools" BalloonMorph setBalloonColorTo: (TranslucentColor r: 0.92 g: 0.92 b: 0.706 alpha: 0.75). Workspace shouldStyle: false. Browser listClassesHierarchically: true; showClassIcons: true; showMessageIcons: true; sortMessageCategoriesAlphabetically: true. Preferences enable: #annotationPanes; enable: #optionalButtons; enable: #diffsWithPrettyPrint; enable: #traceMessages; enable: #alternativeBrowseIt; enable: #menuWithIcons; enable: #visualExplorer. SystemNavigation thoroughSenders: true. "Halo" Preferences enable: #showBoundsInHalo ; disable: #alternateHandlesLook. "System" NetNameResolver enableIPv6: false. Scanner allowUnderscoreAsAssignment: true; prefAllowUnderscoreSelectors: true. "that's all, folks"! From leves at elte.hu Thu Aug 6 16:29:05 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Aug 6 16:29:11 2015 Subject: [squeak-dev] The Trunk: Kernel-cmm.937.mcz In-Reply-To: References: Message-ID: I still think that we shouldn't use the Environments' Dictionary API in new code. IMHO #classNamed: is the right selector to use here: (self class environment classNamed: #BreakpointManager) ifNotNil: [ :breakPointManager | ^breakPointManager methodHasBreakpoint: self ]. ^false Levente On Thu, 6 Aug 2015, commits@source.squeak.org wrote: > Chris Muller uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-cmm.937.mcz > > ==================== Summary ==================== > > Name: Kernel-cmm.937 > Author: cmm > Time: 5 August 2015, 8:06:28.072 pm > UUID: 191e34d9-22d7-4e46-ac5d-cb3cd9baf203 > Ancestors: Kernel-cmm.936 > > - #hasBreakpoint is now needed by Kernel, but must be able to operate independently of System's BreakpointManager. > > =============== Diff against Kernel-cmm.936 =============== > > Item was changed: > + ----- Method: CompiledMethod>>hasBreakpoint (in category '*Kernel-tool support') ----- > - ----- Method: CompiledMethod>>hasBreakpoint (in category 'testing') ----- > hasBreakpoint > + ^ self class environment > + at: #BreakpointManager > + ifPresent: [:bpm | bpm methodHasBreakpoint: self] > + ifAbsent: [false]! > - ^false! > > > From Das.Linux at gmx.de Thu Aug 6 16:40:03 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Aug 6 16:40:08 2015 Subject: [squeak-dev] The Trunk: Kernel-cmm.937.mcz In-Reply-To: References: Message-ID: On 06.08.2015, at 18:29, Levente Uzonyi wrote: > I still think that we shouldn't use the Environments' Dictionary API in new code. IMHO #classNamed: is the right selector to use here: > > (self class environment classNamed: #BreakpointManager) ifNotNil: [ :breakPointManager | > ^breakPointManager methodHasBreakpoint: self ]. > ^false Then again, nil checks aren't nice code, either? Best regards -Tobias > > Levente > > On Thu, 6 Aug 2015, commits@source.squeak.org wrote: > >> Chris Muller uploaded a new version of Kernel to project The Trunk: >> http://source.squeak.org/trunk/Kernel-cmm.937.mcz >> >> ==================== Summary ==================== >> >> Name: Kernel-cmm.937 >> Author: cmm >> Time: 5 August 2015, 8:06:28.072 pm >> UUID: 191e34d9-22d7-4e46-ac5d-cb3cd9baf203 >> Ancestors: Kernel-cmm.936 >> >> - #hasBreakpoint is now needed by Kernel, but must be able to operate independently of System's BreakpointManager. >> >> =============== Diff against Kernel-cmm.936 =============== >> >> Item was changed: >> + ----- Method: CompiledMethod>>hasBreakpoint (in category '*Kernel-tool support') ----- >> - ----- Method: CompiledMethod>>hasBreakpoint (in category 'testing') ----- >> hasBreakpoint >> + ^ self class environment >> + at: #BreakpointManager >> + ifPresent: [:bpm | bpm methodHasBreakpoint: self] >> + ifAbsent: [false]! >> - ^false! From leves at elte.hu Thu Aug 6 17:13:24 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Aug 6 17:13:29 2015 Subject: [squeak-dev] The Trunk: Kernel-cmm.937.mcz In-Reply-To: References: Message-ID: On Thu, 6 Aug 2015, Tobias Pape wrote: > > On 06.08.2015, at 18:29, Levente Uzonyi wrote: > >> I still think that we shouldn't use the Environments' Dictionary API in new code. IMHO #classNamed: is the right selector to use here: >> >> (self class environment classNamed: #BreakpointManager) ifNotNil: [ :breakPointManager | >> ^breakPointManager methodHasBreakpoint: self ]. >> ^false > > Then again, nil checks aren't nice code, either? I don't see any problem with it, because this is how the API works (and was designed to work, so it's not just an accident). It returns nil when the requested class doesn't exist. Levente > > Best regards > -Tobias > >> >> Levente >> >> On Thu, 6 Aug 2015, commits@source.squeak.org wrote: >> >>> Chris Muller uploaded a new version of Kernel to project The Trunk: >>> http://source.squeak.org/trunk/Kernel-cmm.937.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Kernel-cmm.937 >>> Author: cmm >>> Time: 5 August 2015, 8:06:28.072 pm >>> UUID: 191e34d9-22d7-4e46-ac5d-cb3cd9baf203 >>> Ancestors: Kernel-cmm.936 >>> >>> - #hasBreakpoint is now needed by Kernel, but must be able to operate independently of System's BreakpointManager. >>> >>> =============== Diff against Kernel-cmm.936 =============== >>> >>> Item was changed: >>> + ----- Method: CompiledMethod>>hasBreakpoint (in category '*Kernel-tool support') ----- >>> - ----- Method: CompiledMethod>>hasBreakpoint (in category 'testing') ----- >>> hasBreakpoint >>> + ^ self class environment >>> + at: #BreakpointManager >>> + ifPresent: [:bpm | bpm methodHasBreakpoint: self] >>> + ifAbsent: [false]! >>> - ^false! > > > > From Das.Linux at gmx.de Thu Aug 6 17:42:29 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Aug 6 17:42:33 2015 Subject: [squeak-dev] The Trunk: Kernel-cmm.937.mcz In-Reply-To: References: Message-ID: On 06.08.2015, at 19:13, Levente Uzonyi wrote: > On Thu, 6 Aug 2015, Tobias Pape wrote: > >> >> On 06.08.2015, at 18:29, Levente Uzonyi wrote: >> >>> I still think that we shouldn't use the Environments' Dictionary API in new code. IMHO #classNamed: is the right selector to use here: >>> >>> (self class environment classNamed: #BreakpointManager) ifNotNil: [ :breakPointManager | >>> ^breakPointManager methodHasBreakpoint: self ]. >>> ^false >> >> Then again, nil checks aren't nice code, either? > > I don't see any problem with it, because this is how the API works (and was designed to work, so it's not just an accident). It returns nil when the requested class doesn't exist. > For me the conveyed meaning is: 'The class named #BreakpointManager is nil'. But then again, I don't really like nil-ful interfaces generally. But that's just my 2ct. I'd just say that the Dictionary interface on Environments it not worse that its nil-ful interface. Best -Tobias > Levente > >> >> Best regards >> -Tobias >> >>> >>> Levente >>> >>> On Thu, 6 Aug 2015, commits@source.squeak.org wrote: >>> >>>> Chris Muller uploaded a new version of Kernel to project The Trunk: >>>> http://source.squeak.org/trunk/Kernel-cmm.937.mcz >>>> >>>> ==================== Summary ==================== >>>> >>>> Name: Kernel-cmm.937 >>>> Author: cmm >>>> Time: 5 August 2015, 8:06:28.072 pm >>>> UUID: 191e34d9-22d7-4e46-ac5d-cb3cd9baf203 >>>> Ancestors: Kernel-cmm.936 >>>> >>>> - #hasBreakpoint is now needed by Kernel, but must be able to operate independently of System's BreakpointManager. >>>> >>>> =============== Diff against Kernel-cmm.936 =============== >>>> >>>> Item was changed: >>>> + ----- Method: CompiledMethod>>hasBreakpoint (in category '*Kernel-tool support') ----- >>>> - ----- Method: CompiledMethod>>hasBreakpoint (in category 'testing') ----- >>>> hasBreakpoint >>>> + ^ self class environment >>>> + at: #BreakpointManager >>>> + ifPresent: [:bpm | bpm methodHasBreakpoint: self] >>>> + ifAbsent: [false]! >>>> - ^false! From nicolas.cellier.aka.nice at gmail.com Thu Aug 6 20:24:31 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Aug 6 20:24:34 2015 Subject: [squeak-dev] Update stream transition In-Reply-To: References: <20150806040235.GA62405@shell.msen.com> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- "update to latest cog version but not spur..." | url repository updateList updater lastUpdateMap config | url := MCMcmUpdater defaultUpdateURL. repository := MCRepositoryGroup default repositories detect:[:r| r description = url] ifNone:[ | r | r := MCHttpRepository location: url user: '' password: ''. MCRepositoryGroup default addRepository: r. r]. updater := [MCMcmUpdater default] ifError: [MCMcmUpdater]. lastUpdateMap := [updater lastUpdateMap] ifError: [MCMcmUpdater classPool at: #LastUpdateMap]. updateList := updater updateListFor: repository. updateList := updateList select: [:e | e key < 323]. updateList := updater refreshUpdateMapFor: repository with: updateList. updateList do:[:assoc| ProgressNotification signal: '' extra: 'Processing ', assoc value. config := repository versionNamed: assoc value. updater updateFromConfig: config. lastUpdateMap at: repository description put: assoc key. ] displayingProgress: 'Processing configurations'. config ifNil: [^updater inform: 'Unable to retrieve updates from remote repository.' translated]. config setSystemVersion. updater inform: ('Update completed. Current update number: ' translated, SystemVersion current highestUpdate). From commits at source.squeak.org Thu Aug 6 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 6 21:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150806215502.3604.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-August/008835.html Name: Kernel-cmm.937 Ancestors: Kernel-cmm.936 - #hasBreakpoint is now needed by Kernel, but must be able to operate independently of System's BreakpointManager. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008836.html Name: System-cmm.756 Ancestors: System-cmm.755 CompiledMethod>>#hasBreakpoint was moved back to Kernel. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008837.html Name: ReleaseBuilder-cmm.128 Ancestors: ReleaseBuilder-cmm.127 - Ensure a "FileList initialize" per request from Karl. - Ensure to flushAllCaches of Monticello for the release. - Reverse decision to #condenseSources as part of #prepareNewRelease, because we need to release a new 5.0 without a new SqueakV50.sources. - Certainly don't condenseSources in #prepareNextVersionAlpha either. - Set some preferences which were not explicitly set. ============================================= From lists at fniephaus.com Thu Aug 6 23:29:58 2015 From: lists at fniephaus.com (Fabio Niephaus) Date: Thu Aug 6 23:30:13 2015 Subject: [squeak-dev] Seaside 64-bit In-Reply-To: <970CAF93-8FA2-4836-ADB4-9794475D5474@gmail.com> References: <970CAF93-8FA2-4836-ADB4-9794475D5474@gmail.com> Message-ID: Hi Chris, Thank you for your note. I have updated the quick install script on the Projects page accordingly: http://squeak.org/projects/#seaside Best regards, Fabio -- On Thu, Aug 6, 2015 at 1:06 AM Chris Cunnington wrote: > This is a script to load Seaside2.8 into 64-bit Squeak (and will work on > 32-bit as I just did on the 4.6 All-In-One). The Projects page has a > Seaside3 Metacello script which I find incomplete as it includes no server, > no subclass of the Seaside adaptor class and does not present the server > control panel on the World or in the menu. > > Chris > > > [1] > > > Installer ss > project: 'KomHttpServer'; > install: 'KomServices-lr.21'; > install: 'DynamicBindings-lr.1'; > install: 'KomHttpServer-DwightManhertz.67'. > > (Installer ss3) > project: 'SeasideLemon'; > install: 'Seaside2'. > > > WAKom start: 9666 > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150806/7942a1fd/attachment.htm From brasspen at gmail.com Fri Aug 7 01:01:40 2015 From: brasspen at gmail.com (Chris Cunnington) Date: Fri Aug 7 01:01:43 2015 Subject: [squeak-dev] Seaside 64-bit Message-ID: Hi Fabio, Not that I don?t think I?m a genius and everything, but are you sure that?s what you want to do? The quick load now installs Seaside2.8, which I think is great, but may not be what everybody wants. I?m guessing the conventional thinking would be that the first Seaside people encounter ought to be Seaside3. You may want to ask Tobias Pape (cc?d above) about this and about Seaside3 Metacello scripts. If he could add a server with an adaptor subclass to this Metacello script [1], that may be what you want. I?m not partial to Seaside3, but you may be, and the Seaside community may be, happier with their latest, best work, as opposed to my personal preferences. (Added to which I?m using Seaside2.8 in a quest to emulate some work by netstyle.ch related to systemd.) Chris [1] Installer squeaksource project: 'MetacelloRepository'; install: 'ConfigurationOfMetacello'. (Smalltalk at: #ConfigurationOfMetacello) perform: #load. Installer squeaksource project: 'MetacelloRepository'; install: 'ConfigurationOfSeaside3'. (Smalltalk at: #ConfigurationOfSeaside3) load. >Hi Chris, >Thank you for your note. >I have updated the quick install script on the Projects page accordingly: >http://squeak.org/projects/#seaside >Best regards, >Fabio >-- >On Thu, Aug 6, 2015 at 1:06 AM Chris Cunnington > wrote: > This is a script to load Seaside2.8 into 64-bit Squeak (and will work on > 32-bit as I just did on the 4.6 All-In-One). The Projects page has a > Seaside3 Metacello script which I find incomplete as it includes no server, > no subclass of the Seaside adaptor class and does not present the server > control panel on the World or in the menu. > > Chris > > > [1] > > > Installer ss > project: 'KomHttpServer'; > install: 'KomServices-lr.21'; > install: 'DynamicBindings-lr.1'; > install: 'KomHttpServer-DwightManhertz.67'. > > (Installer ss3) > project: 'SeasideLemon'; > install: 'Seaside2'. > > > WAKom start: 9666 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150806/88e048b6/attachment.htm From pdebruic at gmail.com Fri Aug 7 06:06:47 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Fri Aug 7 06:09:34 2015 Subject: [squeak-dev] Re: Seaside 64-bit In-Reply-To: References: <970CAF93-8FA2-4836-ADB4-9794475D5474@gmail.com> Message-ID: <1438927607879-4841408.post@n4.nabble.com> Seconding Chris, you should undo that change. Seaside 2.8 was released in 2007. It is unsupported. Fabio Niephaus-3 wrote > Hi Chris, > > Thank you for your note. > I have updated the quick install script on the Projects page accordingly: > http://squeak.org/projects/#seaside > > Best regards, > Fabio > > -- > > On Thu, Aug 6, 2015 at 1:06 AM Chris Cunnington < > brasspen@ > > wrote: > >> This is a script to load Seaside2.8 into 64-bit Squeak (and will work on >> 32-bit as I just did on the 4.6 All-In-One). The Projects page has a >> Seaside3 Metacello script which I find incomplete as it includes no >> server, >> no subclass of the Seaside adaptor class and does not present the server >> control panel on the World or in the menu. >> >> Chris >> >> >> [1] >> >> >> Installer ss >> project: 'KomHttpServer'; >> install: 'KomServices-lr.21'; >> install: 'DynamicBindings-lr.1'; >> install: 'KomHttpServer-DwightManhertz.67'. >> >> (Installer ss3) >> project: 'SeasideLemon'; >> install: 'Seaside2'. >> >> >> WAKom start: 9666 >> >> >> >> >> >> -- View this message in context: http://forum.world.st/Seaside-64-bit-tp4841183p4841408.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lists at fniephaus.com Fri Aug 7 08:11:38 2015 From: lists at fniephaus.com (Fabio Niephaus) Date: Fri Aug 7 08:11:50 2015 Subject: [squeak-dev] Re: Seaside 64-bit In-Reply-To: <1438927607879-4841408.post@n4.nabble.com> References: <970CAF93-8FA2-4836-ADB4-9794475D5474@gmail.com> <1438927607879-4841408.post@n4.nabble.com> Message-ID: Hi guys, Sorry about that. I seem to have acted a little prematurely here. I've just reverted the changes. Best, Fabio -- On Fri, Aug 7, 2015 at 7:09 AM Paul DeBruicker wrote: > Seconding Chris, you should undo that change. Seaside 2.8 was released in > 2007. It is unsupported. > > > > > > > Fabio Niephaus-3 wrote > > Hi Chris, > > > > Thank you for your note. > > I have updated the quick install script on the Projects page accordingly: > > http://squeak.org/projects/#seaside > > > > Best regards, > > Fabio > > > > -- > > > > On Thu, Aug 6, 2015 at 1:06 AM Chris Cunnington < > > > brasspen@ > > > > wrote: > > > >> This is a script to load Seaside2.8 into 64-bit Squeak (and will work on > >> 32-bit as I just did on the 4.6 All-In-One). The Projects page has a > >> Seaside3 Metacello script which I find incomplete as it includes no > >> server, > >> no subclass of the Seaside adaptor class and does not present the server > >> control panel on the World or in the menu. > >> > >> Chris > >> > >> > >> [1] > >> > >> > >> Installer ss > >> project: 'KomHttpServer'; > >> install: 'KomServices-lr.21'; > >> install: 'DynamicBindings-lr.1'; > >> install: 'KomHttpServer-DwightManhertz.67'. > >> > >> (Installer ss3) > >> project: 'SeasideLemon'; > >> install: 'Seaside2'. > >> > >> > >> WAKom start: 9666 > >> > >> > >> > >> > >> > >> > > > > > > -- > View this message in context: > http://forum.world.st/Seaside-64-bit-tp4841183p4841408.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/20150807/46b3dd8e/attachment.htm From sean at clipperadams.com Fri Aug 7 13:03:54 2015 From: sean at clipperadams.com (Sean P. DeNigris) Date: Fri Aug 7 13:06:42 2015 Subject: [squeak-dev] Re: [ANN] The Squeak Website In-Reply-To: <8EB28068-6FBD-4E7B-8819-3B559B8A2EDA@gmx.de> References: <8EB28068-6FBD-4E7B-8819-3B559B8A2EDA@gmx.de> Message-ID: <1438952634192-4841470.post@n4.nabble.com> The new site looks great! Kudos :) ----- Cheers, Sean -- View this message in context: http://forum.world.st/ANN-The-Squeak-Website-tp4834587p4841470.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From kilon.alios at gmail.com Fri Aug 7 13:51:15 2015 From: kilon.alios at gmail.com (Dimitris Chloupis) Date: Fri Aug 7 13:51:28 2015 Subject: [squeak-dev] Re: [ANN] The Squeak Website In-Reply-To: <1438952634192-4841470.post@n4.nabble.com> References: <8EB28068-6FBD-4E7B-8819-3B559B8A2EDA@gmx.de> <1438952634192-4841470.post@n4.nabble.com> Message-ID: yeap I have to agree, much , much better, well done ! On Fri, Aug 7, 2015 at 4:06 PM Sean P. DeNigris wrote: > The new site looks great! Kudos :) > > > > ----- > Cheers, > Sean > -- > View this message in context: > http://forum.world.st/ANN-The-Squeak-Website-tp4834587p4841470.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/20150807/f1cd3663/attachment.htm From brasspen at gmail.com Fri Aug 7 14:15:59 2015 From: brasspen at gmail.com (Chris Cunnington) Date: Fri Aug 7 14:16:03 2015 Subject: [squeak-dev] Seaside 64-bit Message-ID: Looking for something else, I found a solution in Menu>>Extending The System. I offer it as a suggestion. It takes a long time to load. At the end, the first thing you see is the Seaside Control Panel, which was what I was hoping to see initially. Chris "Seaside 3.0 http://www.seaside.st" (Installer ss project: 'MetacelloRepository') install: 'ConfigurationOfSeaside30'. (Smalltalk at: #ConfigurationOfSeaside30) load. (Smalltalk at: #WAPharoServerAdaptorBrowser) open. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150807/f517dd6a/attachment.htm From Das.Linux at gmx.de Fri Aug 7 14:27:15 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Aug 7 14:27:19 2015 Subject: [squeak-dev] Seaside 64-bit In-Reply-To: References: Message-ID: On 07.08.2015, at 16:15, Chris Cunnington wrote: > Looking for something else, I found a solution in Menu>>Extending The System. I offer it as a suggestion. It takes a long time to load. At the end, the first thing you see is the Seaside Control Panel, which was what I was hoping to see initially. > > Chris > > > "Seaside 3.0 http://www.seaside.st" > (Installer ss project: 'MetacelloRepository') install: 'ConfigurationOfSeaside30'. > (Smalltalk at: #ConfigurationOfSeaside30) load. > (Smalltalk at: #WAPharoServerAdaptorBrowser) open. That's actually the same thing that's currently on there, except for the SCP. Best -Tobias From brasspen at gmail.com Fri Aug 7 15:14:52 2015 From: brasspen at gmail.com (Chris Cunnington) Date: Fri Aug 7 15:14:54 2015 Subject: [squeak-dev] Seaside 64-bit Message-ID: Hi Tobias, It's none of my business what is or is not on squeak.org. But you're statement is kind of confusing to me, so for the sake of my own clarity of mind, I've deduced the following. Here are the two side by side: "squeak.org/projects page" Installer squeaksource project: 'MetacelloRepository'; install: 'ConfigurationOfSeaside3'. (Smalltalk at: #ConfigurationOfSeaside3) load. "Menu>>Extending The System" (Installer ss project: 'MetacelloRepository') install: 'ConfigurationOfSeaside30'. (Smalltalk at: #ConfigurationOfSeaside30) load. (Smalltalk at: #WAPharoServerAdaptorBrowser) open. You will notice that in MetacelloRepository there is both ConfigurationOfSeaside30 and ConfigurationOfSeaside3. The former has its last entry on 10 Sept. 2013. The later has its first entry at 25 Sept. 2013. It's first entry message from Esteban Lorenzano is instructive: "- 3.1 was not loading any adaptor. Added Seaside-Adaptor (not tested outside Pharo)" It looks to me like ConfigurationOfSeaside3 is better suited for Pharo and ConfigurationOfSeaside30 is better suited to Squeak. This is supported by the inclusion of ConfigurationOfSeaside30 in Menu>>ExtendingTheSystem which is already proven to work. FWIW, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150807/e131cd29/attachment.htm From casimiro.barreto at gmail.com Fri Aug 7 15:27:35 2015 From: casimiro.barreto at gmail.com (Casimiro - GMAIL) Date: Fri Aug 7 15:27:55 2015 Subject: [squeak-dev] No more updates at sources.squeak.org/trunk ??? Message-ID: <55C4CE67.3060200@gmail.com> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150807/14e82580/signature.pgp From asqueaker at gmail.com Fri Aug 7 15:47:38 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Aug 7 15:47:41 2015 Subject: [squeak-dev] No more updates at sources.squeak.org/trunk ??? In-Reply-To: <55C4CE67.3060200@gmail.com> References: <55C4CE67.3060200@gmail.com> Message-ID: Hi Casimiro, the current update number of the 5.0 image is 15113. What is the update number of your Spur image? There have not been any new packages in trunk for a couple of months while we are working through the release process. Thankfully, we are just 1 meter away from the finish line, as soon as Craig can sign the latest 5.0-All-in-One we will be able to announce and re-open trunk for further development. On Fri, Aug 7, 2015 at 10:27 AM, Casimiro - GMAIL wrote: > For some time I've been unable to update from trunk. Currently running spur > cog (32bit) and spur image that was up to date until last july... Repository > moved somewhere else? > > -- > The information contained in this message is confidential and intended to > the recipients specified in the headers. If you received this message by > error, notify the sender immediately. The unauthorized use, disclosure, copy > or alteration of this message are strictly forbidden and subjected to civil > and criminal sanctions. > > == > > This email may be signed using PGP key ID: 0x4134A417 > > > From casimiro.barreto at gmail.com Fri Aug 7 15:53:20 2015 From: casimiro.barreto at gmail.com (Casimiro - GMAIL) Date: Fri Aug 7 15:53:35 2015 Subject: [squeak-dev] No more updates at sources.squeak.org/trunk ??? In-Reply-To: References: <55C4CE67.3060200@gmail.com> Message-ID: <55C4D470.60509@gmail.com> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150807/32fd2c17/signature.pgp From stephan at stack.nl Sat Aug 8 05:58:01 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Sat Aug 8 05:58:10 2015 Subject: [squeak-dev] Re: Seaside 64-bit In-Reply-To: References: Message-ID: On 07/08/15 17:14, Chris Cunnington wrote: > It looks to me like ConfigurationOfSeaside3 is better suited for Pharo > and ConfigurationOfSeaside30 is better suited to Squeak. This is > supported by the inclusion of ConfigurationOfSeaside30 in > Menu>>ExtendingTheSystem which is already proven to work. That is a bad idea as ConfigurationOfSeaside3 gets the updates and bugfixes. They are not automatically backported to ConfigurationOfSeaside30 Stephan From tapplek at gmail.com Sat Aug 8 13:24:57 2015 From: tapplek at gmail.com (Tapple Gao) Date: Sat Aug 8 13:25:01 2015 Subject: [squeak-dev] Image cannot grow beyond 500Mb Message-ID: <75D14F4D-210D-4945-8738-F4D5E317C581@gmail.com> I am trying to use Moose to do run graph algorithms on data with about 300,000 nodes. This data is map data downloaded from OpenStreetMap, and I am trying to analyze it with the Moose-Analysis-Graphs package. However, it seems completely unable to handle this, partially due to unoptimized algorithms, but mostly due to memory limits of the VM or image itself. I am using the vm and image of the moose one-click image for mac: http://www.moosetechnology.org/#install . I believe this is a pharo vm and image, I don?t know if pharo and squeak are still different these days, or if it matters. Been out of squeak for a few years This platform is seemingly unable to use more than about 500Mb of memory. I watch it in mac?s activity monitor. Once it reaches about 450Mb as measured by activity monitor, it is spending nearly all it?s time in the garbage collector, (as measured by activity monitor?s Sample Process tool). The most I?ve seen it eventually reach is 556Mb, after about an hour, then it does a hard VM crash (Pharo has quit unexpectedly). Is there a way to remedy this? I tried running the image in 4 alternative VM?s: - The latest pharo mac vm from http://files.pharo.org/vm/pharo/mac/ . Same issue as above. likely the same vm - Cocoa Cog vm from http://squeakvm.org/mac/ : crashed at startup. could not load image - Cocoa Stack vm from http://squeakvm.org/mac/ : crashed at startup; could not load image - Carbon Stack vm from http://squeakvm.org/mac/ : refused to start Is it possible to allocate more than 500Mb of memory to squeak? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150808/d3f28908/attachment.htm From A.Wacknitz at gmx.de Sat Aug 8 16:21:55 2015 From: A.Wacknitz at gmx.de (Andreas Wacknitz) Date: Sat Aug 8 16:21:59 2015 Subject: [squeak-dev] Image cannot grow beyond 500Mb In-Reply-To: <75D14F4D-210D-4945-8738-F4D5E317C581@gmail.com> References: <75D14F4D-210D-4945-8738-F4D5E317C581@gmail.com> Message-ID: <55C62CA3.7010504@gmx.de> Am 08.08.15 um 15:24 schrieb Tapple Gao: > I am trying to use Moose to do run graph algorithms on data with about > 300,000 nodes. This data is map data downloaded from OpenStreetMap, > and I am trying to analyze it with the Moose-Analysis-Graphs package. > However, it seems completely unable to handle this, partially due to > unoptimized algorithms, but mostly due to memory limits of the VM or > image itself. > > I am using the vm and image of the moose one-click image for mac: > http://www.moosetechnology.org/#install . I believe this is a pharo vm > and image, I don?t know if pharo and squeak are still different these > days, or if it matters. Been out of squeak for a few years > > This platform is seemingly unable to use more than about 500Mb of > memory. I watch it in mac?s activity monitor. Once it reaches about > 450Mb as measured by activity monitor, it is spending nearly all it?s > time in the garbage collector, (as measured by activity monitor?s > Sample Process tool). The most I?ve seen it eventually reach is 556Mb, > after about an hour, then it does a hard VM crash (Pharo has quit > unexpectedly). > > Is there a way to remedy this? I tried running the image in 4 > alternative VM?s: > - The latest pharo mac vm from http://files.pharo.org/vm/pharo/mac/ . > Same issue as above. likely the same vm > - Cocoa Cog vm from http://squeakvm.org/mac/ : crashed at startup. > could not load image > - Cocoa Stack vm from http://squeakvm.org/mac/ : crashed at startup; > could not load image > - Carbon Stack vm from http://squeakvm.org/mac/ : refused to start > > Is it possible to allocate more than 500Mb of memory to squeak? > > The Pharo.app has an info.plist file where you can change the value of SqueakMaxHeapSize. The default value is 516MB. I don't know what the maximum allowed number is. As the Pharo VM is 32 Bit I expect that you cannot increase it beyond ~3GB. In order to break this memory barrier you will have to wait for a 64 Bit VM (look for Spur development) later this year. Regards Andreas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150808/388fbe75/attachment.htm From tapplek at gmail.com Sat Aug 8 18:26:01 2015 From: tapplek at gmail.com (Tapple Gao) Date: Sat Aug 8 18:26:05 2015 Subject: [squeak-dev] Image cannot grow beyond 500Mb In-Reply-To: <55C62CA3.7010504@gmx.de> References: <75D14F4D-210D-4945-8738-F4D5E317C581@gmail.com> <55C62CA3.7010504@gmx.de> Message-ID: <78716641-5C76-49F4-91E3-7322C55D60CA@gmail.com> > On Aug 8, 2015, at 12:21 PM, Andreas Wacknitz wrote: > > Am 08.08.15 um 15:24 schrieb Tapple Gao: >> I am trying to use Moose to do run graph algorithms on data with about 300,000 nodes. This data is map data downloaded from OpenStreetMap, and I am trying to analyze it with the Moose-Analysis-Graphs package. However, it seems completely unable to handle this, partially due to unoptimized algorithms, but mostly due to memory limits of the VM or image itself. >> >> Is it possible to allocate more than 500Mb of memory to squeak? >> >> > The Pharo.app has an info.plist file where you can change the value of SqueakMaxHeapSize. > The default value is 516MB. > I don't know what the maximum allowed number is. As the Pharo VM is 32 Bit I expect that you > cannot increase it beyond ~3GB. > In order to break this memory barrier you will have to wait for a 64 Bit VM (look for Spur development) > later this year. > > Regards > Andreas > Thank you andreas,. That worked -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150808/db3f3f45/attachment-0001.htm From eliot.miranda at gmail.com Sun Aug 9 07:10:18 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun Aug 9 07:10:25 2015 Subject: [squeak-dev] The Trunk: Kernel-cmm.937.mcz In-Reply-To: References: Message-ID: <9143AC49-FC09-48CE-8DFD-C2D07ADF857C@gmail.com> Hi All, Sent from my iPhone > On Aug 6, 2015, at 10:42 AM, Tobias Pape wrote: > > >> On 06.08.2015, at 19:13, Levente Uzonyi wrote: >> >>> On Thu, 6 Aug 2015, Tobias Pape wrote: >>> >>> >>>> On 06.08.2015, at 18:29, Levente Uzonyi wrote: >>>> >>>> I still think that we shouldn't use the Environments' Dictionary API in new code. IMHO #classNamed: is the right selector to use here: >>>> >>>> (self class environment classNamed: #BreakpointManager) ifNotNil: [ :breakPointManager | >>>> ^breakPointManager methodHasBreakpoint: self ]. >>>> ^false >>> >>> Then again, nil checks aren't nice code, either? >> >> I don't see any problem with it, because this is how the API works (and was designed to work, so it's not just an accident). It returns nil when the requested class doesn't exist. >> > > For me the conveyed meaning is: 'The class named #BreakpointManager is nil'. > But then again, I don't really like nil-ful interfaces generally. But that's just my 2ct. > > I'd just say that the Dictionary interface on Environments it not worse that its nil-ful > interface. > > Best > -Tobias > >> Levente >> >>> >>> Best regards >>> -Tobias >>> >>>> >>>> Levente >>>> >>>>> On Thu, 6 Aug 2015, commits@source.squeak.org wrote: >>>>> >>>>> Chris Muller uploaded a new version of Kernel to project The Trunk: >>>>> http://source.squeak.org/trunk/Kernel-cmm.937.mcz >>>>> >>>>> ==================== Summary ==================== >>>>> >>>>> Name: Kernel-cmm.937 >>>>> Author: cmm >>>>> Time: 5 August 2015, 8:06:28.072 pm >>>>> UUID: 191e34d9-22d7-4e46-ac5d-cb3cd9baf203 >>>>> Ancestors: Kernel-cmm.936 >>>>> >>>>> - #hasBreakpoint is now needed by Kernel, but must be able to operate independently of System's BreakpointManager. Why is BreakpointManager needed by Kernel? I went to some effort to make the reference to BreakpointManager an override in System and Kernel's version of hasBreakpoint as ^false. Isn't this better than that horrible self class environment at: #BreakpointManager screed? >>>>> >>>>> =============== Diff against Kernel-cmm.936 =============== >>>>> >>>>> Item was changed: >>>>> + ----- Method: CompiledMethod>>hasBreakpoint (in category '*Kernel-tool support') ----- >>>>> - ----- Method: CompiledMethod>>hasBreakpoint (in category 'testing') ----- >>>>> hasBreakpoint >>>>> + ^ self class environment >>>>> + at: #BreakpointManager >>>>> + ifPresent: [:bpm | bpm methodHasBreakpoint: self] >>>>> + ifAbsent: [false]! >>>>> - ^false! > > > From nicolaihess at web.de Sun Aug 9 16:59:17 2015 From: nicolaihess at web.de (Nicolai Hess) Date: Sun Aug 9 16:59:21 2015 Subject: [squeak-dev] Re: [Vm-dev] Re: pharo 4.0 Crashed in the VM thread again In-Reply-To: <5ABFAF9B-EB0E-4A97-BD51-5245BA0E3ED0@rowledge.org> References: <65585DAA-A9B3-478B-A72A-8FDAF970A9BD@gmail.com> <1437310782635-4838173.post@n4.nabble.com> <55AD626F.3000106@stack.nl> <5ABFAF9B-EB0E-4A97-BD51-5245BA0E3ED0@rowledge.org> Message-ID: Pharo or Squeak ? In squeak, this stackframe / large stackframe bug was introduced some months ago by a change for the compiler but it is already fixed. In pharo, we have a simliar bug (in pharos compiler (opal), not related to the change on the squeak compiler). This is a bug that is known but not yet fixed 13854 frameSize calculated wrongly for #lineSegmentsDo: ! 2015-08-09 18:39 GMT+02:00 tim Rowledge : > > Sabine, > As a general rule of thumb, if a method is too long to see at a glance - > in practice this means too long to fit on your screen - then it almost > certainly needs splitting up. I have been forcibly reminded of this a lot > recently due to having to decode insanely long Python routines; seriously - > 1100 lines for a single function? > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: FSRA: Forms Skip and Run-Away > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150809/47bdc6d6/attachment.htm From lewis at mail.msen.com Mon Aug 10 23:10:55 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Aug 10 23:11:01 2015 Subject: [squeak-dev] Update stream transition In-Reply-To: References: <20150806040235.GA62405@shell.msen.com> Message-ID: <20150810231055.GA69046@shell.msen.com> On Thu, Aug 06, 2015 at 09:47:46AM -0500, Chris Muller wrote: > > We currently have the trunk update stream, which is governed by update maps > > called 'update' in the source.squeak.org/trunk repository. This update > > stream is applicable to Squeak images up to the initial release of the > > Squeak 4.6 image. These are images in the non-Spur image formats (6504 > > or 6505 for 32-bit images, and 68002 for a 64-bit image). > > The .spur branch has already been collapsed onto trunk. There is no > way to advance a non-spur image except through commits to the release > repositories (e.g., 'squea46'). > > > During the development period leading up to Squeak 5.0, which uses the > > new Spur image (format number 6521 for the 32-bit Spur image), the > > update stream has been governed by update maps called 'update.spur' in > > source.squeak.org/trunk. > > > > For Squeak 5.0, the update stream will continue to be governed by update > > maps called 'update' in the source.squeak.org/trunk repository. Users of > > Squeak 5.0 will see a normal trunk update stream from that point forward, > > and will now be using the Spur image format. > > Yes. > > > For Squeak 4.6, the update stream will continue to be called 'update', > > but will now be in the source.squeak.org/squeak46 repository. These update > > maps are not yet in the squeak46 repository, > > I just made the first one in 'squeak46'. > > > but will be added as required. > > The Squeak 4.6 release image points to this update stream. An effort will > > be made to keep the squeak46 update stream in sync with trunk through the > > next Squeak release cycle. > > Oh really, who is going to do that? > I fully understand that nothing gets done unless someone actually puts in the effort to do it. Within reasonable limits, this is something that I am willing to work on through the course of the next release cycle. I am expecting that this means 6 to 12 months, depending on how long it takes to go through another release cycle. My assumptions were, and still are, as follows: 1) We are moving the main trunk development to the new Spur image format for Squeak 5.0. This is not a reversible change. Some things may break, but we are going to make it work and we are going to make it successful. 2) We will attempt to do this during a transition period of one release cycle (whatever that might turn out to be). This allows us to learn during the transition period, and to work out any unanticipated problems. During that time period, we will make an effort to keep the classic image format (Squeak 4.6) healthy. My own assumption is that this should include a working update stream. 3) We will not rely on Eliot to do all the work. Once we get to Squeak 5.0 with Spur, other people (such as me) need to step forward if any backward compatibility with non-Spur images is going to be maintained. If nobody does it, then it will not get done. Hopefully these are reasonable objectives, and from my point of view I will be happy to put some time and effort into objective #3 in the coming months. Having said that, I do not actually know *how* to maintain an update stream for 4.6 to track the main trunk 5.0 stream. Dave > > For an existing trunk image, such as a Squeak 4.5 image that has been kept > > up to date with the trunk, it will be necessary to switch from > > source.squeak.org/trunk with update map name 'update', to a new setting > > of source.squeak.org/squeak46 with update map name 'update', This change > > must be made more or less concurrently with the Squeak 5.0 release. > > > > Questions: > > > > 1) Is the above summary correct? > > > > 2) Is it possible for the trunk update stream to force an existing trunk > > image (originating from Squeak 4.5 or earlier) to switch over to the squeak46 > > repository automatically, such that updates can proceed without loading > > Spur-specific changes into a non-Spur trunk image? > > You would need to make sure not to update past update-topa.322.mcm. > Probably the code is not set up to do a limited updated. > > No, you have to update the updateURL in Preferences. > > > 3) Previously, the release-specific repository (e.g. source.squeak.org/squeak45 > > for Squeak 4.5) was used for applying a few important fixes to a stable > > release. Assuming that this is also the intent for Squeak 4.6, and that we > > also want to make an effort to permit non-Spur images to stay in sync with > > trunk for some period of time (nominally one release cycle), then would it > > be helpful to consider providing a trunk-compatible update stream for non-Spur > > images during the transition period? I am not sure how that should work > > (possibly something involving an 'update.classic' update map), but I would > > like to know if conceptually it is something we should be trying to do. > > Basically you are talking about a fork of Squeak. Unless someone has > some kind of compatibility issue with their application, I don't know > why anyone would want to expend resources maintaining an old fork.. From btc at openinworld.com Tue Aug 11 15:33:44 2015 From: btc at openinworld.com (Ben Coman) Date: Tue Aug 11 15:34:10 2015 Subject: [squeak-dev] googlecode pre-shutdown cleanup Message-ID: Seems like some historical Squeak/Pharo projects might be worth migrating to github just to maintain a historical record. Soon won't be able to mark projects "moved". https://code.google.com/p/support/wiki/ReadOnlyTransition https://code.google.com/hosting/search?q=pharo https://code.google.com/hosting/search?q=squeak cheers -ben From casimiro.barreto at gmail.com Tue Aug 11 19:52:25 2015 From: casimiro.barreto at gmail.com (Casimiro - GMAIL) Date: Tue Aug 11 19:52:36 2015 Subject: [squeak-dev] =?utf-8?q?How_to_input_diacritics_=28like_=C3=A1=2C_?= =?utf-8?b?w6ksIMOzLCDDoy4uLik=?= Message-ID: <55CA5279.3020504@gmail.com> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150811/7736166a/signature.pgp From leves at elte.hu Tue Aug 11 21:26:51 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Aug 11 21:26:54 2015 Subject: =?ISO-8859-15?Q?Re=3A_=5Bsqueak-dev=5D_How_to_input_diacritics_=28like_=E1=2C_=E9=2C_=F3=2C_=E3=2E=2E=2E=29?= In-Reply-To: <55CA5279.3020504@gmail.com> References: <55CA5279.3020504@gmail.com> Message-ID: You see question marks because the font you're using doesn't have the glyphs to display the accented characters. I don't know if there's an easy way to load a font with the missing characters into a 4.6 image, because FreeType's FontChooser is broken, probably due to the recent Morphic changes. You can use the following script to load FreeType, if you want to give it a try: Installer ss3 project: 'FreeTypePlus'; install: 'FreeTypeConstants'; install: 'FreeType'; install: 'FreeTypeSubPixelAntiAliasing'; install: 'FreeTypeTests' Levente On Tue, 11 Aug 2015, Casimiro - GMAIL wrote: > Hello, > > I'm developing a little parser and need to enter characters of Portuguese language like ?, ?, ?, ?, ?... but using the traditional method what > happens is that I get a?, e? so on and so forth. Platform Linux (utf-8). Help appreciated. > > Best regards, > > CdAB > -- > The information contained in this message is confidential and intended to the recipients specified in the headers. If you received this message by > error, notify the sender immediately. The unauthorized use, disclosure, copy or alteration of this message are strictly forbidden and subjected to > civil and criminal sanctions. > > == > > This email may be signed using PGP key ID: 0x4134A417 > > From btc at openinworld.com Wed Aug 12 00:32:20 2015 From: btc at openinworld.com (Ben Coman) Date: Wed Aug 12 00:32:42 2015 Subject: =?UTF-8?B?UmU6IFtzcXVlYWstZGV2XSBIb3cgdG8gaW5wdXQgZGlhY3JpdGljcyAobGlrZSDDoSwg?= =?UTF-8?B?w6ksIMOzLCDDoy4uLik=?= In-Reply-To: References: <55CA5279.3020504@gmail.com> Message-ID: You can use http://www.fileformat.info/info/unicode/char/search.htm to check which fonts support the characters you need (although you probably also determine this from whichever word processor you're using) cheers -ben On Wed, Aug 12, 2015 at 5:26 AM, Levente Uzonyi wrote: > You see question marks because the font you're using doesn't have the glyphs > to display the accented characters. > I don't know if there's an easy way to load a font with the missing > characters into a 4.6 image, because FreeType's FontChooser is broken, > probably due to the recent Morphic changes. You can use the following script > to load FreeType, if you want to give it a try: > > Installer ss3 > project: 'FreeTypePlus'; > install: 'FreeTypeConstants'; > install: 'FreeType'; > install: 'FreeTypeSubPixelAntiAliasing'; > install: 'FreeTypeTests' > > Levente > > > On Tue, 11 Aug 2015, Casimiro - GMAIL wrote: > >> Hello, >> >> I'm developing a little parser and need to enter characters of Portuguese >> language like ?, ?, ?, ?, ?... but using the traditional method what >> happens is that I get a?, e? so on and so forth. Platform Linux (utf-8). >> Help appreciated. >> >> Best regards, >> >> CdAB >> -- >> The information contained in this message is confidential and intended to >> the recipients specified in the headers. If you received this message by >> error, notify the sender immediately. The unauthorized use, disclosure, >> copy or alteration of this message are strictly forbidden and subjected to >> civil and criminal sanctions. >> >> == >> >> This email may be signed using PGP key ID: 0x4134A417 >> > > > From jecel at merlintec.com Wed Aug 12 01:25:05 2015 From: jecel at merlintec.com (Jecel Assumpcao Jr.) Date: Wed Aug 12 01:25:25 2015 Subject: [squeak-dev] =?utf-8?q?How_to_input_diacritics_=28like_=C3=A1=2C_?= =?utf-8?b?w6ksIMOzLCDDoy4uLik=?= In-Reply-To: <55CA5279.3020504@gmail.com> References: <55CA5279.3020504@gmail.com> Message-ID: Casimiro, > I'm developing a little parser and need to enter characters of Portuguese language like > ?, ?, ?, ?, ?... but using the traditional method what happens is that I get a?, e? so on and > so forth. Platform Linux (utf-8). Help appreciated. This has always worked just fine on the Mac and in Windows, but the Unix 3.6-3 VM (released on April 2, 2004) changed things so you should set the LC_CTYPE/LC_ALL environment variables in the shell that invokes squeak. If you use the -nointl option for the VM then dead keys are disabled (try "squeak --help"). My own shell doesn't have the LC* variables set (it used to have it back in 2004, but that probably got lost in some upgrade over the years) but everything still seems to work for this 4.0.3-2202 VM. I use a ABNT2 keyboard. SQUEAK_ENCODING is set to 'UTF-8'. Good luck! -- Jecel From commits at source.squeak.org Wed Aug 12 01:27:51 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Aug 12 01:27:52 2015 Subject: [squeak-dev] The Trunk: Kernel-eem.938.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.938.mcz ==================== Summary ==================== Name: Kernel-eem.938 Author: eem Time: 11 August 2015, 6:26:26.719 pm UUID: f142f874-0cab-43d2-98c5-92fdf103028d Ancestors: Kernel-cmm.937 Have ClassDescription>>moveChangesTo: write the class's definition before the changes if there are any so that the changes file is a potential application recovery vehicle, not just a crash recovery vehicle. =============== Diff against Kernel-cmm.937 =============== Item was changed: ----- Method: ClassDescription>>moveChangesTo: (in category 'fileIn/Out') ----- moveChangesTo: newFile "Used in the process of condensing changes, this message requests that the source code of all methods of the receiver that have been changed should be moved to newFile." | changes | + changes := self methodDict keys select: + [:sel | (self compiledMethodAt: sel) fileIndex > 1]. + changes isEmpty ifTrue: + [^self]. + newFile cr; cr; command: 'H3'; nextChunkPut: self definition; command: '/H3'; cr. - changes := self methodDict keys select: [:sel | - (self compiledMethodAt: sel) fileIndex > 1]. self fileOutChangedMessages: changes on: newFile moveSource: #historically toFile: 2! From ma.chris.m at gmail.com Wed Aug 12 03:23:48 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Wed Aug 12 03:24:30 2015 Subject: [squeak-dev] [ANN] Squeak 5 Message-ID: In the 17 months since Squeak 4.5 was released, a huge development effort took place to create the next generation virtual-machine for the Squeak / Pharo / Newspeak family of programming systems. Squeak is the modern incarnation of the Smalltalk-80 programming environment originally developed at the Xerox PARC. "Squeak 5" introduces this new VM and associated new memory model, collectively referred to as "Spur". Presented [1] by Eliot Miranda and Cl?ment B?ra at the 2015 International Symposium on Memory Management, this new VM affords Squeak applications a significant boost in performance and memory management. Among other optimizations, the #become operation no longer requires a memory scan. Object pinning and ephemerons are also now supported. The release notes [2] provide more details. The new memory model requires a new image file format. Although this new format results in about a 15% increased memory requirement for the same number of 4.x objects, a new segmented heap allows memory to be given back to the OS when its no longer needed, a great benefit for application servers. As forward compatibility is as important to the Squeak community as backward compatibility, Squeak 5 is delivers an image with identical content as the recent 4.6 release. Although this new Squeak 5 VM cannot open images saved under the prior 4.x Cog format, objects and code can be easily exported from the 4.x image and then imported into Squeak 5. Applications whose code runs strictly above the Smalltalk meta layer will prove remarkably compatible with the new format, most applications will require no changes whatsotever. Squeak 5 is the result of monumental effort by a tiny group of very talented people, but its also just the beginning of yet a new effort; Spur is just a stepping stone to a more ambitious goals planned over the next five years. [1] -- A Partial Read Barrier for Efficient Support of Live Object-oriented Programming http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming [2] -- Squeak 5 Release Notes http://wiki.squeak.org/squeak/6207 From asqueaker at gmail.com Wed Aug 12 03:25:50 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Aug 12 03:25:52 2015 Subject: [squeak-dev] Trunk is open Message-ID: As Squeak 5 is released, please feel free to resume commits to trunk. I will upload a 5.1alpha image next week. From eliot.miranda at gmail.com Wed Aug 12 03:51:50 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Aug 12 03:51:53 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: Message-ID: Hi All, who will update http://squeak.org/downloads/ to include the 5.0 release? a) I suggest that the 5.0 all-in-one have a line in the left-hand table that includes the 4.6 release and that it precede the 4.6 release in the list. b) the Trunk link points to TrunkImage.zip which contains a non-Spur image. c) Spur VMs need to be linked to by an added line in the Virtual Machines list. d) Spur imagers need to be included in the Image and Changes list under Custom Installation e) The SqueakV50.sources file also needs to be included in the Current Sources list. f) we could start a History list for the 5.0 line So there are a few things to fix before 5.0 is freely downloadable. On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller wrote: > In the 17 months since Squeak 4.5 was released, a huge development > effort took place to create the next generation virtual-machine for > the Squeak / Pharo / Newspeak family of programming systems. Squeak > is the modern incarnation of the Smalltalk-80 programming environment > originally developed at the Xerox PARC. > > "Squeak 5" introduces this new VM and associated new memory model, > collectively referred to as "Spur". Presented [1] by Eliot Miranda > and Cl?ment B?ra at the 2015 International Symposium on Memory > Management, this new VM affords Squeak applications a significant > boost in performance and memory management. Among other > optimizations, the #become operation no longer requires a memory scan. > Object pinning and ephemerons are also now supported. The release > notes [2] provide more details. > > The new memory model requires a new image file format. Although this > new format results in about a 15% increased memory requirement for the > same number of 4.x objects, a new segmented heap allows memory to be > given back to the OS when its no longer needed, a great benefit for > application servers. > > As forward compatibility is as important to the Squeak community as > backward compatibility, Squeak 5 is delivers an image with identical > content as the recent 4.6 release. Although this new Squeak 5 VM > cannot open images saved under the prior 4.x Cog format, objects and > code can be easily exported from the 4.x image and then imported into > Squeak 5. Applications whose code runs strictly above the Smalltalk > meta layer will prove remarkably compatible with the new format, most > applications will require no changes whatsotever. > > Squeak 5 is the result of monumental effort by a tiny group of very > talented people, but its also just the beginning of yet a new effort; > Spur is just a stepping stone to a more ambitious goals planned over > the next five years. > > [1] -- A Partial Read Barrier for Efficient Support of Live > Object-oriented Programming > > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming > > [2] -- Squeak 5 Release Notes > http://wiki.squeak.org/squeak/6207 > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150811/f871d445/attachment.htm From craig at netjam.org Wed Aug 12 06:56:17 2015 From: craig at netjam.org (Craig Latta) Date: Wed Aug 12 06:56:34 2015 Subject: [squeak-dev] re: [ANN] Squeak 5 In-Reply-To: References: Message-ID: Hi Eliot-- > who will update http://squeak.org/downloads/ to include the 5.0 > release? Fabio Niephaus at HPI made the most recent changes; I've asked him about this. thanks again, -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From lists at fniephaus.com Wed Aug 12 07:09:36 2015 From: lists at fniephaus.com (Fabio Niephaus) Date: Wed Aug 12 07:09:49 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: Message-ID: Hi Eliot, Unfortunately, I'm having technical difficulties with my personal MacBook, but I will update the download section accordingly within the next few hours. Best, Fabio On Wed 12 Aug 2015 at 04:51 Eliot Miranda wrote: > Hi All, > > who will update http://squeak.org/downloads/ to include the 5.0 > release? > > a) I suggest that the 5.0 all-in-one have a line in the left-hand table > that includes the 4.6 release and that it precede the 4.6 release in the > list. > > b) the Trunk link points to TrunkImage.zip which contains a non-Spur image. > > c) Spur VMs need to be linked to by an added line in the Virtual Machines > list. > > d) Spur imagers need to be included in the Image and Changes list under > Custom Installation > > e) The SqueakV50.sources file also needs to be included in the Current > Sources list. > > f) we could start a History list for the 5.0 line > > So there are a few things to fix before 5.0 is freely downloadable. > > On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller > wrote: > >> In the 17 months since Squeak 4.5 was released, a huge development >> effort took place to create the next generation virtual-machine for >> the Squeak / Pharo / Newspeak family of programming systems. Squeak >> is the modern incarnation of the Smalltalk-80 programming environment >> originally developed at the Xerox PARC. >> >> "Squeak 5" introduces this new VM and associated new memory model, >> collectively referred to as "Spur". Presented [1] by Eliot Miranda >> and Cl?ment B?ra at the 2015 International Symposium on Memory >> Management, this new VM affords Squeak applications a significant >> boost in performance and memory management. Among other >> optimizations, the #become operation no longer requires a memory scan. >> Object pinning and ephemerons are also now supported. The release >> notes [2] provide more details. >> >> The new memory model requires a new image file format. Although this >> new format results in about a 15% increased memory requirement for the >> same number of 4.x objects, a new segmented heap allows memory to be >> given back to the OS when its no longer needed, a great benefit for >> application servers. >> >> As forward compatibility is as important to the Squeak community as >> backward compatibility, Squeak 5 is delivers an image with identical >> content as the recent 4.6 release. Although this new Squeak 5 VM >> cannot open images saved under the prior 4.x Cog format, objects and >> code can be easily exported from the 4.x image and then imported into >> Squeak 5. Applications whose code runs strictly above the Smalltalk >> meta layer will prove remarkably compatible with the new format, most >> applications will require no changes whatsotever. >> >> Squeak 5 is the result of monumental effort by a tiny group of very >> talented people, but its also just the beginning of yet a new effort; >> Spur is just a stepping stone to a more ambitious goals planned over >> the next five years. >> >> [1] -- A Partial Read Barrier for Efficient Support of Live >> Object-oriented Programming >> >> http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming >> >> [2] -- Squeak 5 Release Notes >> http://wiki.squeak.org/squeak/6207 >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150812/465eb5fb/attachment.htm From casey.obrien.r at gmail.com Wed Aug 12 07:23:33 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Wed Aug 12 07:23:37 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: Message-ID: <2E78C42B-4CBE-4456-AEA9-1B7CDA6847A9@gmail.com> I had some trouble parsing this message. For the most part, though, I get it. --C > On Aug 11, 2015, at 8:23 PM, Chris Muller wrote: > > In the 17 months since Squeak 4.5 was released, a huge development > effort took place to create the next generation virtual-machine for > the Squeak / Pharo / Newspeak family of programming systems. Squeak > is the modern incarnation of the Smalltalk-80 programming environment > originally developed at the Xerox PARC. > > "Squeak 5" introduces this new VM and associated new memory model, > collectively referred to as "Spur". Presented [1] by Eliot Miranda > and Cl?ment B?ra at the 2015 International Symposium on Memory > Management, this new VM affords Squeak applications a significant > boost in performance and memory management. Among other > optimizations, the #become operation no longer requires a memory scan. > Object pinning and ephemerons are also now supported. The release > notes [2] provide more details. > > The new memory model requires a new image file format. Although this > new format results in about a 15% increased memory requirement for the > same number of 4.x objects, a new segmented heap allows memory to be > given back to the OS when its no longer needed, a great benefit for > application servers. > > As forward compatibility is as important to the Squeak community as > backward compatibility, Squeak 5 is delivers an image with identical > content as the recent 4.6 release. Although this new Squeak 5 VM > cannot open images saved under the prior 4.x Cog format, objects and > code can be easily exported from the 4.x image and then imported into > Squeak 5. Applications whose code runs strictly above the Smalltalk > meta layer will prove remarkably compatible with the new format, most > applications will require no changes whatsotever. > > Squeak 5 is the result of monumental effort by a tiny group of very > talented people, but its also just the beginning of yet a new effort; > Spur is just a stepping stone to a more ambitious goals planned over > the next five years. > > [1] -- A Partial Read Barrier for Efficient Support of Live > Object-oriented Programming > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming > > [2] -- Squeak 5 Release Notes > http://wiki.squeak.org/squeak/6207 > From btc at openinworld.com Wed Aug 12 15:46:52 2015 From: btc at openinworld.com (Ben Coman) Date: Wed Aug 12 15:48:46 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: Message-ID: On Wed, Aug 12, 2015 at 11:23 AM, Chris Muller wrote: > In the 17 months since Squeak 4.5 was released, a huge development > effort took place to create the next generation virtual-machine for > the Squeak / Pharo / Newspeak family of programming systems. Squeak > is the modern incarnation of the Smalltalk-80 programming environment > originally developed at the Xerox PARC. > > "Squeak 5" introduces this new VM and associated new memory model, > collectively referred to as "Spur". Presented [1] by Eliot Miranda > and Cl?ment B?ra at the 2015 International Symposium on Memory > Management, this new VM affords Squeak applications a significant > boost in performance and memory management. Among other > optimizations, the #become operation no longer requires a memory scan. > Object pinning and ephemerons are also now supported. The release > notes [2] provide more details. > > The new memory model requires a new image file format. Although this > new format results in about a 15% increased memory requirement for the > same number of 4.x objects, a new segmented heap allows memory to be > given back to the OS when its no longer needed, a great benefit for > application servers. > > As forward compatibility is as important to the Squeak community as > backward compatibility, Squeak 5 is delivers an image with identical > content as the recent 4.6 release. Although this new Squeak 5 VM > cannot open images saved under the prior 4.x Cog format, objects and > code can be easily exported from the 4.x image and then imported into > Squeak 5. Applications whose code runs strictly above the Smalltalk > meta layer will prove remarkably compatible with the new format, most > applications will require no changes whatsotever. > > Squeak 5 is the result of monumental effort by a tiny group of very > talented people, but its also just the beginning of yet a new effort; > Spur is just a stepping stone to a more ambitious goals planned over > the next five years. > [1] -- A Partial Read Barrier for Efficient Support of Live > Object-oriented Programming > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming > [2] -- Squeak 5 Release Notes > http://wiki.squeak.org/squeak/6207 Congratulation guys. Love figure 4 in the paper. Sub millisecond pause for garbage collection of GB size images. cheers -ben From eliot.miranda at gmail.com Wed Aug 12 16:30:54 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Aug 12 16:30:57 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: Message-ID: Hi Ben, On Wed, Aug 12, 2015 at 8:46 AM, Ben Coman wrote: > On Wed, Aug 12, 2015 at 11:23 AM, Chris Muller > wrote: > > In the 17 months since Squeak 4.5 was released, a huge development > > effort took place to create the next generation virtual-machine for > > the Squeak / Pharo / Newspeak family of programming systems. Squeak > > is the modern incarnation of the Smalltalk-80 programming environment > > originally developed at the Xerox PARC. > > > > "Squeak 5" introduces this new VM and associated new memory model, > > collectively referred to as "Spur". Presented [1] by Eliot Miranda > > and Cl?ment B?ra at the 2015 International Symposium on Memory > > Management, this new VM affords Squeak applications a significant > > boost in performance and memory management. Among other > > optimizations, the #become operation no longer requires a memory scan. > > Object pinning and ephemerons are also now supported. The release > > notes [2] provide more details. > > > > The new memory model requires a new image file format. Although this > > new format results in about a 15% increased memory requirement for the > > same number of 4.x objects, a new segmented heap allows memory to be > > given back to the OS when its no longer needed, a great benefit for > > application servers. > > > > As forward compatibility is as important to the Squeak community as > > backward compatibility, Squeak 5 is delivers an image with identical > > content as the recent 4.6 release. Although this new Squeak 5 VM > > cannot open images saved under the prior 4.x Cog format, objects and > > code can be easily exported from the 4.x image and then imported into > > Squeak 5. Applications whose code runs strictly above the Smalltalk > > meta layer will prove remarkably compatible with the new format, most > > applications will require no changes whatsotever. > > > > Squeak 5 is the result of monumental effort by a tiny group of very > > talented people, but its also just the beginning of yet a new effort; > > Spur is just a stepping stone to a more ambitious goals planned over > > the next five years. > > > [1] -- A Partial Read Barrier for Efficient Support of Live > > Object-oriented Programming > > > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming > > [2] -- Squeak 5 Release Notes > > http://wiki.squeak.org/squeak/6207 > > Congratulation guys. > Love figure 4 in the paper. Sub millisecond pause for garbage > collection of GB size images. > Not on your life! :-). What we achieve is sub-millisecond pauses for become: in GB sized heaps. But the point of Spur is that it *doesn't* do the compaction phase of a GC to implement become:, unlike the standard VM. We do achieve millisecond pause times for scavenging (collecting the young generation) in large heaps, but that's no great shakes. However, we do have plans to incrementalize global mark-sweep GC, and then the time taken will be amortized into pauses that should indeed be of the order of a millisecond. cheers -ben > _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150812/ae507579/attachment.htm From btc at openinworld.com Wed Aug 12 16:40:30 2015 From: btc at openinworld.com (Ben Coman) Date: Wed Aug 12 16:40:53 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: Message-ID: On Thu, Aug 13, 2015 at 12:30 AM, Eliot Miranda wrote: > Hi Ben, > > On Wed, Aug 12, 2015 at 8:46 AM, Ben Coman wrote: >> >> On Wed, Aug 12, 2015 at 11:23 AM, Chris Muller >> wrote: >> > In the 17 months since Squeak 4.5 was released, a huge development >> > effort took place to create the next generation virtual-machine for >> > the Squeak / Pharo / Newspeak family of programming systems. Squeak >> > is the modern incarnation of the Smalltalk-80 programming environment >> > originally developed at the Xerox PARC. >> > >> > "Squeak 5" introduces this new VM and associated new memory model, >> > collectively referred to as "Spur". Presented [1] by Eliot Miranda >> > and Cl?ment B?ra at the 2015 International Symposium on Memory >> > Management, this new VM affords Squeak applications a significant >> > boost in performance and memory management. Among other >> > optimizations, the #become operation no longer requires a memory scan. >> > Object pinning and ephemerons are also now supported. The release >> > notes [2] provide more details. >> > >> > The new memory model requires a new image file format. Although this >> > new format results in about a 15% increased memory requirement for the >> > same number of 4.x objects, a new segmented heap allows memory to be >> > given back to the OS when its no longer needed, a great benefit for >> > application servers. >> > >> > As forward compatibility is as important to the Squeak community as >> > backward compatibility, Squeak 5 is delivers an image with identical >> > content as the recent 4.6 release. Although this new Squeak 5 VM >> > cannot open images saved under the prior 4.x Cog format, objects and >> > code can be easily exported from the 4.x image and then imported into >> > Squeak 5. Applications whose code runs strictly above the Smalltalk >> > meta layer will prove remarkably compatible with the new format, most >> > applications will require no changes whatsotever. >> > >> > Squeak 5 is the result of monumental effort by a tiny group of very >> > talented people, but its also just the beginning of yet a new effort; >> > Spur is just a stepping stone to a more ambitious goals planned over >> > the next five years. >> >> > [1] -- A Partial Read Barrier for Efficient Support of Live >> > Object-oriented Programming >> > >> > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming >> > [2] -- Squeak 5 Release Notes >> > http://wiki.squeak.org/squeak/6207 >> >> Congratulation guys. >> Love figure 4 in the paper. Sub millisecond pause for garbage >> collection of GB size images. > > > Not on your life! :-). What we achieve is sub-millisecond pauses for > become: in GB sized heaps. But the point of Spur is that it *doesn't* do > the compaction phase of a GC to implement become:, unlike the standard VM. > We do achieve millisecond pause times for scavenging (collecting the young > generation) in large heaps, but that's no great shakes. However, we do have > plans to incrementalize global mark-sweep GC, and then the time taken will > be amortized into pauses that should indeed be of the order of a > millisecond. > >> cheers -ben > > > _,,,^..^,,,_ > best, Eliot > > > Ahh, got it. I misread. Thanks for the correction. cheers -ben From leves at elte.hu Wed Aug 12 18:09:52 2015 From: leves at elte.hu (Levente Uzonyi) Date: Wed Aug 12 18:09:54 2015 Subject: A question about #become: (was: Re: [squeak-dev] [ANN] Squeak 5) In-Reply-To: References: Message-ID: I wonder if you're creating two forwarders in case of #become:, with objects of different size, or just one forwarder for the larger object while copying the smaller object over the larger one (when possible). Levente On Tue, 11 Aug 2015, Eliot Miranda wrote: > Hi All, > ? ? who will update?http://squeak.org/downloads/ to include the 5.0 release? > > a) I suggest that the 5.0 all-in-one have a line in the left-hand table that includes the 4.6 release and that it precede the 4.6 release in the > list. ? > > b) the Trunk link points to TrunkImage.zip which contains a non-Spur image. > > c) Spur VMs need to be linked to by an added line in the Virtual Machines list. > > d) Spur imagers need to be included in the Image and Changes list under Custom Installation > > e) The SqueakV50.sources file also needs to be included in the Current Sources list. > > f) we could start a History list for the 5.0 line > > So there are a few things to fix before 5.0 is freely downloadable. > > On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller wrote: > In the 17 months since Squeak 4.5 was released, a huge development > effort took place to create the next generation virtual-machine for > the Squeak / Pharo / Newspeak family of programming systems.? Squeak > is the modern incarnation of the Smalltalk-80 programming environment > originally developed at the Xerox PARC. > > "Squeak 5" introduces this new VM and associated new memory model, > collectively referred to as "Spur".? Presented [1] by Eliot Miranda > and Cl?ment B?ra at the 2015 International Symposium on Memory > Management, this new VM affords Squeak applications a significant > boost in performance and memory management.? Among other > optimizations, the #become operation no longer requires a memory scan. > Object pinning and ephemerons are also now supported.? The release > notes [2] provide more details. > > The new memory model requires a new image file format.? Although this > new format results in about a 15% increased memory requirement for the > same number of 4.x objects, a new segmented heap allows memory to be > given back to the OS when its no longer needed, a great benefit for > application servers. > > As forward compatibility is as important to the Squeak community as > backward compatibility, Squeak 5 is delivers an image with identical > content as the recent 4.6 release.? Although this new Squeak 5 VM > cannot open images saved under the prior 4.x Cog format, objects and > code can be easily exported from the 4.x image and then imported into > Squeak 5.? Applications whose code runs strictly above the Smalltalk > meta layer will prove remarkably compatible with the new format, most > applications will require no changes whatsotever. > > Squeak 5 is the result of monumental effort by a tiny group of very > talented people, but its also just the beginning of yet a new effort; > Spur is just a stepping stone to a more ambitious goals planned over > the next five years. > > [1] -- A Partial Read Barrier for Efficient Support of Live > Object-oriented Programming > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming > > [2] -- Squeak 5 Release Notes > http://wiki.squeak.org/squeak/6207 > > > > > -- > _,,,^..^,,,_ > best,?Eliot > > From leves at elte.hu Wed Aug 12 18:11:52 2015 From: leves at elte.hu (Levente Uzonyi) Date: Wed Aug 12 18:11:57 2015 Subject: [squeak-dev] Update stream transition In-Reply-To: <20150810231055.GA69046@shell.msen.com> References: <20150806040235.GA62405@shell.msen.com> <20150810231055.GA69046@shell.msen.com> Message-ID: Hi Dave, I'm afraid it would be rather difficult to backport all changes to 4.6. The changes made by the Spur bootstrap would have to be reverted (Compiler, Collections, Kernel, System packages) along with all Spur-specific optimizations (e.g. #become:, immediate characters, etc) in future changes. Levente On Mon, 10 Aug 2015, David T. Lewis wrote: > On Thu, Aug 06, 2015 at 09:47:46AM -0500, Chris Muller wrote: >>> We currently have the trunk update stream, which is governed by update maps >>> called 'update' in the source.squeak.org/trunk repository. This update >>> stream is applicable to Squeak images up to the initial release of the >>> Squeak 4.6 image. These are images in the non-Spur image formats (6504 >>> or 6505 for 32-bit images, and 68002 for a 64-bit image). >> >> The .spur branch has already been collapsed onto trunk. There is no >> way to advance a non-spur image except through commits to the release >> repositories (e.g., 'squea46'). >> >>> During the development period leading up to Squeak 5.0, which uses the >>> new Spur image (format number 6521 for the 32-bit Spur image), the >>> update stream has been governed by update maps called 'update.spur' in >>> source.squeak.org/trunk. >>> >>> For Squeak 5.0, the update stream will continue to be governed by update >>> maps called 'update' in the source.squeak.org/trunk repository. Users of >>> Squeak 5.0 will see a normal trunk update stream from that point forward, >>> and will now be using the Spur image format. >> >> Yes. >> >>> For Squeak 4.6, the update stream will continue to be called 'update', >>> but will now be in the source.squeak.org/squeak46 repository. These update >>> maps are not yet in the squeak46 repository, >> >> I just made the first one in 'squeak46'. >> >>> but will be added as required. >>> The Squeak 4.6 release image points to this update stream. An effort will >>> be made to keep the squeak46 update stream in sync with trunk through the >>> next Squeak release cycle. >> >> Oh really, who is going to do that? >> > > I fully understand that nothing gets done unless someone actually puts > in the effort to do it. Within reasonable limits, this is something that > I am willing to work on through the course of the next release cycle. I > am expecting that this means 6 to 12 months, depending on how long it takes > to go through another release cycle. > > My assumptions were, and still are, as follows: > > 1) We are moving the main trunk development to the new Spur image format > for Squeak 5.0. This is not a reversible change. Some things may break, > but we are going to make it work and we are going to make it successful. > > 2) We will attempt to do this during a transition period of one release > cycle (whatever that might turn out to be). This allows us to learn > during the transition period, and to work out any unanticipated problems. > During that time period, we will make an effort to keep the classic image > format (Squeak 4.6) healthy. My own assumption is that this should include > a working update stream. > > 3) We will not rely on Eliot to do all the work. Once we get to Squeak > 5.0 with Spur, other people (such as me) need to step forward if any > backward compatibility with non-Spur images is going to be maintained. > If nobody does it, then it will not get done. > > Hopefully these are reasonable objectives, and from my point of view > I will be happy to put some time and effort into objective #3 in the > coming months. > > Having said that, I do not actually know *how* to maintain an update > stream for 4.6 to track the main trunk 5.0 stream. > > Dave > > > >>> For an existing trunk image, such as a Squeak 4.5 image that has been kept >>> up to date with the trunk, it will be necessary to switch from >>> source.squeak.org/trunk with update map name 'update', to a new setting >>> of source.squeak.org/squeak46 with update map name 'update', This change >>> must be made more or less concurrently with the Squeak 5.0 release. >>> >>> Questions: >>> >>> 1) Is the above summary correct? >>> >>> 2) Is it possible for the trunk update stream to force an existing trunk >>> image (originating from Squeak 4.5 or earlier) to switch over to the squeak46 >>> repository automatically, such that updates can proceed without loading >>> Spur-specific changes into a non-Spur trunk image? >> >> You would need to make sure not to update past update-topa.322.mcm. >> Probably the code is not set up to do a limited updated. >> >> No, you have to update the updateURL in Preferences. >> >>> 3) Previously, the release-specific repository (e.g. source.squeak.org/squeak45 >>> for Squeak 4.5) was used for applying a few important fixes to a stable >>> release. Assuming that this is also the intent for Squeak 4.6, and that we >>> also want to make an effort to permit non-Spur images to stay in sync with >>> trunk for some period of time (nominally one release cycle), then would it >>> be helpful to consider providing a trunk-compatible update stream for non-Spur >>> images during the transition period? I am not sure how that should work >>> (possibly something involving an 'update.classic' update map), but I would >>> like to know if conceptually it is something we should be trying to do. >> >> Basically you are talking about a fork of Squeak. Unless someone has >> some kind of compatibility issue with their application, I don't know >> why anyone would want to expend resources maintaining an old fork.. > > From eliot.miranda at gmail.com Wed Aug 12 18:20:04 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Aug 12 18:20:06 2015 Subject: A question about #become: (was: Re: [squeak-dev] [ANN] Squeak 5) Message-ID: On Wed, Aug 12, 2015 at 11:09 AM, Levente Uzonyi wrote: > I wonder if you're creating two forwarders in case of #become:, with > objects of different size, or just one forwarder for the larger object > while copying the smaller object over the larger one (when possible). > Right now it's the simplest thing that could possibly work. I think this is a great idea though. It would potentially eliminate the post-become stack scan if all objects can be becomed either by exchanging contents or (in one-way) shortening. Alas I don't have time for this right now. Any volunteers interested? Levente > > On Tue, 11 Aug 2015, Eliot Miranda wrote: > > Hi All, >> who will update http://squeak.org/downloads/ to include the 5.0 >> release? >> >> a) I suggest that the 5.0 all-in-one have a line in the left-hand table >> that includes the 4.6 release and that it precede the 4.6 release in the >> list. >> >> b) the Trunk link points to TrunkImage.zip which contains a non-Spur >> image. >> >> c) Spur VMs need to be linked to by an added line in the Virtual Machines >> list. >> >> d) Spur imagers need to be included in the Image and Changes list under >> Custom Installation >> >> e) The SqueakV50.sources file also needs to be included in the Current >> Sources list. >> >> f) we could start a History list for the 5.0 line >> >> So there are a few things to fix before 5.0 is freely downloadable. >> >> On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller >> wrote: >> In the 17 months since Squeak 4.5 was released, a huge development >> effort took place to create the next generation virtual-machine for >> the Squeak / Pharo / Newspeak family of programming systems. Squeak >> is the modern incarnation of the Smalltalk-80 programming >> environment >> originally developed at the Xerox PARC. >> >> "Squeak 5" introduces this new VM and associated new memory model, >> collectively referred to as "Spur". Presented [1] by Eliot Miranda >> and Cl?ment B?ra at the 2015 International Symposium on Memory >> Management, this new VM affords Squeak applications a significant >> boost in performance and memory management. Among other >> optimizations, the #become operation no longer requires a memory >> scan. >> Object pinning and ephemerons are also now supported. The release >> notes [2] provide more details. >> >> The new memory model requires a new image file format. Although >> this >> new format results in about a 15% increased memory requirement for >> the >> same number of 4.x objects, a new segmented heap allows memory to be >> given back to the OS when its no longer needed, a great benefit for >> application servers. >> >> As forward compatibility is as important to the Squeak community as >> backward compatibility, Squeak 5 is delivers an image with identical >> content as the recent 4.6 release. Although this new Squeak 5 VM >> cannot open images saved under the prior 4.x Cog format, objects and >> code can be easily exported from the 4.x image and then imported >> into >> Squeak 5. Applications whose code runs strictly above the Smalltalk >> meta layer will prove remarkably compatible with the new format, >> most >> applications will require no changes whatsotever. >> >> Squeak 5 is the result of monumental effort by a tiny group of very >> talented people, but its also just the beginning of yet a new >> effort; >> Spur is just a stepping stone to a more ambitious goals planned over >> the next five years. >> >> [1] -- A Partial Read Barrier for Efficient Support of Live >> Object-oriented Programming >> >> http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming >> >> [2] -- Squeak 5 Release Notes >> http://wiki.squeak.org/squeak/6207 >> >> >> >> >> -- >> _,,,^..^,,,_ >> best, Eliot >> >> > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150812/108ef29c/attachment.htm From eliot.miranda at gmail.com Wed Aug 12 18:24:29 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Aug 12 18:24:32 2015 Subject: [squeak-dev] Update stream transition In-Reply-To: References: <20150806040235.GA62405@shell.msen.com> <20150810231055.GA69046@shell.msen.com> Message-ID: On Wed, Aug 12, 2015 at 11:11 AM, Levente Uzonyi wrote: > Hi Dave, > > I'm afraid it would be rather difficult to backport all changes to 4.6. > The changes made by the Spur bootstrap would have to be reverted (Compiler, > Collections, Kernel, System packages) along with all Spur-specific > optimizations (e.g. #become:, immediate characters, etc) in future changes. Right. Some of this can be automated as long as the differences between the two systems are trivial. But soon enough the gulf will be too far because the differences will be in larger semantic units (for example a rewriting of finalization support to use Ephemerons could cause significant changes to the way file streams are finalized) and at that point automatic back-port will be impossible. I think a much more fruitful direction is to work on developing an up-to-date Interpreter in VMMaker.oscog that can hence be mated to both the V3 memory manager and the Spur one. > > Levente > > > On Mon, 10 Aug 2015, David T. Lewis wrote: > > On Thu, Aug 06, 2015 at 09:47:46AM -0500, Chris Muller wrote: >> >>> We currently have the trunk update stream, which is governed by update >>>> maps >>>> called 'update' in the source.squeak.org/trunk repository. This update >>>> stream is applicable to Squeak images up to the initial release of the >>>> Squeak 4.6 image. These are images in the non-Spur image formats (6504 >>>> or 6505 for 32-bit images, and 68002 for a 64-bit image). >>>> >>> >>> The .spur branch has already been collapsed onto trunk. There is no >>> way to advance a non-spur image except through commits to the release >>> repositories (e.g., 'squea46'). >>> >>> During the development period leading up to Squeak 5.0, which uses the >>>> new Spur image (format number 6521 for the 32-bit Spur image), the >>>> update stream has been governed by update maps called 'update.spur' in >>>> source.squeak.org/trunk. >>>> >>>> For Squeak 5.0, the update stream will continue to be governed by update >>>> maps called 'update' in the source.squeak.org/trunk repository. Users >>>> of >>>> Squeak 5.0 will see a normal trunk update stream from that point >>>> forward, >>>> and will now be using the Spur image format. >>>> >>> >>> Yes. >>> >>> For Squeak 4.6, the update stream will continue to be called 'update', >>>> but will now be in the source.squeak.org/squeak46 repository. These >>>> update >>>> maps are not yet in the squeak46 repository, >>>> >>> >>> I just made the first one in 'squeak46'. >>> >>> but will be added as required. >>>> The Squeak 4.6 release image points to this update stream. An effort >>>> will >>>> be made to keep the squeak46 update stream in sync with trunk through >>>> the >>>> next Squeak release cycle. >>>> >>> >>> Oh really, who is going to do that? >>> >>> >> I fully understand that nothing gets done unless someone actually puts >> in the effort to do it. Within reasonable limits, this is something that >> I am willing to work on through the course of the next release cycle. I >> am expecting that this means 6 to 12 months, depending on how long it >> takes >> to go through another release cycle. >> >> My assumptions were, and still are, as follows: >> >> 1) We are moving the main trunk development to the new Spur image format >> for Squeak 5.0. This is not a reversible change. Some things may break, >> but we are going to make it work and we are going to make it successful. >> >> 2) We will attempt to do this during a transition period of one release >> cycle (whatever that might turn out to be). This allows us to learn >> during the transition period, and to work out any unanticipated problems. >> During that time period, we will make an effort to keep the classic image >> format (Squeak 4.6) healthy. My own assumption is that this should include >> a working update stream. >> >> 3) We will not rely on Eliot to do all the work. Once we get to Squeak >> 5.0 with Spur, other people (such as me) need to step forward if any >> backward compatibility with non-Spur images is going to be maintained. >> If nobody does it, then it will not get done. >> >> Hopefully these are reasonable objectives, and from my point of view >> I will be happy to put some time and effort into objective #3 in the >> coming months. >> >> Having said that, I do not actually know *how* to maintain an update >> stream for 4.6 to track the main trunk 5.0 stream. >> >> Dave >> >> >> >> For an existing trunk image, such as a Squeak 4.5 image that has been kept >>>> up to date with the trunk, it will be necessary to switch from >>>> source.squeak.org/trunk with update map name 'update', to a new setting >>>> of source.squeak.org/squeak46 with update map name 'update', This >>>> change >>>> must be made more or less concurrently with the Squeak 5.0 release. >>>> >>>> Questions: >>>> >>>> 1) Is the above summary correct? >>>> >>>> 2) Is it possible for the trunk update stream to force an existing trunk >>>> image (originating from Squeak 4.5 or earlier) to switch over to the >>>> squeak46 >>>> repository automatically, such that updates can proceed without loading >>>> Spur-specific changes into a non-Spur trunk image? >>>> >>> >>> You would need to make sure not to update past update-topa.322.mcm. >>> Probably the code is not set up to do a limited updated. >>> >>> No, you have to update the updateURL in Preferences. >>> >>> 3) Previously, the release-specific repository (e.g. >>>> source.squeak.org/squeak45 >>>> for Squeak 4.5) was used for applying a few important fixes to a stable >>>> release. Assuming that this is also the intent for Squeak 4.6, and that >>>> we >>>> also want to make an effort to permit non-Spur images to stay in sync >>>> with >>>> trunk for some period of time (nominally one release cycle), then would >>>> it >>>> be helpful to consider providing a trunk-compatible update stream for >>>> non-Spur >>>> images during the transition period? I am not sure how that should work >>>> (possibly something involving an 'update.classic' update map), but I >>>> would >>>> like to know if conceptually it is something we should be trying to do. >>>> >>> >>> Basically you are talking about a fork of Squeak. Unless someone has >>> some kind of compatibility issue with their application, I don't know >>> why anyone would want to expend resources maintaining an old fork.. >>> >> >> >> > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150812/d5dfd81c/attachment.htm From eliot.miranda at gmail.com Wed Aug 12 18:55:54 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Aug 12 18:55:57 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: Message-ID: Hi All, Fabio's kindly done most of the changes. But some questions remain for more general discussion. See below. Fabio, thanks so much for doing this, and so quickly! On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda wrote: > Hi All, > > who will update http://squeak.org/downloads/ to include the 5.0 > release? > > a) I suggest that the 5.0 all-in-one have a line in the left-hand table > that includes the 4.6 release and that it precede the 4.6 release in the > list. > Done. > > b) the Trunk link points to TrunkImage.zip which contains a non-Spur image. > So this is the biggie. What should we do? - add a Trunk 5.0 build with a different link? (Noooooo) - change http://build.squeak.org/job/SqueakTrunk to build what it says (Yessss please, who can do this?) - add a Squeak 4.6 build job? Is that even worth it any more considering 4.6 is released and stable? If it is then what should it build? David? > c) Spur VMs need to be linked to by an added line in the Virtual Machines > list. > Not applicable. the VM links point to the root of my site so they effectively point to both old and Spur VMs. > > d) Spur imagers need to be included in the Image and Changes list under > Custom Installation > Done. > > e) The SqueakV50.sources file also needs to be included in the Current > Sources list. > Done. > f) we could start a History list for the 5.0 line > This is probably quite a big reorg on the page and not urgent. > > So there are a few things to fix before 5.0 is freely downloadable. > > On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller > wrote: > >> In the 17 months since Squeak 4.5 was released, a huge development >> effort took place to create the next generation virtual-machine for >> the Squeak / Pharo / Newspeak family of programming systems. Squeak >> is the modern incarnation of the Smalltalk-80 programming environment >> originally developed at the Xerox PARC. >> >> "Squeak 5" introduces this new VM and associated new memory model, >> collectively referred to as "Spur". Presented [1] by Eliot Miranda >> and Cl?ment B?ra at the 2015 International Symposium on Memory >> Management, this new VM affords Squeak applications a significant >> boost in performance and memory management. Among other >> optimizations, the #become operation no longer requires a memory scan. >> Object pinning and ephemerons are also now supported. The release >> notes [2] provide more details. >> >> The new memory model requires a new image file format. Although this >> new format results in about a 15% increased memory requirement for the >> same number of 4.x objects, a new segmented heap allows memory to be >> given back to the OS when its no longer needed, a great benefit for >> application servers. >> >> As forward compatibility is as important to the Squeak community as >> backward compatibility, Squeak 5 is delivers an image with identical >> content as the recent 4.6 release. Although this new Squeak 5 VM >> cannot open images saved under the prior 4.x Cog format, objects and >> code can be easily exported from the 4.x image and then imported into >> Squeak 5. Applications whose code runs strictly above the Smalltalk >> meta layer will prove remarkably compatible with the new format, most >> applications will require no changes whatsotever. >> >> Squeak 5 is the result of monumental effort by a tiny group of very >> talented people, but its also just the beginning of yet a new effort; >> Spur is just a stepping stone to a more ambitious goals planned over >> the next five years. >> >> [1] -- A Partial Read Barrier for Efficient Support of Live >> Object-oriented Programming >> >> http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming >> >> [2] -- Squeak 5 Release Notes >> http://wiki.squeak.org/squeak/6207 >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150812/c6ca0549/attachment.htm From tim at rowledge.org Wed Aug 12 18:57:04 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Aug 12 18:57:09 2015 Subject: A question about #become: (was: Re: [squeak-dev] [ANN] Squeak 5) In-Reply-To: References: Message-ID: On 12-08-2015, at 11:20 AM, Eliot Miranda wrote: > > > On Wed, Aug 12, 2015 at 11:09 AM, Levente Uzonyi wrote: > I wonder if you're creating two forwarders in case of #become:, with objects of different size, or just one forwarder for the larger object while copying the smaller object over the larger one (when possible). > > Right now it's the simplest thing that could possibly work. I think this is a great idea though. It would potentially eliminate the post-become stack scan if all objects can be becomed either by exchanging contents or (in one-way) shortening. Alas I don't have time for this right now. Any volunteers interested? Huh; I thought you had done that ages ago. I recall suggesting it really early in your spur work and could have sworn you did it right then. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Futuristic: It will only run on a next generation supercomputer. From eliot.miranda at gmail.com Wed Aug 12 18:58:52 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Aug 12 18:58:54 2015 Subject: A question about #become: (was: Re: [squeak-dev] [ANN] Squeak 5) In-Reply-To: References: Message-ID: On Wed, Aug 12, 2015 at 11:57 AM, tim Rowledge wrote: > > On 12-08-2015, at 11:20 AM, Eliot Miranda wrote: > > > > > > > On Wed, Aug 12, 2015 at 11:09 AM, Levente Uzonyi wrote: > > I wonder if you're creating two forwarders in case of #become:, with > objects of different size, or just one forwarder for the larger object > while copying the smaller object over the larger one (when possible). > > > > Right now it's the simplest thing that could possibly work. I think > this is a great idea though. It would potentially eliminate the > post-become stack scan if all objects can be becomed either by exchanging > contents or (in one-way) shortening. Alas I don't have time for this right > now. Any volunteers interested? > > Huh; I thought you had done that ages ago. I recall suggesting it really > early in your spur work and could have sworn you did it right then. > I think I did exchange of contents when the objects are of the same size, at your prompting, but I definitely know I /didn't/ do shortening in one-way as per Levente's suggestion. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150812/81b02d9f/attachment.htm From eliot.miranda at gmail.com Wed Aug 12 19:03:12 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Aug 12 19:03:15 2015 Subject: A question about #become: (was: Re: [squeak-dev] [ANN] Squeak 5) In-Reply-To: References: Message-ID: On Wed, Aug 12, 2015 at 11:58 AM, Eliot Miranda wrote: > > > On Wed, Aug 12, 2015 at 11:57 AM, tim Rowledge wrote: > >> >> On 12-08-2015, at 11:20 AM, Eliot Miranda >> wrote: >> >> > >> > >> > On Wed, Aug 12, 2015 at 11:09 AM, Levente Uzonyi wrote: >> > I wonder if you're creating two forwarders in case of #become:, with >> objects of different size, or just one forwarder for the larger object >> while copying the smaller object over the larger one (when possible). >> > >> > Right now it's the simplest thing that could possibly work. I think >> this is a great idea though. It would potentially eliminate the >> post-become stack scan if all objects can be becomed either by exchanging >> contents or (in one-way) shortening. Alas I don't have time for this right >> now. Any volunteers interested? >> >> Huh; I thought you had done that ages ago. I recall suggesting it really >> early in your spur work and could have sworn you did it right then. >> > > I think I did exchange of contents when the objects are of the same size, > at your prompting, but I definitely know I /didn't/ do shortening in > one-way as per Levente's suggestion. > > _,,,^..^,,,_ > Note that there are a fair few potential cases to cover here. An object may be the last object in eden, or the survivor spaces and may have room beyond it to lengthen it, so it could become a larger object by stretching and copying. It may be in old space and followed by a free object and so again be amenable to stretching. I suggest that someone collect data on how often shrinking and/or stretching is an option before expending effort here. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150812/e26f5c10/attachment.htm From tim at rowledge.org Wed Aug 12 19:06:38 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Aug 12 19:06:43 2015 Subject: A question about #become: (was: Re: [squeak-dev] [ANN] Squeak 5) In-Reply-To: References: Message-ID: <3890CED1-F4C1-4A99-9C4C-B0A2E56D0573@rowledge.org> On 12-08-2015, at 11:58 AM, Eliot Miranda wrote: > I think I did exchange of contents when the objects are of the same size, at your prompting, but I definitely know I /didn't/ do shortening in one-way as per Levente's suggestion. D?oh! It?s such an obvious optimisation. And to really make it funny, I?m fairly sure you originally suggested it to *me* a gazillion years ago. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Liability: a valuable political skill From casimiro.barreto at gmail.com Wed Aug 12 19:18:09 2015 From: casimiro.barreto at gmail.com (Casimiro - GMAIL) Date: Wed Aug 12 19:18:15 2015 Subject: =?UTF-8?Q?Re:_[squeak-dev]_How_to_input_diacritics_=28like_=c3=a1?= =?UTF-8?B?LCDDqSwgw7MsIMOjLi4uKQ==?= In-Reply-To: <55caa087.c1ed8c0a.fe5b7.ffffc6dbSMTPIN_ADDED_MISSING@mx.google.com> References: <55CA5279.3020504@gmail.com> <55caa087.c1ed8c0a.fe5b7.ffffc6dbSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <55CB9BF1.1050601@gmail.com> Em 11-08-2015 22:25, Jecel Assumpcao Jr. escreveu: > Casimiro, > >> I'm developing a little parser and need to enter characters of Portuguese language like >> ?, ?, ?, ?, ?... but using the traditional method what happens is that I get a?, e? so on and >> so forth. Platform Linux (utf-8). Help appreciated. > This has always worked just fine on the Mac and in Windows, but the Unix > 3.6-3 VM (released on April 2, 2004) changed things so you should set > the LC_CTYPE/LC_ALL environment variables in the shell that invokes > squeak. If you use the -nointl option for the VM then dead keys are > disabled (try "squeak --help"). I'm using cog_spur. With the traditional VM diacritics worked OK, but in cog diacritics have always been a problem that I masked by using English. > > My own shell doesn't have the LC* variables set (it used to have it back > in 2004, but that probably got lost in some upgrade over the years) but > everything still seems to work for this 4.0.3-2202 VM. I use a ABNT2 > keyboard. SQUEAK_ENCODING is set to 'UTF-8'. > > Good luck! > -- Jecel > > > -- The information contained in this message is confidential and intended to the recipients specified in the headers. If you received this message by error, notify the sender immediately. The unauthorized use, disclosure, copy or alteration of this message are strictly forbidden and subjected to civil and criminal sanctions. == This email may be signed using PGP key *ID: 0x4134A417* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150812/6473e4e5/attachment.htm From Das.Linux at gmx.de Wed Aug 12 19:49:28 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Aug 12 19:49:33 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: Message-ID: On 12.08.2015, at 20:55, Eliot Miranda wrote: > Hi All, > > > Fabio's kindly done most of the changes. But some questions remain for more general discussion. See below. > > Fabio, thanks so much for doing this, and so quickly! > > On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda wrote: > Hi All, > > who will update http://squeak.org/downloads/ to include the 5.0 release? > > a) I suggest that the 5.0 all-in-one have a line in the left-hand table that includes the 4.6 release and that it precede the 4.6 release in the list. > > Done. > > > b) the Trunk link points to TrunkImage.zip which contains a non-Spur image. > > So this is the biggie. What should we do? > > - add a Trunk 5.0 build with a different link? (Noooooo) > > - change http://build.squeak.org/job/SqueakTrunk to build what it says (Yessss please, who can do this?) Done: build.squeak.org/job/Trunk/ But as I said several times, Spur/trunk test just crash for month? > > - add a Squeak 4.6 build job? Is that even worth it any more considering 4.6 is released and stable? If it is then what should it build? David? > > > c) Spur VMs need to be linked to by an added line in the Virtual Machines list. > > Not applicable. the VM links point to the root of my site so they effectively point to both old and Spur VMs. > > > d) Spur imagers need to be included in the Image and Changes list under Custom Installation > > Done. > > > > e) The SqueakV50.sources file also needs to be included in the Current Sources list. > > Done. > > > f) we could start a History list for the 5.0 line > > This is probably quite a big reorg on the page and not urgent. > > > So there are a few things to fix before 5.0 is freely downloadable. > > On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller wrote: > In the 17 months since Squeak 4.5 was released, a huge development > effort took place to create the next generation virtual-machine for > the Squeak / Pharo / Newspeak family of programming systems. Squeak > is the modern incarnation of the Smalltalk-80 programming environment > originally developed at the Xerox PARC. > > "Squeak 5" introduces this new VM and associated new memory model, > collectively referred to as "Spur". Presented [1] by Eliot Miranda > and Cl?ment B?ra at the 2015 International Symposium on Memory > Management, this new VM affords Squeak applications a significant > boost in performance and memory management. Among other > optimizations, the #become operation no longer requires a memory scan. > Object pinning and ephemerons are also now supported. The release > notes [2] provide more details. > > The new memory model requires a new image file format. Although this > new format results in about a 15% increased memory requirement for the > same number of 4.x objects, a new segmented heap allows memory to be > given back to the OS when its no longer needed, a great benefit for > application servers. > > As forward compatibility is as important to the Squeak community as > backward compatibility, Squeak 5 is delivers an image with identical > content as the recent 4.6 release. Although this new Squeak 5 VM > cannot open images saved under the prior 4.x Cog format, objects and > code can be easily exported from the 4.x image and then imported into > Squeak 5. Applications whose code runs strictly above the Smalltalk > meta layer will prove remarkably compatible with the new format, most > applications will require no changes whatsotever. > > Squeak 5 is the result of monumental effort by a tiny group of very > talented people, but its also just the beginning of yet a new effort; > Spur is just a stepping stone to a more ambitious goals planned over > the next five years. > > [1] -- A Partial Read Barrier for Efficient Support of Live > Object-oriented Programming > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming > > [2] -- Squeak 5 Release Notes > http://wiki.squeak.org/squeak/6207 From lewis at mail.msen.com Wed Aug 12 20:15:47 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Aug 12 20:15:51 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: Message-ID: <15908.136.2.1.104.1439410547.squirrel@webmail.msen.com> > Hi All, > > > Fabio's kindly done most of the changes. But some questions remain > for > more general discussion. See below. > > Fabio, thanks so much for doing this, and so quickly! > > On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda > wrote: > >> Hi All, >> >> who will update http://squeak.org/downloads/ to include the 5.0 >> release? >> >> a) I suggest that the 5.0 all-in-one have a line in the left-hand table >> that includes the 4.6 release and that it precede the 4.6 release in the >> list. >> > > Done. > > >> >> b) the Trunk link points to TrunkImage.zip which contains a non-Spur >> image. >> > > So this is the biggie. What should we do? > > - add a Trunk 5.0 build with a different link? (Noooooo) > > - change http://build.squeak.org/job/SqueakTrunk to build what it says > (Yessss please, who can do this?) > > - add a Squeak 4.6 build job? Is that even worth it any more considering > 4.6 is released and stable? If it is then what should it build? David? I think that if we have a job called "SqueakTrunk" then it should be building the actual current trunk image, which is a 5.0 Spur image. Ideally I would suggest renaming the current "SqueakTrunk" job to something like "SqueakTrunk_Old". Leave it disabled until it gets fixed, and if it does not get fixed in a reasonable time (say a month or two) then delete it. Meanwhile get new new job up and running for the real SqueakTrunk builds. I do not know how that Jenkins job is maintained (it's done in a Ruby make system, which is over my head), so treat this just as an opinion. Dave > > >> c) Spur VMs need to be linked to by an added line in the Virtual >> Machines >> list. >> > > Not applicable. the VM links point to the root of my site so they > effectively point to both old and Spur VMs. > > >> >> d) Spur imagers need to be included in the Image and Changes list under >> Custom Installation >> > > Done. > > > >> >> e) The SqueakV50.sources file also needs to be included in the Current >> Sources list. >> > > Done. > > > >> f) we could start a History list for the 5.0 line >> > > This is probably quite a big reorg on the page and not urgent. > > >> >> So there are a few things to fix before 5.0 is freely downloadable. >> >> On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller >> wrote: >> >>> In the 17 months since Squeak 4.5 was released, a huge development >>> effort took place to create the next generation virtual-machine for >>> the Squeak / Pharo / Newspeak family of programming systems. Squeak >>> is the modern incarnation of the Smalltalk-80 programming environment >>> originally developed at the Xerox PARC. >>> >>> "Squeak 5" introduces this new VM and associated new memory model, >>> collectively referred to as "Spur". Presented [1] by Eliot Miranda >>> and Cl??ment B??ra at the 2015 International Symposium on Memory >>> Management, this new VM affords Squeak applications a significant >>> boost in performance and memory management. Among other >>> optimizations, the #become operation no longer requires a memory scan. >>> Object pinning and ephemerons are also now supported. The release >>> notes [2] provide more details. >>> >>> The new memory model requires a new image file format. Although this >>> new format results in about a 15% increased memory requirement for the >>> same number of 4.x objects, a new segmented heap allows memory to be >>> given back to the OS when its no longer needed, a great benefit for >>> application servers. >>> >>> As forward compatibility is as important to the Squeak community as >>> backward compatibility, Squeak 5 is delivers an image with identical >>> content as the recent 4.6 release. Although this new Squeak 5 VM >>> cannot open images saved under the prior 4.x Cog format, objects and >>> code can be easily exported from the 4.x image and then imported into >>> Squeak 5. Applications whose code runs strictly above the Smalltalk >>> meta layer will prove remarkably compatible with the new format, most >>> applications will require no changes whatsotever. >>> >>> Squeak 5 is the result of monumental effort by a tiny group of very >>> talented people, but its also just the beginning of yet a new effort; >>> Spur is just a stepping stone to a more ambitious goals planned over >>> the next five years. >>> >>> [1] -- A Partial Read Barrier for Efficient Support of Live >>> Object-oriented Programming >>> >>> http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming >>> >>> [2] -- Squeak 5 Release Notes >>> http://wiki.squeak.org/squeak/6207 >>> >>> >> >> >> -- >> _,,,^..^,,,_ >> best, Eliot >> > > > > -- > _,,,^..^,,,_ > best, Eliot > > From stephan at stack.nl Wed Aug 12 21:17:19 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Wed Aug 12 21:17:39 2015 Subject: [squeak-dev] Re: [ANN] Squeak 5 In-Reply-To: References: Message-ID: On 12/08/15 05:23, Chris Muller wrote: > [1] -- A Partial Read Barrier for Efficient Support of Live > Object-oriented Programming > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming For the paywall-free version: https://hal.inria.fr/hal-01152610 Stephan From commits at source.squeak.org Wed Aug 12 21:24:20 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Aug 12 21:24:20 2015 Subject: [squeak-dev] The Trunk: ShoutCore-ul.53.mcz Message-ID: Levente Uzonyi uploaded a new version of ShoutCore to project The Trunk: http://source.squeak.org/trunk/ShoutCore-ul.53.mcz ==================== Summary ==================== Name: ShoutCore-ul.53 Author: ul Time: 9 July 2015, 9:02:55.969 pm UUID: 37c4556b-dd26-4057-9e75-31334495ba7e Ancestors: ShoutCore-ul.52 In SHMCClassDefinition >> #sharedPools, the global should be added to the result instead of a block. =============== Diff against ShoutCore-ul.52 =============== Item was changed: ----- Method: SHMCClassDefinition>>sharedPools (in category 'act like a class') ----- sharedPools | d | d := Set new. classDefinition poolDictionaries do:[:each | + d add: (Smalltalk at: each asSymbol ifAbsent:[nil]) ]. - d add: [Smalltalk at: each asSymbol ifAbsent:[nil]] ]. ^d! From commits at source.squeak.org Wed Aug 12 21:24:30 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Aug 12 21:24:32 2015 Subject: [squeak-dev] The Trunk: ShoutCore-ul.54.mcz Message-ID: Levente Uzonyi uploaded a new version of ShoutCore to project The Trunk: http://source.squeak.org/trunk/ShoutCore-ul.54.mcz ==================== Summary ==================== Name: ShoutCore-ul.54 Author: ul Time: 12 August 2015, 10:39:34.306 pm UUID: 4329b6b2-95a5-4c41-8fe3-d489f4458293 Ancestors: ShoutCore-ul.53 - added missing #shoutParserClass to PseudoClass - faster SHTextStylerST80>>setAttributesIn:fromRanges: =============== Diff against ShoutCore-ul.53 =============== Item was added: + ----- Method: PseudoClass>>shoutParserClass (in category '*ShoutCore') ----- + shoutParserClass + + ^SHParserST80 + ! Item was changed: ----- Method: SHTextStylerST80>>setAttributesIn:fromRanges: (in category 'private') ----- setAttributesIn: aText fromRanges: ranges + + | defaultAttributes newRuns newValues lastAttributes oldRuns nextIndex lastCount | - | charAttr defaultAttr attr newRuns newValues lastAttr oldRuns lastCount | - oldRuns := aText runs. + defaultAttributes := self attributesFor: #default. - defaultAttr := self attributesFor: #default. - charAttr := Array new: aText size withAll: defaultAttr. - ranges do: [ :range | - (self attributesFor: range type) ifNotNil: [ :attribute | - charAttr from: range start to: range end put: attribute ] ]. newRuns := OrderedCollection new: ranges size * 2 + 1. newValues := OrderedCollection new: ranges size * 2 + 1. + lastAttributes := nil. + nextIndex := 1. - lastAttr := nil. lastCount := 0. + ranges do: [ :range | + | attributes | + nextIndex < range start ifTrue: [ + lastAttributes == defaultAttributes + ifTrue: [ + lastCount := lastCount + range start - nextIndex. + newRuns at: newRuns size put: lastCount ] + ifFalse: [ + lastCount := range start - nextIndex. + newRuns addLast: lastCount. + lastAttributes := defaultAttributes. + newValues addLast: lastAttributes ]. + nextIndex := range start ]. + attributes := (self attributesFor: range type) ifNil: [ defaultAttributes ]. + lastAttributes == attributes + ifTrue: [ + lastCount := lastCount + range end - nextIndex + 1. - 1 to: charAttr size do: [ :i | - (attr := charAttr at: i) == lastAttr - ifTrue: [ - lastCount := lastCount + 1. newRuns at: newRuns size put: lastCount ] ifFalse: [ + lastCount := range end - nextIndex + 1. + newRuns addLast: lastCount. + lastAttributes := attributes. + newValues addLast: lastAttributes ]. + nextIndex := range end + 1 ]. + nextIndex <= aText size ifTrue: [ + lastAttributes == defaultAttributes + ifTrue: [ + lastCount := lastCount + aText size - nextIndex + 1. + newRuns at: newRuns size put: lastCount ] + ifFalse: [ + lastCount := aText size - nextIndex + 1. + newRuns addLast: lastCount. + lastAttributes := defaultAttributes. + newValues addLast: lastAttributes ] ]. - newRuns addLast: 1. - lastCount := 1. - lastAttr := newValues addLast: attr ] ]. aText runs: (RunArray runs: newRuns values: newValues). + oldRuns withStartStopAndValueDo: [ :start :stop :attribs | - oldRuns withStartStopAndValueDo:[:start :stop :attribs| (attribs anySatisfy: [ :each | each shoutShouldPreserve ]) ifTrue: [ attribs do: [ :each | aText addAttribute: each from: start to: stop ] ] ]. ! From commits at source.squeak.org Wed Aug 12 21:24:54 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Aug 12 21:24:55 2015 Subject: [squeak-dev] The Inbox: Regex-Tests-Core-ul.1.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Tests-Core to project The Inbox: http://source.squeak.org/inbox/Regex-Tests-Core-ul.1.mcz ==================== Summary ==================== Name: Regex-Tests-Core-ul.1 Author: ul Time: 12 August 2015, 10:43:52.346 pm UUID: 2538aebb-3e78-4bb8-ad6f-2b0df63e564b Ancestors: - tests from Pharo ==================== Snapshot ==================== SystemOrganization addCategory: #'Regex-Tests-Core'! TestCase subclass: #RxMatcherTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Regex-Tests-Core'! !RxMatcherTest commentStamp: 'Tbn 11/12/2010 22:31' prior: 0! This class provides tests for the regular expression matcher.! ----- Method: RxMatcherTest class>>packageNamesUnderTest (in category 'accessing') ----- packageNamesUnderTest ^ #('VB-Regex')! ----- Method: RxMatcherTest>>compileRegex: (in category 'utilties') ----- compileRegex: aString "Compile the regex and answer the matcher, or answer nil if compilation fails." | syntaxTree | syntaxTree := RxParser safelyParse: aString. ^ syntaxTree isNil ifFalse: [ self matcherClass for: syntaxTree ]! ----- Method: RxMatcherTest>>henryReadme (in category 'testing-henry') ----- henryReadme self error: 'The tests in this category are based on the ones in Henry Spencer''s regexp.c package.'! ----- Method: RxMatcherTest>>matcherClass (in category 'accessing') ----- matcherClass ^ RxMatcher! ----- Method: RxMatcherTest>>runMatcher:with:expect:withSubexpressions: (in category 'utilties') ----- runMatcher: aMatcher with: aString expect: aBoolean withSubexpressions: anArray | copy got | copy := aMatcher copy: aString translatingMatchesUsing: [ :each | each ]. self assert: copy = aString description: 'Copying: expected ' , aString printString , ', but got ' , copy printString. got := aMatcher search: aString. self assert: got = aBoolean description: 'Searching: expected ' , aBoolean printString , ', but got ' , got printString. (anArray isNil or: [ aMatcher supportsSubexpressions not ]) ifTrue: [ ^ self ]. 1 to: anArray size by: 2 do: [ :index | | sub subExpect subGot | sub := anArray at: index. subExpect := anArray at: index + 1. subGot := aMatcher subexpression: sub. self assert: subExpect = subGot description: 'Subexpression ' , sub printString , ': expected ' , subExpect printString , ', but got ' , subGot printString ]! ----- Method: RxMatcherTest>>runRegex: (in category 'utilties') ----- runRegex: anArray "Run a clause anArray against a set of tests. Each clause is an array with a regex source string followed by sequence of 3-tuples. Each three-element group is one test to try against the regex, and includes: 1) test string; 2) expected result; 3) expected subexpression as an array of (index, substring), or nil." | source matcher | source := anArray first. matcher := self compileRegex: source. matcher isNil ifTrue: [ (anArray at: 2) isNil ifFalse: [ self signalFailure: 'Compilation failed, should have succeeded: ' , source printString ] ] ifFalse: [ (anArray at: 2) isNil ifTrue: [ self signalFailure: 'Compilation succeeded, should have failed: ' , source printString ] ifFalse: [ 2 to: anArray size by: 3 do: [ :index | self runMatcher: matcher with: (anArray at: index) expect: (anArray at: index + 1) withSubexpressions: (anArray at: index + 2) ] ] ]! ----- Method: RxMatcherTest>>testCaseInsensitive (in category 'testing-protocol') ----- testCaseInsensitive | matcher | matcher := self matcherClass forString: 'the quick brown fox' ignoreCase: true. self assert: (matcher search: 'the quick brown fox'). self assert: (matcher search: 'The quick brown FOX'). self assert: (matcher search: 'What do you know about the quick brown fox?'). self assert: (matcher search: 'What do you know about THE QUICK BROWN FOX?')! ----- Method: RxMatcherTest>>testCaseSensitive (in category 'testing-protocol') ----- testCaseSensitive | matcher | matcher := self matcherClass forString: 'the quick brown fox' ignoreCase: false. self assert: (matcher search: 'the quick brown fox'). self deny: (matcher search: 'The quick brown FOX'). self assert: (matcher search: 'What do you know about the quick brown fox?'). self deny: (matcher search: 'What do you know about THE QUICK BROWN FOX?')! ----- Method: RxMatcherTest>>testCopyReplacingMatches (in category 'testing-protocol') ----- testCopyReplacingMatches "See that the match context is preserved while copying stuff between matches:" | matcher | matcher := self matcherClass forString: '\<\d\D+'. self assert: (matcher copy: '9aaa1bbb 8ccc' replacingMatchesWith: 'foo') = 'foo1bbb foo'! ----- Method: RxMatcherTest>>testCopyTranslatingMatches (in category 'testing-protocol') ----- testCopyTranslatingMatches | matcher | matcher := self matcherClass forString: '\w+'. self assert: (matcher copy: 'now is the time ' translatingMatchesUsing: [ :each | each reversed ]) = 'won si eht emit '! ----- Method: RxMatcherTest>>testEmptyStringAtBeginningOfLine (in category 'testing-empty') ----- testEmptyStringAtBeginningOfLine | matcher | matcher := self matcherClass forString: '^'. self assert: (matcher copy: 'foo1 bar1' , String cr , 'foo2 bar2' replacingMatchesWith: '*') = ('*foo1 bar1' , String cr , '*foo2 bar2') description: 'An empty string at the beginning of a line'! ----- Method: RxMatcherTest>>testEmptyStringAtBeginningOfWord (in category 'testing-empty') ----- testEmptyStringAtBeginningOfWord | matcher | matcher := self matcherClass forString: '\<'. self assert: (matcher copy: 'foo bar' replacingMatchesWith: '*') = '*foo *bar' description: 'An empty string at the beginning of a word'! ----- Method: RxMatcherTest>>testEmptyStringAtEndOfLine (in category 'testing-empty') ----- testEmptyStringAtEndOfLine | matcher | matcher := self matcherClass forString: '$'. self assert: (matcher copy: 'foo1 bar1' , String cr , 'foo2 bar2' replacingMatchesWith: '*') = ('foo1 bar1*', String cr , 'foo2 bar2*') description: 'An empty string at the end of a line'! ----- Method: RxMatcherTest>>testEmptyStringAtEndOfWord (in category 'testing-empty') ----- testEmptyStringAtEndOfWord | matcher | matcher := self matcherClass forString: '\>'. self assert: (matcher copy: 'foo bar' replacingMatchesWith: '*') = 'foo* bar*' description: 'An empty string at the end of a word'! ----- Method: RxMatcherTest>>testEmptyStringAtWordBoundary (in category 'testing-empty') ----- testEmptyStringAtWordBoundary | matcher | matcher := self matcherClass forString: '\b'. self assert: (matcher copy: 'foo bar' replacingMatchesWith: '*') = '*foo* *bar*' description: 'An empty string at a word boundary'! ----- Method: RxMatcherTest>>testEmptyStringNotAtWordBoundary (in category 'testing-empty') ----- testEmptyStringNotAtWordBoundary | matcher | matcher := self matcherClass forString: '\B'. self assert: (matcher copy: 'foo bar' replacingMatchesWith: '*') = 'f*o*o b*a*r' description: 'An empty string not at a word boundary'! ----- Method: RxMatcherTest>>testHenry001 (in category 'testing-henry') ----- testHenry001 self runRegex: #('abc' 'abc' true (1 'abc') 'xbc' false nil 'axc' false nil 'abx' false nil 'xabcy' true (1 'abc') 'ababc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry002 (in category 'testing-henry') ----- testHenry002 self runRegex: #('ab*c' 'abc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry003 (in category 'testing-henry') ----- testHenry003 self runRegex: #('ab*bc' 'abc' true (1 'abc') 'abbc' true (1 'abbc') 'abbbbc' true (1 'abbbbc'))! ----- Method: RxMatcherTest>>testHenry004 (in category 'testing-henry') ----- testHenry004 self runRegex: #('ab+bc' 'abbc' true (1 'abbc') 'abc' false nil 'abq' false nil 'abbbbc' true (1 'abbbbc'))! ----- Method: RxMatcherTest>>testHenry005 (in category 'testing-henry') ----- testHenry005 self runRegex: #('ab?bc' 'abbc' true (1 'abbc') 'abc' true (1 'abc') 'abbbbc' false nil 'abc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry006 (in category 'testing-henry') ----- testHenry006 self runRegex: #('^abc$' 'abc' true (1 'abc') 'abcc' false nil 'aabc' false nil)! ----- Method: RxMatcherTest>>testHenry007 (in category 'testing-henry') ----- testHenry007 self runRegex: #('^abc' 'abcc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry008 (in category 'testing-henry') ----- testHenry008 self runRegex: #('abc$' 'aabc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry009 (in category 'testing-henry') ----- testHenry009 self runRegex: #('^' 'abc' true nil)! ----- Method: RxMatcherTest>>testHenry010 (in category 'testing-henry') ----- testHenry010 self runRegex: #('$' 'abc' true nil)! ----- Method: RxMatcherTest>>testHenry011 (in category 'testing-henry') ----- testHenry011 self runRegex: #('a.c' 'abc' true (1 'abc') 'axc' true (1 'axc'))! ----- Method: RxMatcherTest>>testHenry012 (in category 'testing-henry') ----- testHenry012 "Need to get creative to include the null character..." self runRegex: #('a.*c' 'axyzc' true (1 'axyzc') 'axy zc' true (1 'axy zc') "testing that a dot matches a space" ), (Array with: 'axy', (String with: 0 asCharacter), 'zc'), #(false nil "testing that a dot does not match a null" 'axyzd' false nil)! ----- Method: RxMatcherTest>>testHenry013 (in category 'testing-henry') ----- testHenry013 self runRegex: #('.a.*' '1234abc' true (1 '4abc') 'abcd' false nil)! ----- Method: RxMatcherTest>>testHenry014 (in category 'testing-henry') ----- testHenry014 self runRegex: #('a\w+c' ' abbbbc ' true (1 'abbbbc') 'abb bc' false nil)! ----- Method: RxMatcherTest>>testHenry015 (in category 'testing-henry') ----- testHenry015 self runRegex: #('\w+' ' foobar quux' true (1 'foobar') ' ~!!@#$%^&*()-+=\|/?.>,<' false nil)! ----- Method: RxMatcherTest>>testHenry016 (in category 'testing-henry') ----- testHenry016 self runRegex: #('a\W+c' 'a c' true (1 'a c') 'a bc' false nil)! ----- Method: RxMatcherTest>>testHenry017 (in category 'testing-henry') ----- testHenry017 self runRegex: #('\W+' 'foo!!@#$bar' true (1 '!!@#$') 'foobar' false nil)! ----- Method: RxMatcherTest>>testHenry018 (in category 'testing-henry') ----- testHenry018 self runRegex: #('a\s*c' 'a c' true (1 'a c') 'a bc' false nil)! ----- Method: RxMatcherTest>>testHenry019 (in category 'testing-henry') ----- testHenry019 self runRegex: #('\s+' 'abc3457 sd' true (1 ' ') '1234$^*^&asdfb' false nil)! ----- Method: RxMatcherTest>>testHenry020 (in category 'testing-henry') ----- testHenry020 self runRegex: #('a\S*c' 'aqwertyc' true (1 'aqwertyc') 'ab c' false nil)! ----- Method: RxMatcherTest>>testHenry021 (in category 'testing-henry') ----- testHenry021 self runRegex: #('\S+' ' asdf ' true (1 'asdf') ' ' false nil)! ----- Method: RxMatcherTest>>testHenry022 (in category 'testing-henry') ----- testHenry022 self runRegex: #('a\d+c' 'a0123456789c' true (1 'a0123456789c') 'a12b34c' false nil)! ----- Method: RxMatcherTest>>testHenry023 (in category 'testing-henry') ----- testHenry023 self runRegex: #('\d+' 'foo@#$%123ASD #$$%^&' true (1 '123') 'foo!!@#$asdfl;' false nil)! ----- Method: RxMatcherTest>>testHenry024 (in category 'testing-henry') ----- testHenry024 self runRegex: #('a\D+c' 'aqwertyc' true (1 'aqwertyc') 'aqw6ertc' false nil)! ----- Method: RxMatcherTest>>testHenry025 (in category 'testing-henry') ----- testHenry025 self runRegex: #('\D+' '1234 abc 456' true (1 ' abc ') '1234567890' false nil)! ----- Method: RxMatcherTest>>testHenry026 (in category 'testing-henry') ----- testHenry026 self runRegex: #('(f|o)+\b' 'foo' true (1 'foo') ' foo ' true (1 'foo'))! ----- Method: RxMatcherTest>>testHenry027 (in category 'testing-henry') ----- testHenry027 self runRegex: #('\ba\w+' "a word beginning with an A" 'land ancient' true (1 'ancient') 'antique vase' true (1 'antique') 'goofy foobar' false nil)! ----- Method: RxMatcherTest>>testHenry028 (in category 'testing-henry') ----- testHenry028 self runRegex: #('(f|o)+\B' 'quuxfoobar' true (1 'foo') 'quuxfoo ' true (1 'fo'))! ----- Method: RxMatcherTest>>testHenry029 (in category 'testing-henry') ----- testHenry029 self runRegex: #('\Ba\w+' "a word with an A in the middle, match at A and further" 'land ancient' true (1 'and') 'antique vase' true (1 'ase') 'smalltalk shall overcome' true (1 'alltalk') 'foonix is better' false nil)! ----- Method: RxMatcherTest>>testHenry030 (in category 'testing-henry') ----- testHenry030 self runRegex: #('fooa\>.*' 'fooa ' true nil 'fooa123' false nil 'fooa bar' true nil 'fooa' true nil 'fooargh' false nil)! ----- Method: RxMatcherTest>>testHenry031 (in category 'testing-henry') ----- testHenry031 self runRegex: #('\>.+abc' ' abcde fg' false nil 'foo abcde' true (1 ' abc') 'abcde' false nil)! ----- Method: RxMatcherTest>>testHenry032 (in category 'testing-henry') ----- testHenry032 self runRegex: #('\>testHenry033 (in category 'testing-henry') ----- testHenry033 self runRegex: #('.+\>testHenry034 (in category 'testing-henry') ----- testHenry034 self runRegex: #('a[bc]d' 'abc' false nil 'abd' true (1 'abd'))! ----- Method: RxMatcherTest>>testHenry035 (in category 'testing-henry') ----- testHenry035 self runRegex: #('a[b-d]e' 'abd' false nil 'ace' true (1 'ace'))! ----- Method: RxMatcherTest>>testHenry036 (in category 'testing-henry') ----- testHenry036 self runRegex: #('a[b-d]' 'aac' true (1 'ac'))! ----- Method: RxMatcherTest>>testHenry037 (in category 'testing-henry') ----- testHenry037 self runRegex: #('a[-b]' 'a-' true (1 'a-'))! ----- Method: RxMatcherTest>>testHenry038 (in category 'testing-henry') ----- testHenry038 self runRegex: #('a[b-]' 'a-' true (1 'a-'))! ----- Method: RxMatcherTest>>testHenry039 (in category 'testing-henry') ----- testHenry039 self runRegex: #('a[a-b-c]' nil)! ----- Method: RxMatcherTest>>testHenry040 (in category 'testing-henry') ----- testHenry040 self runRegex: #('[k]' 'ab' false nil)! ----- Method: RxMatcherTest>>testHenry041 (in category 'testing-henry') ----- testHenry041 self runRegex: #('a[b-a]' nil)! ----- Method: RxMatcherTest>>testHenry042 (in category 'testing-henry') ----- testHenry042 self runRegex: #('a[]b' nil)! ----- Method: RxMatcherTest>>testHenry043 (in category 'testing-henry') ----- testHenry043 self runRegex: #('a[' nil)! ----- Method: RxMatcherTest>>testHenry044 (in category 'testing-henry') ----- testHenry044 self runRegex: #('a]' 'a]' true (1 'a]'))! ----- Method: RxMatcherTest>>testHenry045 (in category 'testing-henry') ----- testHenry045 self runRegex: #('a[]]b' 'a]b' true (1 'a]b'))! ----- Method: RxMatcherTest>>testHenry046 (in category 'testing-henry') ----- testHenry046 self runRegex: #('a[^bc]d' 'aed' true (1 'aed') 'abd' false nil)! ----- Method: RxMatcherTest>>testHenry047 (in category 'testing-henry') ----- testHenry047 self runRegex: #('a[^-b]c' 'adc' true (1 'adc') 'a-c' false nil)! ----- Method: RxMatcherTest>>testHenry048 (in category 'testing-henry') ----- testHenry048 self runRegex: #('a[^]b]c' 'a]c' false nil 'adc' true (1 'adc'))! ----- Method: RxMatcherTest>>testHenry049 (in category 'testing-henry') ----- testHenry049 self runRegex: #('[\de]+' '01234' true (1 '01234') '0123e456' true (1 '0123e456') '0123e45g78' true (1 '0123e45'))! ----- Method: RxMatcherTest>>testHenry050 (in category 'testing-henry') ----- testHenry050 self runRegex: #('[e\d]+' "reversal of the above, should be the same" '01234' true (1 '01234') '0123e456' true (1 '0123e456') '0123e45g78' true (1 '0123e45'))! ----- Method: RxMatcherTest>>testHenry051 (in category 'testing-henry') ----- testHenry051 self runRegex: #('[\D]+' '123abc45def78' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry052 (in category 'testing-henry') ----- testHenry052 self runRegex: #('[[:digit:]e]+' '01234' true (1 '01234') '0123e456' true (1 '0123e456') '0123e45g78' true (1 '0123e45'))! ----- Method: RxMatcherTest>>testHenry053 (in category 'testing-henry') ----- testHenry053 self runRegex: #('[\s]+' '2 spaces' true (1 ' '))! ----- Method: RxMatcherTest>>testHenry054 (in category 'testing-henry') ----- testHenry054 self runRegex: #('[\S]+' ' word12!!@#$ ' true (1 'word12!!@#$'))! ----- Method: RxMatcherTest>>testHenry055 (in category 'testing-henry') ----- testHenry055 self runRegex: #('[\w]+' ' foo123bar 45' true (1 'foo123bar'))! ----- Method: RxMatcherTest>>testHenry056 (in category 'testing-henry') ----- testHenry056 self runRegex: #('[\W]+' 'fii234!!@#$34f' true (1 '!!@#$'))! ----- Method: RxMatcherTest>>testHenry057 (in category 'testing-henry') ----- testHenry057 self runRegex: #('[^[:alnum:]]+' 'fii234!!@#$34f' true (1 '!!@#$'))! ----- Method: RxMatcherTest>>testHenry058 (in category 'testing-henry') ----- testHenry058 self runRegex: #('[%&[:alnum:]]+' 'foo%3' true (1 'foo%3') 'foo34&rt4$57a' true (1 'foo34&rt4') '!!@#$' false nil)! ----- Method: RxMatcherTest>>testHenry059 (in category 'testing-henry') ----- testHenry059 self runRegex: #('[[:alpha:]]+' ' 123foo3 ' true (1 'foo') '123foo' true (1 'foo') 'foo1b' true (1 'foo'))! ----- Method: RxMatcherTest>>testHenry060 (in category 'testing-henry') ----- testHenry060 self runRegex: #('[[:cntrl:]]+' ' a 1234asdf' false nil)! ----- Method: RxMatcherTest>>testHenry061 (in category 'testing-henry') ----- testHenry061 self runRegex: #('[[:lower:]]+' 'UPPERlower1234' true (1 'lower') 'lowerUPPER' true (1 'lower'))! ----- Method: RxMatcherTest>>testHenry062 (in category 'testing-henry') ----- testHenry062 self runRegex: #('[[:upper:]]+' 'UPPERlower1234' true (1 'UPPER') 'lowerUPPER ' true (1 'UPPER'))! ----- Method: RxMatcherTest>>testHenry063 (in category 'testing-henry') ----- testHenry063 self runRegex: #('[[:space:]]+' '2 spaces' true (1 ' '))! ----- Method: RxMatcherTest>>testHenry064 (in category 'testing-henry') ----- testHenry064 self runRegex: #('[^[:space:]]+' ' word12!!@#$ ' true (1 'word12!!@#$'))! ----- Method: RxMatcherTest>>testHenry065 (in category 'testing-henry') ----- testHenry065 self runRegex: #('[[:graph:]]+' 'abc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry066 (in category 'testing-henry') ----- testHenry066 self runRegex: #('[[:print:]]+' 'abc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry067 (in category 'testing-henry') ----- testHenry067 self runRegex: #('[^[:punct:]]+' '!!hello,world!!' true (1 'hello'))! ----- Method: RxMatcherTest>>testHenry068 (in category 'testing-henry') ----- testHenry068 self runRegex: #('[[:xdigit:]]+' ' x10FCD ' true (1 '10FCD') ' hgfedcba0123456789ABCDEFGH ' true (1 'fedcba0123456789ABCDEF'))! ----- Method: RxMatcherTest>>testHenry069 (in category 'testing-henry') ----- testHenry069 self runRegex: #('ab|cd' 'abc' true (1 'ab') 'abcd' true (1 'ab'))! ----- Method: RxMatcherTest>>testHenry070 (in category 'testing-henry') ----- testHenry070 self runRegex: #('()ef' 'def' true (1 'ef' 2 ''))! ----- Method: RxMatcherTest>>testHenry071 (in category 'testing-henry') ----- testHenry071 self runRegex: #('()*' nil)! ----- Method: RxMatcherTest>>testHenry072 (in category 'testing-henry') ----- testHenry072 self runRegex: #('*a' nil)! ----- Method: RxMatcherTest>>testHenry073 (in category 'testing-henry') ----- testHenry073 self runRegex: #('^*' nil)! ----- Method: RxMatcherTest>>testHenry074 (in category 'testing-henry') ----- testHenry074 self runRegex: #('$*' nil)! ----- Method: RxMatcherTest>>testHenry075 (in category 'testing-henry') ----- testHenry075 self runRegex: #('(*)b' nil)! ----- Method: RxMatcherTest>>testHenry076 (in category 'testing-henry') ----- testHenry076 self runRegex: #('$b' 'b' false nil)! ----- Method: RxMatcherTest>>testHenry077 (in category 'testing-henry') ----- testHenry077 self runRegex: #('a\' nil)! ----- Method: RxMatcherTest>>testHenry078 (in category 'testing-henry') ----- testHenry078 self runRegex: #('a\(b' 'a(b' true (1 'a(b'))! ----- Method: RxMatcherTest>>testHenry079 (in category 'testing-henry') ----- testHenry079 self runRegex: #('a\(*b' 'ab' true (1 'ab') 'a((b' true (1 'a((b'))! ----- Method: RxMatcherTest>>testHenry080 (in category 'testing-henry') ----- testHenry080 self runRegex: #('a\\b' 'a\b' true (1 'a\b'))! ----- Method: RxMatcherTest>>testHenry081 (in category 'testing-henry') ----- testHenry081 self runRegex: #('abc)' nil)! ----- Method: RxMatcherTest>>testHenry082 (in category 'testing-henry') ----- testHenry082 self runRegex: #('(abc' nil)! ----- Method: RxMatcherTest>>testHenry083 (in category 'testing-henry') ----- testHenry083 self runRegex: #('((a))' 'abc' true (1 'a' 2 'a' 3 'a'))! ----- Method: RxMatcherTest>>testHenry084 (in category 'testing-henry') ----- testHenry084 self runRegex: #('(a)b(c)' 'abc' true (1 'abc' 2 'a' 3 'c'))! ----- Method: RxMatcherTest>>testHenry085 (in category 'testing-henry') ----- testHenry085 self runRegex: #('a+b+c' 'aabbabc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry086 (in category 'testing-henry') ----- testHenry086 self runRegex: #('a**' nil)! ----- Method: RxMatcherTest>>testHenry087 (in category 'testing-henry') ----- testHenry087 self runRegex: #('a*?' nil)! ----- Method: RxMatcherTest>>testHenry088 (in category 'testing-henry') ----- testHenry088 self runRegex: #('(a*)*' nil)! ----- Method: RxMatcherTest>>testHenry089 (in category 'testing-henry') ----- testHenry089 self runRegex: #('(a*)+' nil)! ----- Method: RxMatcherTest>>testHenry090 (in category 'testing-henry') ----- testHenry090 self runRegex: #('(a|)*' nil)! ----- Method: RxMatcherTest>>testHenry091 (in category 'testing-henry') ----- testHenry091 self runRegex: #('(a*|b)*' nil)! ----- Method: RxMatcherTest>>testHenry092 (in category 'testing-henry') ----- testHenry092 self runRegex: #('(a+|b)*' 'ab' true (1 'ab' 2 'b'))! ----- Method: RxMatcherTest>>testHenry093 (in category 'testing-henry') ----- testHenry093 self runRegex: #('(a+|b)+' 'ab' true (1 'ab' 2 'b'))! ----- Method: RxMatcherTest>>testHenry094 (in category 'testing-henry') ----- testHenry094 self runRegex: #('(a+|b)?' 'ab' true (1 'a' 2 'a'))! ----- Method: RxMatcherTest>>testHenry095 (in category 'testing-henry') ----- testHenry095 self runRegex: #('[^ab]*' 'cde' true (1 'cde'))! ----- Method: RxMatcherTest>>testHenry096 (in category 'testing-henry') ----- testHenry096 self runRegex: #('(^)*' nil)! ----- Method: RxMatcherTest>>testHenry097 (in category 'testing-henry') ----- testHenry097 self runRegex: #('(ab|)*' nil)! ----- Method: RxMatcherTest>>testHenry098 (in category 'testing-henry') ----- testHenry098 self runRegex: #(')(' nil)! ----- Method: RxMatcherTest>>testHenry099 (in category 'testing-henry') ----- testHenry099 self runRegex: #('' 'abc' true (1 ''))! ----- Method: RxMatcherTest>>testHenry100 (in category 'testing-henry') ----- testHenry100 self runRegex: #('abc' '' false nil)! ----- Method: RxMatcherTest>>testHenry101 (in category 'testing-henry') ----- testHenry101 self runRegex: #('a*' '' true '')! ----- Method: RxMatcherTest>>testHenry102 (in category 'testing-henry') ----- testHenry102 self runRegex: #('abcd' 'abcd' true (1 'abcd'))! ----- Method: RxMatcherTest>>testHenry103 (in category 'testing-henry') ----- testHenry103 self runRegex: #('a(bc)d' 'abcd' true (1 'abcd' 2 'bc'))! ----- Method: RxMatcherTest>>testHenry104 (in category 'testing-henry') ----- testHenry104 self runRegex: #('([abc])*d' 'abbbcd' true (1 'abbbcd' 2 'c'))! ----- Method: RxMatcherTest>>testHenry105 (in category 'testing-henry') ----- testHenry105 self runRegex: #('([abc])*bcd' 'abcd' true (1 'abcd' 2 'a'))! ----- Method: RxMatcherTest>>testHenry106 (in category 'testing-henry') ----- testHenry106 self runRegex: #('a|b|c|d|e' 'e' true (1 'e'))! ----- Method: RxMatcherTest>>testHenry107 (in category 'testing-henry') ----- testHenry107 self runRegex: #('(a|b|c|d|e)f' 'ef' true (1 'ef' 2 'e')) " ((a*|b))* - c - -"! ----- Method: RxMatcherTest>>testHenry108 (in category 'testing-henry') ----- testHenry108 self runRegex: #('abcd*efg' 'abcdefg' true (1 'abcdefg'))! ----- Method: RxMatcherTest>>testHenry109 (in category 'testing-henry') ----- testHenry109 self runRegex: #('ab*' 'xabyabbbz' true (1 'ab') 'xayabbbz' true (1 'a'))! ----- Method: RxMatcherTest>>testHenry110 (in category 'testing-henry') ----- testHenry110 self runRegex: #('(ab|cd)e' 'abcde' true (1 'cde' 2 'cd'))! ----- Method: RxMatcherTest>>testHenry111 (in category 'testing-henry') ----- testHenry111 self runRegex: #('[abhgefdc]ij' 'hij' true (1 'hij'))! ----- Method: RxMatcherTest>>testHenry112 (in category 'testing-henry') ----- testHenry112 self runRegex: #('^(ab|cd)e' 'abcde' false nil) ! ----- Method: RxMatcherTest>>testHenry113 (in category 'testing-henry') ----- testHenry113 self runRegex: #('(abc|)def' 'abcdef' true nil) ! ----- Method: RxMatcherTest>>testHenry114 (in category 'testing-henry') ----- testHenry114 self runRegex: #('(a|b)c*d' 'abcd' true (1 'bcd' 2 'b')) ! ----- Method: RxMatcherTest>>testHenry115 (in category 'testing-henry') ----- testHenry115 self runRegex: #('(ab|ab*)bc' 'abc' true (1 'abc' 2 'a')) ! ----- Method: RxMatcherTest>>testHenry116 (in category 'testing-henry') ----- testHenry116 self runRegex: #('a([bc]*)c*' 'abc' true (1 'abc' 2 'bc')) ! ----- Method: RxMatcherTest>>testHenry117 (in category 'testing-henry') ----- testHenry117 self runRegex: #('a([bc]*)(c*d)' 'abcd' true (1 'abcd' 2 'bc' 3 'd')) ! ----- Method: RxMatcherTest>>testHenry118 (in category 'testing-henry') ----- testHenry118 self runRegex: #('a([bc]+)(c*d)' 'abcd' true (1 'abcd' 2 'bc' 3 'd')) ! ----- Method: RxMatcherTest>>testHenry119 (in category 'testing-henry') ----- testHenry119 self runRegex: #('a([bc]*)(c+d)' 'abcd' true (1 'abcd' 2 'b' 3 'cd')) ! ----- Method: RxMatcherTest>>testHenry120 (in category 'testing-henry') ----- testHenry120 self runRegex: #('a[bcd]*dcdcde' 'adcdcde' true (1 'adcdcde')) ! ----- Method: RxMatcherTest>>testHenry121 (in category 'testing-henry') ----- testHenry121 self runRegex: #('a[bcd]+dcdcde' 'adcdcde' false nil) ! ----- Method: RxMatcherTest>>testHenry122 (in category 'testing-henry') ----- testHenry122 self runRegex: #('(ab|a)b*c' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry123 (in category 'testing-henry') ----- testHenry123 self runRegex: #('((a)(b)c)(d)' 'abcd' true (1 'abcd' 3 'a' 4 'b' 5 'd')) ! ----- Method: RxMatcherTest>>testHenry124 (in category 'testing-henry') ----- testHenry124 self runRegex: #('[ -~]*' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry125 (in category 'testing-henry') ----- testHenry125 self runRegex: #('[ -~ -~]*' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry126 (in category 'testing-henry') ----- testHenry126 self runRegex: #('[ -~ -~ -~]*' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry127 (in category 'testing-henry') ----- testHenry127 self runRegex: #('[ -~ -~ -~ -~]*' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry128 (in category 'testing-henry') ----- testHenry128 self runRegex: #('[ -~ -~ -~ -~ -~]*' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry129 (in category 'testing-henry') ----- testHenry129 self runRegex: #('[ -~ -~ -~ -~ -~ -~]*' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry130 (in category 'testing-henry') ----- testHenry130 self runRegex: #('[ -~ -~ -~ -~ -~ -~ -~]*' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry131 (in category 'testing-henry') ----- testHenry131 self runRegex: #('[a-zA-Z_][a-zA-Z0-9_]*' 'alpha' true (1 'alpha')) ! ----- Method: RxMatcherTest>>testHenry132 (in category 'testing-henry') ----- testHenry132 self runRegex: #('^a(bc+|b[eh])g|.h$' 'abh' true (1 'bh' 2 nil)) ! ----- Method: RxMatcherTest>>testHenry133 (in category 'testing-henry') ----- testHenry133 self runRegex: #('(bc+d$|ef*g.|h?i(j|k))' 'effgz' true (1 'effgz' 2 'effgz' 3 nil) 'ij' true (1 'ij' 2 'ij' 3 'j') 'effg' false nil 'bcdd' false nil 'reffgz' true (1 'effgz' 2 'effgz' 3 nil))! ----- Method: RxMatcherTest>>testHenry134 (in category 'testing-henry') ----- testHenry134 self runRegex: #('(((((((((a)))))))))' 'a' true (1 'a'))! ----- Method: RxMatcherTest>>testHenry135 (in category 'testing-henry') ----- testHenry135 self runRegex: #('multiple words of text' 'uh-uh' false nil 'multiple words of text, yeah' true (1 'multiple words of text'))! ----- Method: RxMatcherTest>>testHenry136 (in category 'testing-henry') ----- testHenry136 self runRegex: #('(.*)c(.*)' 'abcde' true (1 'abcde' 2 'ab' 3 'de'))! ----- Method: RxMatcherTest>>testHenry137 (in category 'testing-henry') ----- testHenry137 self runRegex: #('\((.*), (.*)\)' '(a, b)' true (2 'a' 3 'b'))! ----- Method: RxMatcherTest>>testMatches (in category 'testing-protocol') ----- testMatches | matcher | matcher := self matcherClass forString: '\w+'. self assert: (matcher matches: 'now'). self deny: (matcher matches: 'now is')! ----- Method: RxMatcherTest>>testMatchesIn (in category 'testing-protocol') ----- testMatchesIn | matcher | matcher := self matcherClass forString: '\w+'. self assert: (matcher matchesIn: 'now is the time') asArray = #('now' 'is' 'the' 'time')! ----- Method: RxMatcherTest>>testMatchesInCollect (in category 'testing-protocol') ----- testMatchesInCollect | matcher | matcher := self matcherClass forString: '\w+'. self assert: (matcher matchesIn: 'now is the time' collect: [ :each | each reversed ]) asArray = #('won' 'si' 'eht' 'emit')! ----- Method: RxMatcherTest>>testMatchesInDo (in category 'testing-protocol') ----- testMatchesInDo | matcher expected | matcher := self matcherClass forString: '\w+'. expected := #('now' 'is' 'the' 'time') asOrderedCollection. matcher matchesIn: 'now is the time' do: [ :each | self assert: each = expected removeFirst ]. self assert: expected isEmpty! ----- Method: RxMatcherTest>>testMatchesOnStream (in category 'testing-protocol') ----- testMatchesOnStream | matcher | matcher := self matcherClass forString: '\w+'. self assert: (matcher matchesOnStream: 'now is the time' readStream) asArray = #('now' 'is' 'the' 'time')! ----- Method: RxMatcherTest>>testMatchesOnStreamCollect (in category 'testing-protocol') ----- testMatchesOnStreamCollect | matcher | matcher := self matcherClass forString: '\w+'. self assert: (matcher matchesOnStream: 'now is the time' readStream collect: [ :each | each reversed ]) asArray = #('won' 'si' 'eht' 'emit')! ----- Method: RxMatcherTest>>testMatchesOnStreamDo (in category 'testing-protocol') ----- testMatchesOnStreamDo | matcher expected | matcher := self matcherClass forString: '\w+'. expected := #('now' 'is' 'the' 'time') asOrderedCollection. matcher matchesOnStream: 'now is the time' readStream do: [ :each | self assert: each = expected removeFirst ]. self assert: expected isEmpty! ----- Method: RxMatcherTest>>testMatchesStream (in category 'testing-protocol') ----- testMatchesStream | matcher | matcher := self matcherClass forString: '\w+'. self assert: (matcher matchesStream: 'now' readStream). self deny: (matcher matchesStream: 'now is' readStream)! ----- Method: RxMatcherTest>>testMatchingRangesIn (in category 'testing-protocol') ----- testMatchingRangesIn | matcher expected | matcher := self matcherClass forString: '\w+'. expected := #(1 3 5 6 8 10 12 15) asOrderedCollection. (matcher matchingRangesIn: 'now is the time') do: [ :range | self assert: range first = expected removeFirst. self assert: range last = expected removeFirst ]. self assert: expected isEmpty! ----- Method: RxMatcherTest>>testRegex001 (in category 'testing') ----- testRegex001 self runRegex: #('^.*$' '' true (1 '') 'a' true (1 'a') 'abc' true (1 'abc'))! ----- Method: RxMatcherTest>>testRegex002 (in category 'testing') ----- testRegex002 self runRegex: #('a\w+c' ' abb_bbc ' true (1 'abb_bbc') 'abb-bc' false nil)! ----- Method: RxMatcherTest>>testRegex003 (in category 'testing') ----- testRegex003 self runRegex: #('a\W+c' ' abb_bbc ' false nil 'abb-bc' false nil 'a.,:;-&!!"#%/()={[]}+?\~*''c' true (1 'a.,:;-&!!"#%/()={[]}+?\~*''c'))! ----- Method: RxMatcherTest>>testRegex004 (in category 'testing') ----- testRegex004 self runRegex: #(':isVowel:' 'aei' true nil 'xyz' false nil)! ----- Method: RxMatcherTest>>testStringAllRangesOfRegexMatches (in category 'testing-extensions') ----- testStringAllRangesOfRegexMatches | result | result := 'aabbcc' allRangesOfRegexMatches: 'b+'. self assert: result size = 1. self assert: result first first = 3. self assert: result first last = 4 ! ----- Method: RxMatcherTest>>testStringAllRegexMatches (in category 'testing-extensions') ----- testStringAllRegexMatches | result | result := 'aabbcc' allRegexMatches: 'b+'. self assert: result size = 1. self assert: result first = 'bb'! ----- Method: RxMatcherTest>>testStringAsRegex (in category 'testing-extensions') ----- testStringAsRegex self assert: 'b+' asRegex class = RxParser preferredMatcherClass! ----- Method: RxMatcherTest>>testStringAsRegexIgnoringCase (in category 'testing-extensions') ----- testStringAsRegexIgnoringCase self assert: 'b+' asRegexIgnoringCase class = RxParser preferredMatcherClass! ----- Method: RxMatcherTest>>testStringCopyWithRegexMatchesReplacedWith (in category 'testing-extensions') ----- testStringCopyWithRegexMatchesReplacedWith self assert: ('aabbcc' copyWithRegex: 'b+' matchesReplacedWith: 'X') = 'aaXcc'! ----- Method: RxMatcherTest>>testStringCopyWithRegexMatchesTranslatedUsing (in category 'testing-extensions') ----- testStringCopyWithRegexMatchesTranslatedUsing self assert: ('aabbcc' copyWithRegex: 'b+' matchesTranslatedUsing: [ :each | self assert: each = 'bb'. 'X' ]) = 'aaXcc'! ----- Method: RxMatcherTest>>testStringMatchesRegex (in category 'testing-extensions') ----- testStringMatchesRegex self deny: ('aabbcc' matchesRegex: 'a+'). self deny: ('aabbcc' matchesRegex: 'b+c+'). self assert: ('aabbcc' matchesRegex: 'a+b+c+')! ----- Method: RxMatcherTest>>testStringMatchesRegexIgnoringCase (in category 'testing-extensions') ----- testStringMatchesRegexIgnoringCase self deny: ('AABBCC' matchesRegexIgnoringCase: 'a+'). self deny: ('AABBCC' matchesRegexIgnoringCase: 'b+c+'). self assert: ('AABBCC' matchesRegexIgnoringCase: 'a+b+c+')! ----- Method: RxMatcherTest>>testStringPrefixMatchesRegex (in category 'testing-extensions') ----- testStringPrefixMatchesRegex self assert: ('aabbcc' prefixMatchesRegex: 'a+'). self deny: ('aabbcc' prefixMatchesRegex: 'b+')! ----- Method: RxMatcherTest>>testStringPrefixMatchesRegexIgnoringCase (in category 'testing-extensions') ----- testStringPrefixMatchesRegexIgnoringCase self assert: ('AABBCC' prefixMatchesRegexIgnoringCase: 'a+'). self deny: ('AABBCC' prefixMatchesRegexIgnoringCase: 'b+')! ----- Method: RxMatcherTest>>testStringRegexMatchesCollect (in category 'testing-extensions') ----- testStringRegexMatchesCollect | result | result := 'aabbcc' regex: 'b+' matchesCollect: [ :each | each asUppercase ]. self assert: result size = 1. self assert: result first = 'BB'! ----- Method: RxMatcherTest>>testStringRegexMatchesDo (in category 'testing-extensions') ----- testStringRegexMatchesDo | result | result := OrderedCollection new. 'aabbcc' regex: 'b+' matchesDo: [ :each | result add: each ]. self assert: result size = 1. self assert: result first = 'bb'! ----- Method: RxMatcherTest>>testSubexpressionCount (in category 'testing-protocol') ----- testSubexpressionCount | matcher | #(('a' 1) ('a(b)' 2) ('a(b(c))' 3) ('(a)(b)' 3) ('(a(b))*' 3)) do: [ :pair | matcher := self matcherClass forString: pair first. matcher supportsSubexpressions ifTrue: [ self assert: matcher subexpressionCount = pair last ] ]! TestCase subclass: #RxParserTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Regex-Tests-Core'! !RxParserTest commentStamp: 'Tbn 11/12/2010 22:31' prior: 0! This class provides tests for the regular expression parser.! ----- Method: RxParserTest>>DoesNotWorktestBackQuotesEscape (in category 'tests') ----- DoesNotWorktestBackQuotesEscape "self debug: #testBackQuotesEscape" "Regular expressions can also include the following backquote escapes to refer to popular classes of characters: \w any word constituent character (same as [a-zA-Z0-9:=]) \W any character but a word constituent \d a digit (same as [0-9]) \D anything but a digit \s a whitespace character \S anything but a whitespace character These escapes are also allowed in character classes: '[\w+-]' means 'any character that is either a word constituent, or a plus, or a minus'." self assert: ('one word' matchesRegex: '\w'). self assert: ('one' matchesRegex: '\w'). ! ----- Method: RxParserTest>>test (in category 'tests') ----- test "self debug: #test" self assert: ('\>testCadrMatching (in category 'tests') ----- testCadrMatching "self debug: #testCadrMatching" "A bit more complex example is the following expression, matching the name of any of the Lisp-style `car', `cdr', `caar', `cadr', ... functions:" self assert: ( 'car' matchesRegex: 'c(a|d)+r'). self assert: ( 'cdr' matchesRegex: 'c(a|d)+r'). self assert: ( 'caar' matchesRegex: 'c(a|d)+r'). self assert: ( 'cadr' matchesRegex: 'c(a|d)+r'). self assert: ( 'caddar' matchesRegex: 'c(a|d)+r').! ----- Method: RxParserTest>>testCharacterSet (in category 'tests') ----- testCharacterSet "self debug: #testCharacterSet" "So far, we have used only characters as the 'smallest' components of regular expressions. There are other, more `interesting', components. A character set is a string of characters enclosed in square brackets. It matches any single character if it appears between the brackets. For example, `[01]' matches either `0' or `1':" self assert: ('0' matchesRegex: '[01]'). self deny: ('3' matchesRegex: '[01]'). self deny: ('11' matchesRegex: '[01]'). "-- false: a set matches only one character" self deny: ('01' matchesRegex: '[01]'). ! ----- Method: RxParserTest>>testCharacterSetBinaryNumber (in category 'tests') ----- testCharacterSetBinaryNumber "self debug: #testCharacterSetBinaryNumber" "Using plus operator, we can build the following binary number recognizer:" self assert: ('10010100' matchesRegex: '[01]+'). self deny: ('10001210' matchesRegex: '[01]+') ! ----- Method: RxParserTest>>testCharacterSetInversion (in category 'tests') ----- testCharacterSetInversion "self debug: #testCharacterSetInversion" "If the first character after the opening bracket is `^', the set is inverted: it matches any single character *not* appearing between the brackets:" self deny: ('0' matchesRegex: '[^01]'). "0 appears in 01 so there is no match" self assert: ('3' matchesRegex: '[^01]'). "3 is not in 01 so it matches" self deny: ('30' matchesRegex: '[^01]'). self deny: ('33333333333333333333333330' matchesRegex: '[^01]'). "there is one zero so it does not match"! ----- Method: RxParserTest>>testCharacterSetRange (in category 'tests') ----- testCharacterSetRange "self debug: #testCharacterSetRange" "For convenience, a set may include ranges: pairs of characters separated with `-'. This is equivalent to listing all characters between them: `[0-9]' is the same as `[0123456789]'. " self assert: ('0' matchesRegex: '[0-9]'). self assert: ('9' matchesRegex: '[0-9]'). self deny: ('a' matchesRegex: '[0-9]'). self deny: ('01' matchesRegex: '[0-9]'). self assert: ('01442128629839374565' matchesRegex: '[0-9]+'). ! ----- Method: RxParserTest>>testLookaround (in category 'tests') ----- testLookaround self assert: ('A' matchesRegex: '(?!!ABC).*'). self assert: ('AB' matchesRegex: '(?!!ABC).*'). self deny: ('ABC' matchesRegex: '(?!!ABC).*').! ----- Method: RxParserTest>>testMatchesInwW (in category 'tests') ----- testMatchesInwW "self debug: #testMatchesInwW" "1. Backslash escapes similar to those in Perl are allowed in patterns: \w any word constituent character (equivalent to [a-zA-Z0-9:=]) \W any character but a word constituent (equivalent to [^a-xA-Z0-9:=]" self assert: ('\w+' asRegex matchesIn: 'now is the time') asArray = #('now' 'is' 'the' 'time'). self assert: ('\W+' asRegex matchesIn: 'now is the time') asArray = #(' ' ' ' ' '). "why do we get that" self assert: ('\w' asRegex matchesIn: 'now') asArray = #('n' 'o' 'w').! ----- Method: RxParserTest>>testOrOperator (in category 'tests') ----- testOrOperator "self debug: #testOrOperator" "The last operator is `|' meaning `or'. It is placed between two regular expressions, and the resulting expression matches if one of the expressions matches. It has the lowest possible precedence (lower than sequencing). For example, `ab*|ba*' means `a followed by any number of b's, or b followed by any number of a's':" self assert: ('abb' matchesRegex: 'ab*|ba*'). self assert: ('baa' matchesRegex: 'ab*|ba*'). self deny: ('baab' matchesRegex: 'ab*|ba*'). "It is possible to write an expression matching an empty string, for example: `a|'. However, it is an error to apply `*', `+', or `?' to such expression: `(a|)*' is an invalid expression." self should: ['(a|)*' asRegex] raise: Error. ! ----- Method: RxParserTest>>testQuantifier (in category 'tests') ----- testQuantifier self deny: ('' matchesRegex: 'a{2}'). self deny: ('a' matchesRegex: 'a{2}'). self assert: ('aa' matchesRegex: 'a{2}'). self deny: ('aaa' matchesRegex: 'a{2}'). self deny: ('' matchesRegex: 'a{2,3}'). self deny: ('a' matchesRegex: 'a{2,3}'). self assert: ('aa' matchesRegex: 'a{2,3}'). self assert: ('aaa' matchesRegex: 'a{2,3}'). self deny: ('aaaa' matchesRegex: 'a{2,3}'). self deny: ('' matchesRegex: 'a{2,}'). self deny: ('a' matchesRegex: 'a{2,}'). self assert: ('aa' matchesRegex: 'a{2,}'). self assert: ('aaa' matchesRegex: 'a{2,}'). self assert: ('aaaa' matchesRegex: 'a{2,}'). self assert: ('' matchesRegex: 'a{,3}'). self assert: ('a' matchesRegex: 'a{,3}'). self assert: ('aa' matchesRegex: 'a{,3}'). self assert: ('aaa' matchesRegex: 'a{,3}'). self deny: ('aaaa' matchesRegex: 'a{,3}').! ----- Method: RxParserTest>>testQuantifierSimple (in category 'tests') ----- testQuantifierSimple "Test quantifier expressions that can be expressed with + or *" self assert: ('a' matchesRegex: 'a{1}'). self deny: ('aa' matchesRegex: 'a{1}'). self assert: ('a' matchesRegex: 'a{1,1}'). self deny: ('aa' matchesRegex: 'a{1,1}'). self assert: ('ab' matchesRegex: '(ab){1,}'). self assert: ('abab' matchesRegex: '(ab){1,}'). self deny: ('' matchesRegex: '(ab){1,}'). self assert: ('ab' matchesRegex: '(ab){,1}'). self assert: ('' matchesRegex: '(ab){,1}'). self deny: ('abab' matchesRegex: '(ab){,1}').! ----- Method: RxParserTest>>testQuotingOperators (in category 'tests') ----- testQuotingOperators "self debug: #testQuotingOperators" "As we have seen, characters `*', `+', `?', `(', and `)' have special meaning in regular expressions. If one of them is to be used literally, it should be quoted: preceded with a backslash. (Thus, backslash is also special character, and needs to be quoted for a literal match--as well as any other special character described further)." self deny: ('ab*' matchesRegex: 'ab*'). " -- false: star in the right string is special" self assert: ('ab*' matchesRegex: 'ab\*'). self assert: ('a\c' matchesRegex: 'a\\c'). ! ----- Method: RxParserTest>>testSimpleMatchesRegex (in category 'tests') ----- testSimpleMatchesRegex "self debug: #testSimpleMatchesRegex" "The simplest regular expression is a single character. It matches exactly that character. A sequence of characters matches a string with exactly the same sequence of characters:" self assert: ('a' matchesRegex: 'a'). self assert: ('foobar' matchesRegex: 'foobar') . self deny: ('blorple' matchesRegex: 'foobar')! ----- Method: RxParserTest>>testSimpleMatchesRegexWithStar (in category 'tests') ----- testSimpleMatchesRegexWithStar "self debug: #testSimpleMatchesRegexWithStar" "The above paragraph in testSimpleMatchesRegex introduced a primitive regular expression (a character), and an operator (sequencing). Operators are applied to regular expressions to produce more complex regular expressions. Sequencing (placing expressions one after another) as an operator is, in a certain sense, `invisible'--yet it is arguably the most common. A more `visible' operator is Kleene closure, more often simply referred to as `a star'. A regular expression followed by an asterisk matches any number (including 0) of matches of the original expression. For example:" self assert: ('ab' matchesRegex: 'a*b'). self assert: ('aaaaab' matchesRegex: 'a*b'). self assert: ('b' matchesRegex: 'a*b'). self deny: ('aac' matchesRegex: 'a*b'). ! ----- Method: RxParserTest>>testSpecialCharacterInSetRange (in category 'tests') ----- testSpecialCharacterInSetRange "self debug: #testSpecialCharacterInSetRange" "Special characters within a set are `^', `-', and `]' that closes the set. Below are the examples of how to literally use them in a set: [01^] -- put the caret anywhere except the beginning [01-] -- put the dash as the last character []01] -- put the closing bracket as the first character [^]01] (thus, empty and universal sets cannot be specified)" self assert: ('0' matchesRegex: '[01^]'). self assert: ('1' matchesRegex: '[01^]'). self assert: ('^' matchesRegex: '[01^]'). self deny: ('0' matchesRegex: '[^01]'). self deny: ('1' matchesRegex: '[^01]'). "[^abc] means that everything except abc is matche" self assert: ('^' matchesRegex: '[^01]'). ! ----- Method: RxParserTest>>testStarPlusQuestionMark (in category 'tests') ----- testStarPlusQuestionMark "self debug: #testStarPlusQuestionMark" "Two other operators similar to `*' are `+' and `?'. `+' (positive closure, or simply `plus') matches one or more occurrences of the original expression. `?' (`optional') matches zero or one, but never more, occurrences." self assert: ('ac' matchesRegex: 'ab*c'). self deny: ('ac' matchesRegex: 'ab+c'). "-- false: need at least one b" self assert: ('abbc' matchesRegex: 'ab+c'). self assert: ('abbbbbbc' matchesRegex: 'ab+c'). self deny: ('abbc' matchesRegex: 'ab?c') "-- false: too many b's"! ----- Method: RxParserTest>>testStarPrecedence (in category 'tests') ----- testStarPrecedence "self debug: #testStarPrecedence" "A star's precedence is higher than that of sequencing. A star applies to the shortest possible subexpression that precedes it. For example, 'ab*' means `a followed by zero or more occurrences of b', not `zero or more occurrences of ab':" self assert: ('abbb' matchesRegex: 'ab*'). self deny: ('abab' matchesRegex: 'ab*'). "To actually make a regex matching `zero or more occurrences of ab', `ab' is enclosed in parentheses:" self assert: ('abab' matchesRegex: '(ab)*'). self deny: ('abcab' matchesRegex: '(ab)*')! ----- Method: RxParserTest>>testTranslatingMatchesUsing (in category 'tests') ----- testTranslatingMatchesUsing "self debug: #testTranslatingMatchesUsing" self assert: ('\>toDotestSpecialCharacterInSetRange (in category 'tests') ----- toDotestSpecialCharacterInSetRange "self debug: #testSpecialCharacterInSetRange" "Special characters within a set are `^', `-', and `]' that closes the set. Below are the examples of how to literally use them in a set: [01^] -- put the caret anywhere except the beginning [01-] -- put the dash as the last character []01] -- put the closing bracket as the first character [^]01] (thus, empty and universal sets cannot be specified)" self assert: ('0' matchesRegex: '[01^]'). self assert: ('0' matchesRegex: '[0-9]'). ! From commits at source.squeak.org Wed Aug 12 21:25:33 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Aug 12 21:25:35 2015 Subject: [squeak-dev] The Inbox: Collections-ul.640.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Inbox: http://source.squeak.org/inbox/Collections-ul.640.mcz ==================== Summary ==================== Name: Collections-ul.640 Author: ul Time: 12 August 2015, 10:35:29.572 pm UUID: 1065564d-36c5-43a1-842b-3be19ce91a3e Ancestors: Collections-cmm.639 Character: - sped up various methods by storing and reusing the result of #asInteger in a temporary variable. - sped up #isSeparator by eliminating the last branch. Swapped the tab and cr checks, because source code has more tabs than crs. - unified methods with mixed #asInteger and #asciiValue sends - #isAscii uses #< instead of #between:and:, like #isOctetCharacter does. - #asUnicode uses the same shortcut as #encodedCharSet does - quick return in #printOn: and #storeOn: String: - added identity check (should help with Text comparison) and quick returns to #= - spaceship operator uses #compare: if the argument is a string - added a fast #asSignedInteger implementation Text: - removed the identity check from Text >> #=, because String >> #= does it - the spaceship operator uses String's spaceship operator =============== Diff against Collections-cmm.639 =============== Item was changed: ----- Method: Character>>< (in category 'comparing') ----- < aCharacter "Answer true if the receiver's value < aCharacter's value." + ^self asInteger < aCharacter asInteger! - ^self asInteger < aCharacter asciiValue! Item was changed: ----- Method: Character>><= (in category 'comparing') ----- <= aCharacter "Answer true if the receiver's value <= aCharacter's value." + ^self asInteger <= aCharacter asInteger! - ^self asInteger <= aCharacter asciiValue! Item was changed: ----- Method: Character>>> (in category 'comparing') ----- > aCharacter "Answer true if the receiver's value > aCharacter's value." + ^self asInteger > aCharacter asInteger! - ^self asInteger > aCharacter asciiValue! Item was changed: ----- Method: Character>>>= (in category 'comparing') ----- >= aCharacter "Answer true if the receiver's value >= aCharacter's value." + ^self asInteger >= aCharacter asInteger! - ^self asInteger >= aCharacter asciiValue! Item was changed: ----- Method: Character>>asLowercase (in category 'converting') ----- asLowercase "Answer the receiver's matching lowercase Character." + | integerValue | + (integerValue := self asInteger) > 255 ifFalse: [ - self asInteger > 255 ifFalse: [ | result | + (result := (ClassificationTable at: integerValue + 1) bitAnd: 16rFF) > 0 - (result := (ClassificationTable at: self asInteger + 1) bitAnd: 16rFF) > 0 ifTrue: [ ^self class value: result ] ]. + ^self class value: (self encodedCharSet toLowercaseCode: integerValue)! - ^self class value: (self encodedCharSet toLowercaseCode: self asInteger)! Item was changed: ----- Method: Character>>asUnicode (in category 'converting') ----- asUnicode "Answer the unicode encoding of the receiver" + + | integerValue | + (integerValue := self asInteger) <= 16r3FFFFF ifTrue: [ ^integerValue ]. + ^self encodedCharSet charsetClass convertToUnicode: (integerValue bitAnd: 16r3FFFFF) - self leadingChar = 0 ifTrue: [^ self asInteger]. - ^self encodedCharSet charsetClass convertToUnicode: self charCode ! Item was changed: ----- Method: Character>>asUppercase (in category 'converting') ----- asUppercase "Answer the receiver's matching uppercase Character." + | integerValue | + (integerValue := self asInteger) > 255 ifFalse: [ - self asInteger > 255 ifFalse: [ | result | + (result := ((ClassificationTable at: integerValue + 1) bitShift: -8) bitAnd: 16rFF) > 0 - (result := ((ClassificationTable at: self asInteger + 1) bitShift: -8) bitAnd: 16rFF) > 0 ifTrue: [ ^self class value: result ] ]. + ^self class value: (self encodedCharSet toUppercaseCode: integerValue)! - ^self class value: (self encodedCharSet toUppercaseCode: self asInteger)! Item was changed: ----- Method: Character>>digitValue (in category 'accessing') ----- digitValue "Answer 0-9 if the receiver is $0-$9, 10-35 if it is $A-$Z, and < 0 otherwise. This is used to parse literal numbers of radix 2-36." + | integerValue | + (integerValue := self asInteger) > 16rFF ifTrue: [^self encodedCharSet digitValueOf: self]. + ^DigitValues at: integerValue + 1! - self asInteger > 16rFF ifTrue: [^self encodedCharSet digitValueOf: self]. - ^DigitValues at: 1 + self asInteger! Item was changed: ----- Method: Character>>isAlphaNumeric (in category 'testing') ----- isAlphaNumeric "Answer whether the receiver is a letter or a digit." + | integerValue | + (integerValue := self asInteger) > 255 ifFalse: [ + ^((ClassificationTable at: integerValue + 1) bitAnd: AlphaNumericMask) > 0 ]. - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self asInteger + 1) bitAnd: AlphaNumericMask) > 0 ]. ^self encodedCharSet isAlphaNumeric: self! Item was changed: ----- Method: Character>>isAscii (in category 'testing') ----- isAscii + + ^self asInteger < 128! - ^ self asInteger between: 0 and: 127! Item was changed: ----- Method: Character>>isDigit (in category 'testing') ----- isDigit + | integerValue | + (integerValue := self asInteger) > 255 ifFalse: [ + ^((ClassificationTable at: integerValue + 1) bitAnd: DigitBit) > 0 ]. - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self asInteger + 1) bitAnd: DigitBit) > 0 ]. ^self encodedCharSet isDigit: self. ! Item was changed: ----- Method: Character>>isLetter (in category 'testing') ----- isLetter + | integerValue | + (integerValue := self asInteger) > 255 ifFalse: [ + ^((ClassificationTable at: integerValue + 1) bitAnd: LetterMask) > 0 ]. - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self asInteger + 1) bitAnd: LetterMask) > 0 ]. ^self encodedCharSet isLetter: self! Item was changed: ----- Method: Character>>isLowercase (in category 'testing') ----- isLowercase + | integerValue | + (integerValue := self asInteger) > 255 ifFalse: [ + ^((ClassificationTable at: integerValue + 1) bitAnd: LowercaseBit) > 0 ]. - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self asInteger + 1) bitAnd: LowercaseBit) > 0 ]. ^self encodedCharSet isLowercase: self. ! Item was changed: ----- Method: Character>>isSeparator (in category 'testing') ----- isSeparator "Answer whether the receiver is one of the separator characters--space, cr, tab, line feed, or form feed." + | integerValue | + (integerValue := self asInteger) = 32 ifTrue: [ ^true ]. "space" + integerValue = 9 ifTrue: [ ^true ]. "tab" + integerValue = 13 ifTrue: [ ^true ]. "cr" + integerValue = 10 ifTrue: [ ^true ]. "line feed" + ^integerValue = 12 "form feed"! - self asInteger = 32 ifTrue: [^true]. "space" - self asInteger = 13 ifTrue: [^true]. "cr" - self asInteger = 9 ifTrue: [^true]. "tab" - self asInteger = 10 ifTrue: [^true]. "line feed" - self asInteger = 12 ifTrue: [^true]. "form feed" - ^false! Item was changed: ----- Method: Character>>isUppercase (in category 'testing') ----- isUppercase + | integerValue | + (integerValue := self asInteger) > 255 ifFalse: [ + ^((ClassificationTable at: integerValue + 1) bitAnd: UppercaseBit) > 0 ]. - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self asInteger + 1) bitAnd: UppercaseBit) > 0 ]. ^self encodedCharSet isUppercase: self. ! Item was changed: ----- Method: Character>>printOn: (in category 'printing') ----- printOn: aStream + + | integerValue | + ((integerValue := self asInteger) > 32 and: [ integerValue ~= 127 ]) ifTrue: [ + aStream nextPut: $$; nextPut: self. + ^self ]. + (self class constantNameFor: self) + ifNotNil: [ :name | aStream nextPutAll: self class name; space; nextPutAll: name ] + ifNil: [ aStream nextPutAll: self class name; nextPutAll: ' value: '; print: integerValue ]! - | name | - (self asInteger > 32 and: [self asInteger ~= 127]) - ifTrue: [ aStream nextPut: $$; nextPut: self ] - ifFalse: [ - name := self class constantNameFor: self. - name notNil - ifTrue: [ aStream nextPutAll: self class name; space; nextPutAll: name ] - ifFalse: [ aStream nextPutAll: self class name; nextPutAll: ' value: '; print: self asInteger ] ].! Item was changed: ----- Method: Character>>shouldBePrintedAsLiteral (in category 'testing') ----- shouldBePrintedAsLiteral + | integerValue | + ^((integerValue := self asInteger) between: 33 and: 255) and: [self asInteger ~= 127]! - ^(self asInteger between: 33 and: 255) and: [self asInteger ~= 127]! Item was changed: ----- Method: Character>>storeBinaryOn: (in category 'printing') ----- storeBinaryOn: aStream "Store the receiver on a binary (file) stream" + | integerValue | + (integerValue := self asInteger) < 256 - self asInteger < 256 ifTrue: [ aStream basicNextPut: self ] + ifFalse: [ aStream nextInt32Put: integerValue ]! - ifFalse: [ aStream nextInt32Put: self asInteger ]! Item was changed: ----- Method: Character>>storeDataOn: (in category 'object fileIn') ----- storeDataOn: aDataStream " Store characters in reference-like way, with value like instvar. This is compatible with various Squeak Memory Systems" aDataStream beginInstance: self class + size: 1; + nextPut: self asInteger! - size: 1. - aDataStream nextPut: self asInteger.! Item was changed: ----- Method: Character>>storeOn: (in category 'printing') ----- storeOn: aStream "Common character literals are preceded by '$', however special need to be encoded differently: for some this might be done by using one of the shortcut constructor methods for the rest we have to create them by ascii-value." + self shouldBePrintedAsLiteral ifTrue: [ + aStream nextPut: $$; nextPut: self. + ^self ]. + (self class constantNameFor: self) ifNotNil: [ :name | + aStream nextPutAll: self class name; space; nextPutAll: name. + ^self ]. + aStream + nextPut: $(; nextPutAll: self class name; + nextPutAll: ' value: '; print: self asInteger; nextPut: $)! - | name | - self shouldBePrintedAsLiteral - ifTrue: [ aStream nextPut: $$; nextPut: self ] - ifFalse: [ - name := self class constantNameFor: self. - name notNil - ifTrue: [ aStream nextPutAll: self class name; space; nextPutAll: name ] - ifFalse: [ - aStream - nextPut: $(; nextPutAll: self class name; - nextPutAll: ' value: '; print: self asInteger; nextPut: $) ] ].! Item was changed: ----- Method: CharacterSet>>includes: (in category 'collection ops') ----- includes: aCharacter + + | index | + (index := aCharacter asInteger + 1) > 256 ifTrue: [ ^false ]. + ^(map at: index) > 0! - aCharacter asciiValue >= 256 - ifTrue: ["Guard against wide characters" - ^false]. - ^(map at: aCharacter asciiValue + 1) > 0! Item was changed: ----- Method: String>><=> (in category 'sorting') ----- <=> aCharacterArray "Return a collation order of -1, 0, or 1, indicating whether I should be collated before the receiver, am equal, or after. See also: http://en.wikipedia.org/wiki/Spaceship_operator" + aCharacterArray isString ifTrue: [ ^(self compare: aCharacterArray) - 2 ]. + self = aCharacterArray ifTrue: [ ^0 ]. + self < aCharacterArray ifTrue: [ ^-1 ]. + ^1! - ^self = aCharacterArray - ifTrue: [ 0 ] - ifFalse: [self < aCharacterArray - ifTrue: [ -1 ] - ifFalse: [ 1 ]]! Item was changed: ----- Method: String>>= (in category 'comparing') ----- = aString "Answer whether the receiver sorts equally as aString. The collation order is simple ascii (with case differences)." + self == aString ifTrue: [ ^true ]. + aString isString ifFalse: [ ^false ]. + self size = aString size ifFalse: [ ^false ]. - (aString isString - and: [self size = aString size]) ifFalse: [^ false]. ^ (self compare: self with: aString collated: AsciiOrder) = 2! Item was changed: ----- Method: String>>asSignedInteger (in category 'converting') ----- asSignedInteger "Returns the first signed integer it can find or nil." + | result character index negative | + (self at: 1) isDigit + ifTrue: [ index := 1 ] + ifFalse: [ + index := self findFirst: [ :char | char isDigit ]. + index = 0 ifTrue: [ ^nil ] ]. + negative := index > 1 and: [ (self at: index - 1) == $- ]. + result := 0. + [ index <= self size and: [ (character := self at: index) isDigit ] ] whileTrue: [ + result := result * 10 + character asciiValue - 48 "$0 asciiValue". + index := index + 1 ]. + negative ifTrue: [ ^0 - result ]. + ^result + ! - | start | - start := self findFirst: [:char | char isDigit]. - start isZero ifTrue: [^ nil]. - (start > 1 and: [self at: start - 1]) = $- ifTrue: [start := start - 1]. - ^ Integer readFrom: (ReadStream on: self from: start to: self size)! Item was changed: ----- Method: Text>><=> (in category 'sorting') ----- <=> aCharacterArray "Return a collation order of -1, 0, or 1, indicating whether I should be collated before the receiver, am equal, or after. See also: http://en.wikipedia.org/wiki/Spaceship_operator" + aCharacterArray isString ifTrue: [ ^string <=> aCharacterArray ]. + ^string <=> aCharacterArray asString! - ^string = aCharacterArray - ifTrue: [ 0 ] - ifFalse: [string < aCharacterArray asString - ifTrue: [ -1 ] - ifFalse: [ 1 ]]! Item was changed: ----- Method: Text>>= (in category 'comparing') ----- = other "Am I equal to the other Text or String? ***** Warning ***** Two Texts are considered equal if they have the same characters in them. They might have completely different emphasis, fonts, sizes, text actions, or embedded morphs. If you need to find out if one is a true copy of the other, you must do (text1 = text2 and: [text1 runs = text2 runs])." + other isText ifTrue: [ ^string = other string ]. + other isString ifTrue: [ ^string = other ]. + ^false! - other isText ifTrue: ["This is designed to run fast even for megabytes" - ^ string == other string or: [string = other string]]. - other isString ifTrue: [^ string == other or: [string = other]]. - ^ false! From commits at source.squeak.org Wed Aug 12 21:25:42 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Aug 12 21:25:43 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.939.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.939.mcz ==================== Summary ==================== Name: Kernel-ul.939 Author: ul Time: 12 August 2015, 10:38:42.576 pm UUID: 6595484c-9c41-45fe-82f3-c689f7ddffa8 Ancestors: Kernel-eem.938 - Magnitude's spaceship operator uses quick returns. - Number >> #raisedTo: uses #negative and #isZero, which is faster for LargeIntegers than pure comparison with SmallIntegers. - faster #primesUpTo:do:, and #largePrimesUpTo:do: =============== Diff against Kernel-eem.938 =============== Item was changed: ----- Method: Integer class>>largePrimesUpTo:do: (in category 'prime numbers') ----- largePrimesUpTo: max do: aBlock "Evaluate aBlock with all primes up to maxValue. The Algorithm is adapted from http://www.rsok.com/~jrm/printprimes.html It encodes prime numbers much more compactly than #primesUpTo: 38.5 integer per byte (2310 numbers per 60 byte) allow for some fun large primes. (all primes up to SmallInteger maxVal can be computed within ~27MB of memory; + the regular #primesUpTo: would require one *GIGA*byte). - the regular #primesUpTo: would require 4 *GIGA*bytes). Note: The algorithm could be re-written to produce the first primes (which require the longest time to sieve) faster but only at the cost of clarity." + | n limit flags maskBitIndex bitIndex maskBit byteIndex index primesUpTo2310 indexLimit increments incrementIndex | - | limit flags maskBitIndex bitIndex maskBit byteIndex index primesUpTo2310 indexLimit | limit := max asInteger - 1. indexLimit := max asInteger sqrtFloor + 1. "Create the array of flags." flags := ByteArray new: (limit + 2309) // 2310 * 60 + 60. flags atAllPut: 16rFF. "set all to true" "Compute the primes up to 2310" primesUpTo2310 := self primesUpTo: 2310. "Create a mapping from 2310 integers to 480 bits (60 byte)" maskBitIndex := Array new: 2310. bitIndex := -1. "for pre-increment" maskBitIndex at: 1 put: (bitIndex := bitIndex + 1). maskBitIndex at: 2 put: (bitIndex := bitIndex + 1). + index := 1. + [ index <= 5 ] whileTrue: [ + aBlock value: (primesUpTo2310 at: index). + index := index + 1 ]. + + n := 2. + [ n <= 2309 ] whileTrue: [ - 1 to: 5 do:[:i| aBlock value: (primesUpTo2310 at: i)]. - - index := 6. - 2 to: 2309 do:[:n| [(primesUpTo2310 at: index) < n] whileTrue:[index := index + 1]. n = (primesUpTo2310 at: index) ifTrue:[ maskBitIndex at: n+1 put: (bitIndex := bitIndex + 1). ] ifFalse:[ "if modulo any of the prime factors of 2310, then could not be prime" (n \\ 2 = 0 or:[n \\ 3 = 0 or:[n \\ 5 = 0 or:[n \\ 7 = 0 or:[n \\ 11 = 0]]]]) ifTrue:[maskBitIndex at: n+1 put: 0] ifFalse:[maskBitIndex at: n+1 put: (bitIndex := bitIndex + 1)]. ]. + n := n + 1 ]. - ]. "Now the real work begins... Start with 13 since multiples of 2,3,5,7,11 are handled by the storage method; + increment by iterating through increments, which enables us to only check about 20.77% of all numbers." + n := 13. + increments := #[4 2 4 6 2 6 4 2 4 6 6 2 6 4 2 6 4 6 8 4 2 4 2 4 14 4 6 2 10 2 6 6 4 2 4 6 2 10 2 4 2 12 10 2 4 2 4 6 2 6 4 6 6 6 2 6 4 2 6 4 6 8 4 2 4 6 8 6 10 2 4 6 2 6 6 4 2 4 6 2 6 4 2 6 10 2 10 2 4 2 4 6 8 4 2 4 12 2 6 4 2 6 4 6 12 2 4 2 4 8 6 4 6 2 4 6 2 6 10 2 4 6 2 6 4 2 4 2 10 2 10 2 4 6 6 2 6 6 4 6 6 2 6 4 2 6 4 6 8 4 2 6 4 8 6 4 6 2 4 6 8 6 4 2 10 2 6 4 2 4 2 10 2 10 2 4 2 4 8 6 4 2 4 6 6 2 6 4 8 4 6 8 4 2 4 2 4 8 6 4 6 6 6 2 6 6 4 2 4 6 2 6 4 2 4 2 10 2 10 2 6 4 6 2 6 4 2 4 6 6 8 4 2 6 10 8 4 2 4 2 4 8 10 6 2 4 8 6 6 4 2 4 6 2 6 4 6 2 10 2 10 2 4 2 4 6 2 6 4 2 4 6 6 2 6 6 6 4 6 8 4 2 4 2 4 8 6 4 8 4 6 2 6 6 4 2 4 6 8 4 2 4 2 10 2 10 2 4 2 4 6 2 10 2 4 6 8 6 4 2 6 4 6 8 4 6 2 4 8 6 4 6 2 4 6 2 6 6 4 6 6 2 6 6 4 2 10 2 10 2 4 2 4 6 2 6 4 2 10 6 2 6 4 2 6 4 6 8 4 2 4 2 12 6 4 6 2 4 6 2 12 4 2 4 8 6 4 2 4 2 10 2 10 6 2 4 6 2 6 4 2 4 6 6 2 6 4 2 10 6 8 6 4 2 4 8 6 4 6 2 4 6 2 6 6 6 4 6 2 6 4 2 4 2 10 12 2 4 2 10 2 6 4 2 4 6 6 2 10 2 6 4 14 4 2 4 2 4 8 6 4 6 2 4 6 2 6 6 4 2 4 6 2 6 4 2 4 12 2 12]. + incrementIndex := 1. + [ n <= limit ] whileTrue: [ - increment by 2 for odd numbers only." - 13 to: limit by: 2 do:[:n| (maskBit := maskBitIndex at: (n \\ 2310 + 1)) = 0 ifFalse:["not a multiple of 2,3,5,7,11" byteIndex := n // 2310 * 60 + (maskBit-1 bitShift: -3) + 1. bitIndex := 1 bitShift: (maskBit bitAnd: 7). ((flags at: byteIndex) bitAnd: bitIndex) = 0 ifFalse:["not marked -- n is prime" aBlock value: n. "Start with n*n since any integer < n has already been sieved (e.g., any multiple of n with a number k < n has been cleared + when k was sieved); add 2 * n to avoid even numbers and - when k was sieved); add 2 * i to avoid even numbers and mark all multiples of this prime. Note: n < indexLimit below limits running into LargeInts -- nothing more." n < indexLimit ifTrue:[ index := n * n. [index <= limit] whileTrue:[ (maskBit := maskBitIndex at: (index \\ 2310 + 1)) = 0 ifFalse:[ byteIndex := (index // 2310 * 60) + (maskBit-1 bitShift: -3) + 1. maskBit := 255 - (1 bitShift: (maskBit bitAnd: 7)). flags at: byteIndex put: ((flags at: byteIndex) bitAnd: maskBit). ]. + index := index + n + n ]. - index := index + (2 * n)]. ]. ]. ]. + n := n + (increments at: incrementIndex). + incrementIndex := incrementIndex + 1. + incrementIndex > increments size ifTrue: [ incrementIndex := 1 ] ]! - ]. - ! Item was changed: ----- Method: Integer class>>primesUpTo:do: (in category 'prime numbers') ----- primesUpTo: max do: aBlock "Compute aBlock with all prime integers up to the given integer." "Integer primesUpTo: 100" + | index sieve increment limit limitSqrtFloor | - | index limit limitSqrtFloor sieve increment | limit := max asInteger. - limit <= 1 ifTrue: [ ^self ]. "Fall back into #largePrimesUpTo:do: if we'd require more than 100k of memory; + the alternative will only requre 2/77th of the amount we need here and is almost as fast." + limit <= 100000 ifFalse: [ ^self largePrimesUpTo: limit do: aBlock ]. - the alternative will only requre 1/154th of the amount we need here and is almost as fast." - limit > 25000 ifTrue:[ ^self largePrimesUpTo: limit do: aBlock ]. limit := limit - 1. "upTo:" + limit <= 1 ifTrue: [ ^self ]. + aBlock value: 2. + limit <= 2 ifTrue: [ ^self ]. + aBlock value: 3. + sieve := ByteArray new: limit withAll: 1. "1 = prime, 0 = not prime" + sieve at: 1 put: 0. + "Filter multiples of 2." + index := 4. + [ index <= limit ] whileTrue: [ + sieve at: index put: 0. + index := index + 2 ]. + "Filter multiples of 3." + index := 9. + [ index <= limit ] whileTrue: [ + sieve at: index put: 0. + index := index + 3 ]. + "Filter the rest of the primes." - sieve := Array new: limit withAll: true. - sieve at: 1 put: false. - index := 2. limitSqrtFloor := limit sqrtFloor. + index := 5. + increment := 2. - increment := 1. [ index <= limitSqrtFloor ] whileTrue: [ + (sieve at: index) = 1 ifTrue: [ + | originalIndex originalIncrement | - (sieve at: index) ifTrue: [ - | notPrimeIndex notPrimeIncrement | aBlock value: index. + originalIndex := index. + originalIncrement := increment. + increment := index + index. + index := index * index. + [ index <= limit ] whileTrue: [ + sieve at: index put: 0. + index := index + increment ]. + index := originalIndex. + increment := originalIncrement ]. - notPrimeIndex := index * index. - notPrimeIncrement := increment * index. - [ notPrimeIndex <= limit ] whileTrue: [ - sieve at: notPrimeIndex put: false. - notPrimeIndex := notPrimeIndex + notPrimeIncrement ] ]. index := index + increment. + increment := 6 - increment ]. + "No more new primes here." - increment := 2]. [ index <= limit ] whileTrue: [ + (sieve at: index) = 1 ifTrue: [ - (sieve at: index) ifTrue: [ aBlock value: index ]. index := index + increment. + increment := 6 - increment ]! - increment := 2]! Item was changed: ----- Method: Magnitude>><=> (in category 'sorting') ----- <=> anotherObject "Return a collation order of -1, 0, or 1, indicating whether I should be collated before the receiver, am equal, or after. See also: http://en.wikipedia.org/wiki/Spaceship_operator" + self = anotherObject ifTrue: [ ^0 ]. + self < anotherObject ifTrue: [ ^-1 ]. + ^1! - ^self = anotherObject - ifTrue: [0] - ifFalse: [self < anotherObject ifTrue: [-1] ifFalse: [1]]! Item was changed: ----- Method: Number>>raisedTo: (in category 'mathematical functions') ----- raisedTo: aNumber "Answer the receiver raised to aNumber." aNumber isInteger ifTrue: [ "Do the special case of integer power" ^ self raisedToInteger: aNumber]. aNumber isFraction ifTrue: [ "Special case for fraction power" ^ (self nthRoot: aNumber denominator) raisedToInteger: aNumber numerator ]. + self negative ifTrue: [ - self < 0 ifTrue: [ ^ ArithmeticError signal: 'Negative numbers can''t be raised to float powers.' ]. + aNumber isZero ifTrue: [^ self class one]. "Special case of exponent=0" - 0 = aNumber ifTrue: [^ self class one]. "Special case of exponent=0" 1 = aNumber ifTrue: [^ self]. "Special case of exponent=1" + self isZero ifTrue: [ "Special case of self = 0" + aNumber negative - 0 = self ifTrue: [ "Special case of self = 0" - aNumber < 0 ifTrue: [^ (ZeroDivide dividend: self) signal] ifFalse: [^ self]]. ^ (aNumber * self ln) exp "Otherwise use logarithms"! From commits at source.squeak.org Wed Aug 12 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Aug 12 21:55:03 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150812215502.13313.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-August/008838.html Name: Kernel-eem.938 Ancestors: Kernel-cmm.937 Have ClassDescription>>moveChangesTo: write the class's definition before the changes if there are any so that the changes file is a potential application recovery vehicle, not just a crash recovery vehicle. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008839.html Name: ShoutCore-ul.53 Ancestors: ShoutCore-ul.52 In SHMCClassDefinition >> #sharedPools, the global should be added to the result instead of a block. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008840.html Name: ShoutCore-ul.54 Ancestors: ShoutCore-ul.53 - added missing #shoutParserClass to PseudoClass - faster SHTextStylerST80>>setAttributesIn:fromRanges: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008841.html Name: Kernel-ul.939 Ancestors: Kernel-eem.938 - Magnitude's spaceship operator uses quick returns. - Number >> #raisedTo: uses #negative and #isZero, which is faster for LargeIntegers than pure comparison with SmallIntegers. - faster #primesUpTo:do:, and #largePrimesUpTo:do: ============================================= From btc at openinworld.com Wed Aug 12 23:50:23 2015 From: btc at openinworld.com (Ben Coman) Date: Wed Aug 12 23:50:46 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: <15908.136.2.1.104.1439410547.squirrel@webmail.msen.com> References: <15908.136.2.1.104.1439410547.squirrel@webmail.msen.com> Message-ID: On Thu, Aug 13, 2015 at 4:15 AM, David T. Lewis wrote: >> Hi All, >> >> >> Fabio's kindly done most of the changes. But some questions remain >> for >> more general discussion. See below. >> >> Fabio, thanks so much for doing this, and so quickly! >> >> On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda >> wrote: >> >>> Hi All, >>> >>> who will update http://squeak.org/downloads/ to include the 5.0 >>> release? >>> >>> a) I suggest that the 5.0 all-in-one have a line in the left-hand table >>> that includes the 4.6 release and that it precede the 4.6 release in the >>> list. >>> >> >> Done. >> >> >>> >>> b) the Trunk link points to TrunkImage.zip which contains a non-Spur >>> image. >>> >> >> So this is the biggie. What should we do? >> >> - add a Trunk 5.0 build with a different link? (Noooooo) >> >> - change http://build.squeak.org/job/SqueakTrunk to build what it says >> (Yessss please, who can do this?) >> >> - add a Squeak 4.6 build job? Is that even worth it any more considering >> 4.6 is released and stable? If it is then what should it build? David? > > I think that if we have a job called "SqueakTrunk" then it should be > building the actual current trunk image, which is a 5.0 Spur image. > > Ideally I would suggest renaming the current "SqueakTrunk" job to > something like "SqueakTrunk_Old". "Old" things sometimes get mistreated (e.g. accidental deletion, confused with other "old" things over years.) How about something topical like SqueakTrunk_V3Legacy? cheers -ben > Leave it disabled until it gets fixed, > and if it does not get fixed in a reasonable time (say a month or two) > then delete it. Meanwhile get new new job up and running for the real > SqueakTrunk builds. > > I do not know how that Jenkins job is maintained (it's done in a Ruby make > system, which is over my head), so treat this just as an opinion. > > Dave From eliot.miranda at gmail.com Thu Aug 13 00:08:12 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Aug 13 00:08:16 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: <15908.136.2.1.104.1439410547.squirrel@webmail.msen.com> Message-ID: On Wed, Aug 12, 2015 at 4:50 PM, Ben Coman wrote: > On Thu, Aug 13, 2015 at 4:15 AM, David T. Lewis > wrote: > >> Hi All, > >> > >> > >> Fabio's kindly done most of the changes. But some questions remain > >> for > >> more general discussion. See below. > >> > >> Fabio, thanks so much for doing this, and so quickly! > >> > >> On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda > > >> wrote: > >> > >>> Hi All, > >>> > >>> who will update http://squeak.org/downloads/ to include the 5.0 > >>> release? > >>> > >>> a) I suggest that the 5.0 all-in-one have a line in the left-hand table > >>> that includes the 4.6 release and that it precede the 4.6 release in > the > >>> list. > >>> > >> > >> Done. > >> > >> > >>> > >>> b) the Trunk link points to TrunkImage.zip which contains a non-Spur > >>> image. > >>> > >> > >> So this is the biggie. What should we do? > >> > >> - add a Trunk 5.0 build with a different link? (Noooooo) > >> > >> - change http://build.squeak.org/job/SqueakTrunk to build what it says > >> (Yessss please, who can do this?) > >> > >> - add a Squeak 4.6 build job? Is that even worth it any more > considering > >> 4.6 is released and stable? If it is then what should it build? David? > > > > I think that if we have a job called "SqueakTrunk" then it should be > > building the actual current trunk image, which is a 5.0 Spur image. > > > > Ideally I would suggest renaming the current "SqueakTrunk" job to > > something like "SqueakTrunk_Old". > > > "Old" things sometimes get mistreated (e.g. accidental deletion, > confused with other "old" things over years.) > How about something topical like SqueakTrunk_V3Legacy? > cheers -ben > +1 Or SqueakTrunkV46? > > > > Leave it disabled until it gets fixed, > > and if it does not get fixed in a reasonable time (say a month or two) > > then delete it. Meanwhile get new new job up and running for the real > > SqueakTrunk builds. > > > > I do not know how that Jenkins job is maintained (it's done in a Ruby > make > > system, which is over my head), so treat this just as an opinion. > > > > Dave > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150812/d0afc4ce/attachment-0001.htm From eliot.miranda at gmail.com Thu Aug 13 00:11:03 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Aug 13 00:11:05 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: Message-ID: Hi Tobias, On Wed, Aug 12, 2015 at 12:49 PM, Tobias Pape wrote: > > On 12.08.2015, at 20:55, Eliot Miranda wrote: > > > Hi All, > > > > > > Fabio's kindly done most of the changes. But some questions remain > for more general discussion. See below. > > > > Fabio, thanks so much for doing this, and so quickly! > > > > On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda > wrote: > > Hi All, > > > > who will update http://squeak.org/downloads/ to include the 5.0 > release? > > > > a) I suggest that the 5.0 all-in-one have a line in the left-hand table > that includes the 4.6 release and that it precede the 4.6 release in the > list. > > > > Done. > > > > > > b) the Trunk link points to TrunkImage.zip which contains a non-Spur > image. > > > > So this is the biggie. What should we do? > > > > - add a Trunk 5.0 build with a different link? (Noooooo) > > > > - change http://build.squeak.org/job/SqueakTrunk to build what it says > (Yessss please, who can do this?) > > Done: build.squeak.org/job/Trunk/ > But as I said several times, Spur/trunk test just crash for month? > can you point me to the crash? I'm looking at http://build.squeak.org/job/Trunk/default/lastBuild/#showFailuresLink and see 8 test failures but no crash. > > > > > > - add a Squeak 4.6 build job? Is that even worth it any more > considering 4.6 is released and stable? If it is then what should it > build? David? > > > > > > c) Spur VMs need to be linked to by an added line in the Virtual > Machines list. > > > > Not applicable. the VM links point to the root of my site so they > effectively point to both old and Spur VMs. > > > > > > d) Spur imagers need to be included in the Image and Changes list under > Custom Installation > > > > Done. > > > > > > > > e) The SqueakV50.sources file also needs to be included in the Current > Sources list. > > > > Done. > > > > > > f) we could start a History list for the 5.0 line > > > > This is probably quite a big reorg on the page and not urgent. > > > > > > So there are a few things to fix before 5.0 is freely downloadable. > > > > On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller > wrote: > > In the 17 months since Squeak 4.5 was released, a huge development > > effort took place to create the next generation virtual-machine for > > the Squeak / Pharo / Newspeak family of programming systems. Squeak > > is the modern incarnation of the Smalltalk-80 programming environment > > originally developed at the Xerox PARC. > > > > "Squeak 5" introduces this new VM and associated new memory model, > > collectively referred to as "Spur". Presented [1] by Eliot Miranda > > and Cl?ment B?ra at the 2015 International Symposium on Memory > > Management, this new VM affords Squeak applications a significant > > boost in performance and memory management. Among other > > optimizations, the #become operation no longer requires a memory scan. > > Object pinning and ephemerons are also now supported. The release > > notes [2] provide more details. > > > > The new memory model requires a new image file format. Although this > > new format results in about a 15% increased memory requirement for the > > same number of 4.x objects, a new segmented heap allows memory to be > > given back to the OS when its no longer needed, a great benefit for > > application servers. > > > > As forward compatibility is as important to the Squeak community as > > backward compatibility, Squeak 5 is delivers an image with identical > > content as the recent 4.6 release. Although this new Squeak 5 VM > > cannot open images saved under the prior 4.x Cog format, objects and > > code can be easily exported from the 4.x image and then imported into > > Squeak 5. Applications whose code runs strictly above the Smalltalk > > meta layer will prove remarkably compatible with the new format, most > > applications will require no changes whatsotever. > > > > Squeak 5 is the result of monumental effort by a tiny group of very > > talented people, but its also just the beginning of yet a new effort; > > Spur is just a stepping stone to a more ambitious goals planned over > > the next five years. > > > > [1] -- A Partial Read Barrier for Efficient Support of Live > > Object-oriented Programming > > > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming > > > > [2] -- Squeak 5 Release Notes > > http://wiki.squeak.org/squeak/6207 > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150812/1017a0a9/attachment.htm From eliot.miranda at gmail.com Thu Aug 13 00:15:27 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Aug 13 00:15:30 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: Message-ID: Hi Tobias, forget that. I found it. THis right? Trunk test suite for Spur Using existing cogspur r.3410 cp -r /var/lib/jenkins/workspace/Trunk/default/target/cogspur.r3410 /tmp/d20150812-28620-etbikj image test suite VM: /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak -version /var/lib/jenkins/workspace/Trunk/default/tests.st spawning command 0 with timeout 1800 seconds: "/tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak" "-vm-sound-null" "-vm-display-null" "/var/lib/jenkins/workspace/Trunk/default/target/SpurPostTestTrunkImage.image" "../tests.st" (Command started with PID 28643) 2015-08-12T23:31:48.17+01:00: Loading Hudson build tools... from /var/lib/jenkins/workspace/Trunk/default/target/HudsonBuildTools.st 2015-08-12T23:31:48.388+01:00: Running tests... setsockopt: Protocol not available setsockopt: Protocol not available 28646:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:612: Recursive not understood error encountered I bet this is ImageSegment related. On Wed, Aug 12, 2015 at 5:11 PM, Eliot Miranda wrote: > Hi Tobias, > > On Wed, Aug 12, 2015 at 12:49 PM, Tobias Pape wrote: > >> >> On 12.08.2015, at 20:55, Eliot Miranda wrote: >> >> > Hi All, >> > >> > >> > Fabio's kindly done most of the changes. But some questions remain >> for more general discussion. See below. >> > >> > Fabio, thanks so much for doing this, and so quickly! >> > >> > On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda >> wrote: >> > Hi All, >> > >> > who will update http://squeak.org/downloads/ to include the 5.0 >> release? >> > >> > a) I suggest that the 5.0 all-in-one have a line in the left-hand table >> that includes the 4.6 release and that it precede the 4.6 release in the >> list. >> > >> > Done. >> > >> > >> > b) the Trunk link points to TrunkImage.zip which contains a non-Spur >> image. >> > >> > So this is the biggie. What should we do? >> > >> > - add a Trunk 5.0 build with a different link? (Noooooo) >> > >> > - change http://build.squeak.org/job/SqueakTrunk to build what it >> says (Yessss please, who can do this?) >> >> Done: build.squeak.org/job/Trunk/ >> But as I said several times, Spur/trunk test just crash for month? >> > > can you point me to the crash? I'm looking at > http://build.squeak.org/job/Trunk/default/lastBuild/#showFailuresLink and > see 8 test failures but no crash. > >> >> >> > >> > - add a Squeak 4.6 build job? Is that even worth it any more >> considering 4.6 is released and stable? If it is then what should it >> build? David? >> > >> > >> > c) Spur VMs need to be linked to by an added line in the Virtual >> Machines list. >> > >> > Not applicable. the VM links point to the root of my site so they >> effectively point to both old and Spur VMs. >> > >> > >> > d) Spur imagers need to be included in the Image and Changes list under >> Custom Installation >> > >> > Done. >> > >> > >> > >> > e) The SqueakV50.sources file also needs to be included in the Current >> Sources list. >> > >> > Done. >> > >> > >> > f) we could start a History list for the 5.0 line >> > >> > This is probably quite a big reorg on the page and not urgent. >> > >> > >> > So there are a few things to fix before 5.0 is freely downloadable. >> > >> > On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller >> wrote: >> > In the 17 months since Squeak 4.5 was released, a huge development >> > effort took place to create the next generation virtual-machine for >> > the Squeak / Pharo / Newspeak family of programming systems. Squeak >> > is the modern incarnation of the Smalltalk-80 programming environment >> > originally developed at the Xerox PARC. >> > >> > "Squeak 5" introduces this new VM and associated new memory model, >> > collectively referred to as "Spur". Presented [1] by Eliot Miranda >> > and Cl?ment B?ra at the 2015 International Symposium on Memory >> > Management, this new VM affords Squeak applications a significant >> > boost in performance and memory management. Among other >> > optimizations, the #become operation no longer requires a memory scan. >> > Object pinning and ephemerons are also now supported. The release >> > notes [2] provide more details. >> > >> > The new memory model requires a new image file format. Although this >> > new format results in about a 15% increased memory requirement for the >> > same number of 4.x objects, a new segmented heap allows memory to be >> > given back to the OS when its no longer needed, a great benefit for >> > application servers. >> > >> > As forward compatibility is as important to the Squeak community as >> > backward compatibility, Squeak 5 is delivers an image with identical >> > content as the recent 4.6 release. Although this new Squeak 5 VM >> > cannot open images saved under the prior 4.x Cog format, objects and >> > code can be easily exported from the 4.x image and then imported into >> > Squeak 5. Applications whose code runs strictly above the Smalltalk >> > meta layer will prove remarkably compatible with the new format, most >> > applications will require no changes whatsotever. >> > >> > Squeak 5 is the result of monumental effort by a tiny group of very >> > talented people, but its also just the beginning of yet a new effort; >> > Spur is just a stepping stone to a more ambitious goals planned over >> > the next five years. >> > >> > [1] -- A Partial Read Barrier for Efficient Support of Live >> > Object-oriented Programming >> > >> http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming >> > >> > [2] -- Squeak 5 Release Notes >> > http://wiki.squeak.org/squeak/6207 >> >> >> >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150812/b8ff2fc5/attachment.htm From brasspen at gmail.com Thu Aug 13 01:19:23 2015 From: brasspen at gmail.com (Chris Cunnington) Date: Thu Aug 13 01:19:26 2015 Subject: [squeak-dev] A stab at explaining Spur Message-ID: <1FD8AEBD-7181-4B26-A77C-54C1F122383A@gmail.com> On 12/08/15 05:23, Chris Muller wrote: > [1] -- A Partial Read Barrier for Efficient Support of Live > Object-oriented Programming > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming >For the paywall-free version: >https://hal.inria.fr/hal-01152610 >Stephan I?m going to take a stab at explaining what I just read (as far as I read it). You?re an instance of Rectangle. You have an ivar with a Point in it. The point has ivars x and y. This great because you can get the values of the instance of Point?s x and y when you need to. Funny thing, though, Point was just recompiled to add methods or change ivars. Now all the instances, including yours, are junk. Not to worry, the system has a plan and two tools to deal with it: two primitives fronted by #allInstances and #become:. The system will find all the instances of Point with #allInstances. It will then find each and apply #become: to switch the old version with the new. In Rectangle we get a new number in our ivar slot for the Point instance. And things are caught up. But how does that actually work? The #become: part? I think that?s the story of three approaches to the problem with the last one being Spur. The first way is the way used by Cincom?s VisualWorks now. It?s a two step process. To get from Rectangle to the value of x in an instance of Point we need to make two object pointer calls. The first goes to the head object of the class Point. A second goes from there to the ?body? which is a basket of slots, which in our case includes x an y. The beauty of this is that it gives #become: a focal point. a become: b at the location of the header object and you?ve neatly swapped the address from Rectangle?s ivar to where the x and y values are. There?s a problem. There?s trouble in paradise. We are not happy. It could be faster. We don?t want two steps. We don?t want a bridge between Rectangle and the ?body? of values with the header object as the cornerstone. We want one step, not two. That?s faster. To do that, the first thing we do is fuse the header object with the ?body?. They are no longer in separate places. One word for the header and the next word is slot 1, which is for us x. The next word will have y. The system is faster, but we have a problem. Where are all those references we need to renumber? We no longer have a neat nexus in the header object that #become: can use. No problem, we?ll sweep all of memory (aka ?the heap?) to find them again. We?re getting such a boost from one step instead of two that we can afford to brute force the problem with a sweep. And we?re happy. For a while. And then we?re not. This does not scale. We find that the larger the memory gets, then the closer we get to where sweeping the heap becomes more expensive than the gains we?re getting. There?s a plateau point, a location on the graph beyond which the memory sweep is so costly it?s eating our gains. What to do? We want the speed of the one-step process, but we want it to scale. We create a solution called Spur. The salient passage here in the paper is: "This paper describes the design and implementation of efficient schema migration using direct pointers [That?s the ?one step? business I?ve been talking about above], which consists mainly in hiding the cost of checking for forwarding pointers behind other checking operations that the system performs as part of its normal processing.? Did you get that part? Let?s repeat it: "hiding the cost of checking for forwarding pointers behind other checking operations that the system performs as part of its normal processing.? Normal processing. We want to be prepared. We want to do as much as we can in anticipation of the requirement that slows things down when the memory gets big. Anticipate. Do as much as you can beforehand. A little vague? OK, I?ll try again. Read this: "Become is therefore implemented lazily; copies of the pair of objects are created, and each original is forwarded to the matching copy; the forwarding pointer is followed when the object is encountered.? I don?t understand all of that, but I did catch ?lazily?. In the first of our three systems, the system is preparing all possible avenues. In Spur, I think, it is only opening avenues that need to be opened when they need to be opened. They are being opened ?lazily.? There seems to me a commonality to Spur, Cog and Sista. Don?t set the table for ten people. Wait to see how many show up. Don?t do unnecessary work. I think that?s what ?lazily? means. These three also like to pay attention to what is happening over and over again and cache it for speed. One last thing. It seems to me the reason Spur and 64-bit are related has to do with fusing the header object with the ?body? object. By definition that requires a new object format, does it not? That?s as far as I could make out. I?m sort of a big picture guy, so the details of ?forwarding objects? and ?partial read barriers? doesn?t interest me all that much. I like it more as a story of three versions with the last one being Spur. FWIW, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150812/2af16f3f/attachment.htm From Das.Linux at gmx.de Thu Aug 13 05:18:57 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Aug 13 05:18:59 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: Message-ID: Hi all On 13.08.2015, at 02:15, Eliot Miranda wrote: > Hi Tobias, > > forget that. I found it. THis right? > > Trunk test suite for Spur > Using existing cogspur r.3410 > cp -r /var/lib/jenkins/workspace/Trunk/default/target/cogspur.r3410 /tmp/d20150812-28620-etbikj > image test suite > VM: /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak > /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak -version > /var/lib/jenkins/workspace/Trunk/default/tests.st > spawning command 0 with timeout 1800 seconds: "/tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak" "-vm-sound-null" "-vm-display-null" "/var/lib/jenkins/workspace/Trunk/default/target/SpurPostTestTrunkImage.image" "../tests.st" > (Command started with PID 28643) > 2015-08-12T23:31:48.17+01:00: Loading Hudson build tools... from /var/lib/jenkins/workspace/Trunk/default/target/HudsonBuildTools.st > 2015-08-12T23:31:48.388+01:00: Running tests... > setsockopt: Protocol not available > setsockopt: Protocol not available > 28646:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:612: > > Recursive not understood error encountered > > > I bet this is ImageSegment related. It sure is. BitmapStreamTests>testMatrixTransform2x3WithImageSegment sends BitmapStreamTests>validateImageSegment The most strange thing is that I cannot reproduce this on my Mac? There the test does not crash the image? Best regards -Tobias > > On Wed, Aug 12, 2015 at 5:11 PM, Eliot Miranda wrote: > Hi Tobias, > > On Wed, Aug 12, 2015 at 12:49 PM, Tobias Pape wrote: > > On 12.08.2015, at 20:55, Eliot Miranda wrote: > > > Hi All, > > > > > > Fabio's kindly done most of the changes. But some questions remain for more general discussion. See below. > > > > Fabio, thanks so much for doing this, and so quickly! > > > > On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda wrote: > > Hi All, > > > > who will update http://squeak.org/downloads/ to include the 5.0 release? > > > > a) I suggest that the 5.0 all-in-one have a line in the left-hand table that includes the 4.6 release and that it precede the 4.6 release in the list. > > > > Done. > > > > > > b) the Trunk link points to TrunkImage.zip which contains a non-Spur image. > > > > So this is the biggie. What should we do? > > > > - add a Trunk 5.0 build with a different link? (Noooooo) > > > > - change http://build.squeak.org/job/SqueakTrunk to build what it says (Yessss please, who can do this?) > > Done: build.squeak.org/job/Trunk/ > But as I said several times, Spur/trunk test just crash for month? > > can you point me to the crash? I'm looking at http://build.squeak.org/job/Trunk/default/lastBuild/#showFailuresLink and see 8 test failures but no crash. > > > > > > - add a Squeak 4.6 build job? Is that even worth it any more considering 4.6 is released and stable? If it is then what should it build? David? > > > > > > c) Spur VMs need to be linked to by an added line in the Virtual Machines list. > > > > Not applicable. the VM links point to the root of my site so they effectively point to both old and Spur VMs. > > > > > > d) Spur imagers need to be included in the Image and Changes list under Custom Installation > > > > Done. > > > > > > > > e) The SqueakV50.sources file also needs to be included in the Current Sources list. > > > > Done. > > > > > > f) we could start a History list for the 5.0 line > > > > This is probably quite a big reorg on the page and not urgent. > > > > > > So there are a few things to fix before 5.0 is freely downloadable. > > > > On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller wrote: > > In the 17 months since Squeak 4.5 was released, a huge development > > effort took place to create the next generation virtual-machine for > > the Squeak / Pharo / Newspeak family of programming systems. Squeak > > is the modern incarnation of the Smalltalk-80 programming environment > > originally developed at the Xerox PARC. > > > > "Squeak 5" introduces this new VM and associated new memory model, > > collectively referred to as "Spur". Presented [1] by Eliot Miranda > > and Cl?ment B?ra at the 2015 International Symposium on Memory > > Management, this new VM affords Squeak applications a significant > > boost in performance and memory management. Among other > > optimizations, the #become operation no longer requires a memory scan. > > Object pinning and ephemerons are also now supported. The release > > notes [2] provide more details. > > > > The new memory model requires a new image file format. Although this > > new format results in about a 15% increased memory requirement for the > > same number of 4.x objects, a new segmented heap allows memory to be > > given back to the OS when its no longer needed, a great benefit for > > application servers. > > > > As forward compatibility is as important to the Squeak community as > > backward compatibility, Squeak 5 is delivers an image with identical > > content as the recent 4.6 release. Although this new Squeak 5 VM > > cannot open images saved under the prior 4.x Cog format, objects and > > code can be easily exported from the 4.x image and then imported into > > Squeak 5. Applications whose code runs strictly above the Smalltalk > > meta layer will prove remarkably compatible with the new format, most > > applications will require no changes whatsotever. > > > > Squeak 5 is the result of monumental effort by a tiny group of very > > talented people, but its also just the beginning of yet a new effort; > > Spur is just a stepping stone to a more ambitious goals planned over > > the next five years. > > > > [1] -- A Partial Read Barrier for Efficient Support of Live > > Object-oriented Programming > > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming > > > > [2] -- Squeak 5 Release Notes > > http://wiki.squeak.org/squeak/6207 From eliot.miranda at gmail.com Thu Aug 13 05:40:20 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Aug 13 05:40:23 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: Message-ID: Hi Tobias, On Wed, Aug 12, 2015 at 10:18 PM, Tobias Pape wrote: > Hi all > On 13.08.2015, at 02:15, Eliot Miranda wrote: > > > Hi Tobias, > > > > forget that. I found it. THis right? > > > > Trunk test suite for Spur > > Using existing cogspur r.3410 > > cp -r /var/lib/jenkins/workspace/Trunk/default/target/cogspur.r3410 > /tmp/d20150812-28620-etbikj > > image test suite > > VM: /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak > > /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak > -version > > /var/lib/jenkins/workspace/Trunk/default/tests.st > > spawning command 0 with timeout 1800 seconds: > "/tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak" > "-vm-sound-null" "-vm-display-null" > "/var/lib/jenkins/workspace/Trunk/default/target/SpurPostTestTrunkImage.image" > "../tests.st" > > (Command started with PID 28643) > > 2015-08-12T23:31:48.17+01:00: Loading Hudson build tools... from > /var/lib/jenkins/workspace/Trunk/default/target/HudsonBuildTools.st > > 2015-08-12T23:31:48.388+01:00: Running tests... > > setsockopt: Protocol not available > > setsockopt: Protocol not available > > 28646:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown > protocol:s23_clnt.c:612: > > > > Recursive not understood error encountered > > > > > > I bet this is ImageSegment related. > > It sure is. > > BitmapStreamTests>testMatrixTransform2x3WithImageSegment > sends > BitmapStreamTests>validateImageSegment > Basically the ImageSegment code has been working in Spur on a hope and a prayer. The code assumes objects are allocated in chronological order and that this order is preserved, not so with Spur. So post image segment loading someObject/nextObject is used to enumerate the objects loaded. This can't work reliably in Spur. I *think* (ok I hope) that I've implemented the segment load primitive in Spur to answer an Array of the objects loaded, so that these can be explicitly enumerated. So the job is a) to check that I have indeed implemented the primitive to do this and b) to rewrite the image segment loading code in the light of this. David, this is an example of something that isn't back portable and should not be back-ported. The most strange thing is that I cannot reproduce this on my Mac? > There the test does not crash the image? > Well then it may be a signed/unsigned bug in image loading instead. On linux the image typically gets loaded quite high in the address space and so a good portion of the heap ends up above 0x7FFFFFFF, or negative territory if misinterpreted as signed integers. On Mac and Windows the image tends to get loaded quite low and so has to be pretty big to fall foul of signedness issues. Busy right now but will check tomorrow. > Best regards > -Tobias > > > > > > On Wed, Aug 12, 2015 at 5:11 PM, Eliot Miranda > wrote: > > Hi Tobias, > > > > On Wed, Aug 12, 2015 at 12:49 PM, Tobias Pape wrote: > > > > On 12.08.2015, at 20:55, Eliot Miranda wrote: > > > > > Hi All, > > > > > > > > > Fabio's kindly done most of the changes. But some questions > remain for more general discussion. See below. > > > > > > Fabio, thanks so much for doing this, and so quickly! > > > > > > On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda < > eliot.miranda@gmail.com> wrote: > > > Hi All, > > > > > > who will update http://squeak.org/downloads/ to include the 5.0 > release? > > > > > > a) I suggest that the 5.0 all-in-one have a line in the left-hand > table that includes the 4.6 release and that it precede the 4.6 release in > the list. > > > > > > Done. > > > > > > > > > b) the Trunk link points to TrunkImage.zip which contains a non-Spur > image. > > > > > > So this is the biggie. What should we do? > > > > > > - add a Trunk 5.0 build with a different link? (Noooooo) > > > > > > - change http://build.squeak.org/job/SqueakTrunk to build what it > says (Yessss please, who can do this?) > > > > Done: build.squeak.org/job/Trunk/ > > But as I said several times, Spur/trunk test just crash for month? > > > > can you point me to the crash? I'm looking at > http://build.squeak.org/job/Trunk/default/lastBuild/#showFailuresLink and > see 8 test failures but no crash. > > > > > > > > > > - add a Squeak 4.6 build job? Is that even worth it any more > considering 4.6 is released and stable? If it is then what should it > build? David? > > > > > > > > > c) Spur VMs need to be linked to by an added line in the Virtual > Machines list. > > > > > > Not applicable. the VM links point to the root of my site so they > effectively point to both old and Spur VMs. > > > > > > > > > d) Spur imagers need to be included in the Image and Changes list > under Custom Installation > > > > > > Done. > > > > > > > > > > > > e) The SqueakV50.sources file also needs to be included in the Current > Sources list. > > > > > > Done. > > > > > > > > > f) we could start a History list for the 5.0 line > > > > > > This is probably quite a big reorg on the page and not urgent. > > > > > > > > > So there are a few things to fix before 5.0 is freely downloadable. > > > > > > On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller > wrote: > > > In the 17 months since Squeak 4.5 was released, a huge development > > > effort took place to create the next generation virtual-machine for > > > the Squeak / Pharo / Newspeak family of programming systems. Squeak > > > is the modern incarnation of the Smalltalk-80 programming environment > > > originally developed at the Xerox PARC. > > > > > > "Squeak 5" introduces this new VM and associated new memory model, > > > collectively referred to as "Spur". Presented [1] by Eliot Miranda > > > and Cl?ment B?ra at the 2015 International Symposium on Memory > > > Management, this new VM affords Squeak applications a significant > > > boost in performance and memory management. Among other > > > optimizations, the #become operation no longer requires a memory scan. > > > Object pinning and ephemerons are also now supported. The release > > > notes [2] provide more details. > > > > > > The new memory model requires a new image file format. Although this > > > new format results in about a 15% increased memory requirement for the > > > same number of 4.x objects, a new segmented heap allows memory to be > > > given back to the OS when its no longer needed, a great benefit for > > > application servers. > > > > > > As forward compatibility is as important to the Squeak community as > > > backward compatibility, Squeak 5 is delivers an image with identical > > > content as the recent 4.6 release. Although this new Squeak 5 VM > > > cannot open images saved under the prior 4.x Cog format, objects and > > > code can be easily exported from the 4.x image and then imported into > > > Squeak 5. Applications whose code runs strictly above the Smalltalk > > > meta layer will prove remarkably compatible with the new format, most > > > applications will require no changes whatsotever. > > > > > > Squeak 5 is the result of monumental effort by a tiny group of very > > > talented people, but its also just the beginning of yet a new effort; > > > Spur is just a stepping stone to a more ambitious goals planned over > > > the next five years. > > > > > > [1] -- A Partial Read Barrier for Efficient Support of Live > > > Object-oriented Programming > > > > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming > > > > > > [2] -- Squeak 5 Release Notes > > > http://wiki.squeak.org/squeak/6207 > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150812/534d96e9/attachment.htm From hannes.hirzel at gmail.com Thu Aug 13 10:08:02 2015 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Thu Aug 13 10:08:04 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: <15908.136.2.1.104.1439410547.squirrel@webmail.msen.com> Message-ID: On 8/13/15, Eliot Miranda wrote: > On Wed, Aug 12, 2015 at 4:50 PM, Ben Coman wrote: > >> On Thu, Aug 13, 2015 at 4:15 AM, David T. Lewis >> wrote: >> >> Hi All, >> >> >> >> >> >> Fabio's kindly done most of the changes. But some questions >> >> remain >> >> for >> >> more general discussion. See below. >> >> >> >> Fabio, thanks so much for doing this, and so quickly! >> >> >> >> On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda >> >> > > >> >> wrote: >> >> >> >>> Hi All, >> >>> >> >>> who will update http://squeak.org/downloads/ to include the 5.0 >> >>> release? >> >>> >> >>> a) I suggest that the 5.0 all-in-one have a line in the left-hand >> >>> table >> >>> that includes the 4.6 release and that it precede the 4.6 release in >> the >> >>> list. >> >>> >> >> >> >> Done. >> >> >> >> >> >>> >> >>> b) the Trunk link points to TrunkImage.zip which contains a non-Spur >> >>> image. >> >>> >> >> >> >> So this is the biggie. What should we do? >> >> >> >> - add a Trunk 5.0 build with a different link? (Noooooo) >> >> >> >> - change http://build.squeak.org/job/SqueakTrunk to build what it >> >> says >> >> (Yessss please, who can do this?) >> >> >> >> - add a Squeak 4.6 build job? Is that even worth it any more >> considering >> >> 4.6 is released and stable? If it is then what should it build? >> >> David? >> > >> > I think that if we have a job called "SqueakTrunk" then it should be >> > building the actual current trunk image, which is a 5.0 Spur image. >> > >> > Ideally I would suggest renaming the current "SqueakTrunk" job to >> > something like "SqueakTrunk_Old". >> >> >> "Old" things sometimes get mistreated (e.g. accidental deletion, >> confused with other "old" things over years.) >> How about something topical like SqueakTrunk_V3Legacy? >> cheers -ben >> > > +1 > > Or SqueakTrunkV46? +1 To call is 'legacy' just a few weeks after the release of Squeak 4.6 sound premature .... > > >> >> >> > Leave it disabled until it gets fixed, >> > and if it does not get fixed in a reasonable time (say a month or two) >> > then delete it. Meanwhile get new new job up and running for the real >> > SqueakTrunk builds. >> > >> > I do not know how that Jenkins job is maintained (it's done in a Ruby >> make >> > system, which is over my head), so treat this just as an opinion. >> > >> > Dave >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > From leves at elte.hu Thu Aug 13 11:10:35 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Aug 13 11:10:39 2015 Subject: [squeak-dev] Regex Message-ID: Hi All, I've ported Pharo's version of VB-Regex to Squeak, and uploaded it to the Inbox. Unfortunately the file was probably too large for the server to send an email about it. Just evaluate the following snippet to install it: Installer squeakInbox addPackage: 'Regex-Core-ul.37.mcz'; addPackage: 'Regex-Tests-Core-ul.1.mcz'; install. Compared to the PCRE-based Regex package, which can be loaded from SqueakMap, this library is significantly slower and has less features, but it's written in Smalltalk. Levente From btc at openinworld.com Thu Aug 13 11:11:00 2015 From: btc at openinworld.com (Ben Coman) Date: Thu Aug 13 11:11:23 2015 Subject: [squeak-dev] [ANN] Squeak 5 In-Reply-To: References: <15908.136.2.1.104.1439410547.squirrel@webmail.msen.com> Message-ID: On Thu, Aug 13, 2015 at 6:08 PM, H. Hirzel wrote: > On 8/13/15, Eliot Miranda wrote: >> On Wed, Aug 12, 2015 at 4:50 PM, Ben Coman wrote: >> >>> On Thu, Aug 13, 2015 at 4:15 AM, David T. Lewis >>> wrote: >>> >> Hi All, >>> >> >>> >> >>> >> Fabio's kindly done most of the changes. But some questions >>> >> remain >>> >> for >>> >> more general discussion. See below. >>> >> >>> >> Fabio, thanks so much for doing this, and so quickly! >>> >> >>> >> On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda >>> >> >> > >>> >> wrote: >>> >> >>> >>> Hi All, >>> >>> >>> >>> who will update http://squeak.org/downloads/ to include the 5.0 >>> >>> release? >>> >>> >>> >>> a) I suggest that the 5.0 all-in-one have a line in the left-hand >>> >>> table >>> >>> that includes the 4.6 release and that it precede the 4.6 release in >>> the >>> >>> list. >>> >>> >>> >> >>> >> Done. >>> >> >>> >> >>> >>> >>> >>> b) the Trunk link points to TrunkImage.zip which contains a non-Spur >>> >>> image. >>> >>> >>> >> >>> >> So this is the biggie. What should we do? >>> >> >>> >> - add a Trunk 5.0 build with a different link? (Noooooo) >>> >> >>> >> - change http://build.squeak.org/job/SqueakTrunk to build what it >>> >> says >>> >> (Yessss please, who can do this?) >>> >> >>> >> - add a Squeak 4.6 build job? Is that even worth it any more >>> considering >>> >> 4.6 is released and stable? If it is then what should it build? >>> >> David? >>> > >>> > I think that if we have a job called "SqueakTrunk" then it should be >>> > building the actual current trunk image, which is a 5.0 Spur image. >>> > >>> > Ideally I would suggest renaming the current "SqueakTrunk" job to >>> > something like "SqueakTrunk_Old". >>> >>> >>> "Old" things sometimes get mistreated (e.g. accidental deletion, >>> confused with other "old" things over years.) >>> How about something topical like SqueakTrunk_V3Legacy? >>> cheers -ben >>> >> >> +1 >> >> Or SqueakTrunkV46? > > +1 > > To call is 'legacy' just a few weeks after the release of Squeak 4.6 > sound premature .... > Whoops, sorry :) cheers -ben From Das.Linux at gmx.de Thu Aug 13 11:18:47 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Aug 13 11:18:50 2015 Subject: [squeak-dev] Regex In-Reply-To: References: Message-ID: <6B88378D-FEB2-4232-A6EF-341BE6B859FA@gmx.de> On 13.08.2015, at 13:10, Levente Uzonyi wrote: > Hi All, > > I've ported Pharo's version of VB-Regex to Squeak, and uploaded it to the Inbox. Unfortunately the file was probably too large for the server to send an email about it. Just evaluate the following snippet to install it: > > Installer squeakInbox > addPackage: 'Regex-Core-ul.37.mcz'; > addPackage: 'Regex-Tests-Core-ul.1.mcz'; > install. To the trunk, I'd say! Best regards -Tobias From Marcel.Taeumel at hpi.de Thu Aug 13 11:35:00 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Aug 13 11:38:31 2015 Subject: [squeak-dev] Re: Regex In-Reply-To: References: Message-ID: <1439465700422-4842488.post@n4.nabble.com> Wohoooo!!!! :D Trunk! Trunk! Trunk! :) Best, Marcel -- View this message in context: http://forum.world.st/Regex-tp4842477p4842488.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From ma.chris.m at gmail.com Thu Aug 13 15:41:09 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Thu Aug 13 15:41:52 2015 Subject: [squeak-dev] [ANN] Magma 1.5 Message-ID: I am pleased to announce version 1.5 of Magma for Squeak 5, now available on SqueakMap. Magma allows multiple Squeak images to collaborate on a single, large object model, with the robustness and control expected from a database. It offers the most transparent db access possible for Smalltalk, affording the user the ability to develop complex, performant designs, iteratively, on-the-fly. It has been designed for "continuous flow" development, the way Smalltalkers like and expect to work. For example, I could have connections open to 3 separate databases, open transactions in any of them, and having restructured a class hierarchy in the model, and stepping through the debugger when that "final boarding call" for my flight is announced. Thanks to the image, this scenario has never been a problem for Smalltalkers and Magma is deliberate to ensure this flow is maintained. Once at 10K feet, I can resume stepping through that same debugger within 5 seconds of restarting the image, DB connections intact, commit my transactions when I'm ready, done. Magma handles every aspect of that use-case correctly even in multi-user environments, and has so many safety and integrity features, it is the safest way to develop and keep a model in Squeak. This release coincides with the release of Squeak 5, and has many improvements and fixes over Magma 1.4. Detailed notes about these improvements are available at http://wiki.squeak.org/squeak/6209. - Chris From sean at clipperadams.com Thu Aug 13 16:03:59 2015 From: sean at clipperadams.com (Sean P. DeNigris) Date: Thu Aug 13 16:07:31 2015 Subject: [squeak-dev] Re: [ANN] Magma 1.5 In-Reply-To: References: Message-ID: <1439481839068-4842595.post@n4.nabble.com> Chris Muller-4 wrote > I am pleased to announce version 1.5 of Magma Cool, congrats! A few questions: - How does Magma compare to e.g. GemStone? - Does it run on any other Smalltalks ( like possibly one in our family tree that starts with a $P ;) )? - Do you have to use a DB backend? Is that process totally manual (e.g. DB selection, creation, mapping, whatever)? ----- Cheers, Sean -- View this message in context: http://forum.world.st/ANN-Magma-1-5-tp4842581p4842595.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lewis at mail.msen.com Thu Aug 13 16:29:50 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Aug 13 16:29:52 2015 Subject: [squeak-dev] [ANN] Magma 1.5 In-Reply-To: References: Message-ID: <57084.136.2.1.104.1439483390.squirrel@webmail.msen.com> Cool - congratulations Chris! Dave > I am pleased to announce version 1.5 of Magma for Squeak 5, now > available on SqueakMap. Magma allows multiple Squeak images to > collaborate on a single, large object model, with the robustness and > control expected from a database. It offers the most transparent db > access possible for Smalltalk, affording the user the ability to > develop complex, performant designs, iteratively, on-the-fly. > > It has been designed for "continuous flow" development, the way > Smalltalkers like and expect to work. For example, I could have > connections open to 3 separate databases, open transactions in any of > them, and having restructured a class hierarchy in the model, and > stepping through the debugger when that "final boarding call" for my > flight is announced. > > Thanks to the image, this scenario has never been a problem for > Smalltalkers and Magma is deliberate to ensure this flow is > maintained. Once at 10K feet, I can resume stepping through that same > debugger within 5 seconds of restarting the image, DB connections > intact, commit my transactions when I'm ready, done. Magma handles > every aspect of that use-case correctly even in multi-user > environments, and has so many safety and integrity features, it is the > safest way to develop and keep a model in Squeak. > > This release coincides with the release of Squeak 5, and has many > improvements and fixes over Magma 1.4. Detailed notes about these > improvements are available at http://wiki.squeak.org/squeak/6209. > > - Chris > From eliot.miranda at gmail.com Thu Aug 13 17:23:15 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Aug 13 17:23:17 2015 Subject: [squeak-dev] Re: [Pharo-dev] [BUG]: Pharo 4.0: Pull Up Inst Var Loses Data In-Reply-To: <1439481493236-4842592.post@n4.nabble.com> References: <1439481493236-4842592.post@n4.nabble.com> Message-ID: Hi Sean, On Thu, Aug 13, 2015 at 8:58 AM, Sean P. DeNigris wrote: > This is a nasty one. If you pull up an inst var via Nautilus menus, any > data > in that variable is nil-ed out in all instances. Ouch, not fun :/ Anyone > else experience this? Same on 5.0? > This is a bug in as many refactoring implementations as I'm aware of. Essentially pull up ivar and push down ivar are decomposed into separate class modifications, and with this approach, without some effort taken at a higher level, ivar state is going to get lost. The observation is that with pull up and pull down affected instances don't need to be become, simply some of their instance variables may need to be permuted. For example if we have C (ivx) with subclasses SCA (ivy) SCB (ivz) and we pull up ivy to get C (ivx ivy) and SCA () and SCB (ivz) then instances of SCA don't need to be changed at all, and instances of SCB change from (ivx,ivz) to (ivx,ivy,ivz). But if we have C (ivi) with subclasses SCA (ivj ivk) SCB (ivl ivm) and we pull up ivk then instances of SCA change from (ivi,ivj,ivk) to (ivi,ivk,ivj). I think I'm right in thinking that in all cases the refactoring can be done by modifying classes *without* doing a become on general instances of the class from which the iv is pulled up; instead all that may be needed is a permute. The situation is analogous on push down, but even simpler. No instances change side; all that may happen is that ivars may need to be permuted if there is more than one ivar in the class from which the ivar is pushed down, and that ivar is not the last in the class definition. ----- > Cheers, > Sean > _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150813/66481f96/attachment.htm From squeaklist at gmail.com Thu Aug 13 17:31:20 2015 From: squeaklist at gmail.com (Kjell Godo) Date: Thu Aug 13 17:31:24 2015 Subject: [squeak-dev] [ANN] Magma 1.5 In-Reply-To: <57084.136.2.1.104.1439483390.squirrel@webmail.msen.com> References: <57084.136.2.1.104.1439483390.squirrel@webmail.msen.com> Message-ID: what is a deformant design? is this mainly for single separate users? can this scale on a server side? it can be used on the client side On Thursday, August 13, 2015, David T. Lewis wrote: > Cool - congratulations Chris! > > Dave > > > > I am pleased to announce version 1.5 of Magma for Squeak 5, now > > available on SqueakMap. Magma allows multiple Squeak images to > > collaborate on a single, large object model, with the robustness and > > control expected from a database. It offers the most transparent db > > access possible for Smalltalk, affording the user the ability to > > develop complex, performant designs, iteratively, on-the-fly. > > > > It has been designed for "continuous flow" development, the way > > Smalltalkers like and expect to work. For example, I could have > > connections open to 3 separate databases, open transactions in any of > > them, and having restructured a class hierarchy in the model, and > > stepping through the debugger when that "final boarding call" for my > > flight is announced. > > > > Thanks to the image, this scenario has never been a problem for > > Smalltalkers and Magma is deliberate to ensure this flow is > > maintained. Once at 10K feet, I can resume stepping through that same > > debugger within 5 seconds of restarting the image, DB connections > > intact, commit my transactions when I'm ready, done. Magma handles > > every aspect of that use-case correctly even in multi-user > > environments, and has so many safety and integrity features, it is the > > safest way to develop and keep a model in Squeak. > > > > This release coincides with the release of Squeak 5, and has many > > improvements and fixes over Magma 1.4. Detailed notes about these > > improvements are available at http://wiki.squeak.org/squeak/6209. > > > > - Chris > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150813/41365f90/attachment.htm From eliot.miranda at gmail.com Thu Aug 13 18:11:09 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Aug 13 18:11:12 2015 Subject: [squeak-dev] Suggestion for a performance analysis project, suitable for a masters student Message-ID: Hi All, I had occasion to compare VW (vw7.7nc) and Spur recently and was pleasantly surprised to see that Spur is on average -40% faster than VW on a large subset of the benchmarks from the shootout (I didn't include three because of Regex syntax issues). Now Spur gets some of its speed from having direct pointers vs VisualWorks' object header/table indirection, but it could get other speedups from various other differences. It would be great to know exactly how much speedup comes from what, and indeed how much cost Sour pays for its lazy become:. I'd like to propose a project to exactly determine the costs of an explicit read barrier and of lazy forwarding compared to no check at all. Spur, part of VMMaker.oscog, is implemented by a hierarchy of classes that implement a 32-bit and a 64-bit memory manager. Spur is a sibling to the old ObjectMemory class that implements the V3 object representation. The current Spur does "lazy forwarding" where two objects are become by cloning each object, making the old versions point to the opposite copy, and relying on send-time checks to lazily follow forwarding pointers when sends to forwarded objects fail a message lookup. The project would create two additional variations on Spur, both of which dispense with the lazy check. One would explicitly test for a forwarding pointers on every access, and one would never check, not need send-time checking either and would reimplement become: like the old ObjectMemory, by scanning the entire heap to exchange all references. These variations could be implemented as subclasses or siblings of Spur. The project isn't trivial because it also means making changes to the JIT, albeit within its framework for multiple object representations. Because this is probably some months' work I can't do it myself but I'm extremely interested in the results and I think it would make a really good paper, e.g. for ISMM, or one of the dynamic language workshops. If what I've said makes any sense at all to any academics out there who are looking for a challenging but nicely contained and far from open ended Masters project then please get in touch and we can see if we can take this any further. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150813/3cb17141/attachment.htm From squeaklist at gmail.com Thu Aug 13 18:17:08 2015 From: squeaklist at gmail.com (Kjell Godo) Date: Thu Aug 13 18:17:11 2015 Subject: [squeak-dev] [ANN] Magma 1.5 In-Reply-To: References: <57084.136.2.1.104.1439483390.squirrel@webmail.msen.com> Message-ID: what about Pharo? On Thursday, August 13, 2015, Kjell Godo wrote: > what is a deformant design? > > is this mainly for single separate users? > > can this scale on a server side? > > it can be used on the client side > > On Thursday, August 13, 2015, David T. Lewis > wrote: > >> Cool - congratulations Chris! >> >> Dave >> >> >> > I am pleased to announce version 1.5 of Magma for Squeak 5, now >> > available on SqueakMap. Magma allows multiple Squeak images to >> > collaborate on a single, large object model, with the robustness and >> > control expected from a database. It offers the most transparent db >> > access possible for Smalltalk, affording the user the ability to >> > develop complex, performant designs, iteratively, on-the-fly. >> > >> > It has been designed for "continuous flow" development, the way >> > Smalltalkers like and expect to work. For example, I could have >> > connections open to 3 separate databases, open transactions in any of >> > them, and having restructured a class hierarchy in the model, and >> > stepping through the debugger when that "final boarding call" for my >> > flight is announced. >> > >> > Thanks to the image, this scenario has never been a problem for >> > Smalltalkers and Magma is deliberate to ensure this flow is >> > maintained. Once at 10K feet, I can resume stepping through that same >> > debugger within 5 seconds of restarting the image, DB connections >> > intact, commit my transactions when I'm ready, done. Magma handles >> > every aspect of that use-case correctly even in multi-user >> > environments, and has so many safety and integrity features, it is the >> > safest way to develop and keep a model in Squeak. >> > >> > This release coincides with the release of Squeak 5, and has many >> > improvements and fixes over Magma 1.4. Detailed notes about these >> > improvements are available at http://wiki.squeak.org/squeak/6209. >> > >> > - Chris >> > >> >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150813/dbdeb3de/attachment.htm From squeaklist at gmail.com Thu Aug 13 18:18:54 2015 From: squeaklist at gmail.com (Kjell Godo) Date: Thu Aug 13 18:18:57 2015 Subject: [squeak-dev] [ANN] Magma 1.5 In-Reply-To: References: <57084.136.2.1.104.1439483390.squirrel@webmail.msen.com> Message-ID: Can moose and magma coexist in a Pharo image? On Thursday, August 13, 2015, Kjell Godo wrote: > what about Pharo? > > On Thursday, August 13, 2015, Kjell Godo > wrote: > >> what is a deformant design? >> >> is this mainly for single separate users? >> >> can this scale on a server side? >> >> it can be used on the client side >> >> On Thursday, August 13, 2015, David T. Lewis wrote: >> >>> Cool - congratulations Chris! >>> >>> Dave >>> >>> >>> > I am pleased to announce version 1.5 of Magma for Squeak 5, now >>> > available on SqueakMap. Magma allows multiple Squeak images to >>> > collaborate on a single, large object model, with the robustness and >>> > control expected from a database. It offers the most transparent db >>> > access possible for Smalltalk, affording the user the ability to >>> > develop complex, performant designs, iteratively, on-the-fly. >>> > >>> > It has been designed for "continuous flow" development, the way >>> > Smalltalkers like and expect to work. For example, I could have >>> > connections open to 3 separate databases, open transactions in any of >>> > them, and having restructured a class hierarchy in the model, and >>> > stepping through the debugger when that "final boarding call" for my >>> > flight is announced. >>> > >>> > Thanks to the image, this scenario has never been a problem for >>> > Smalltalkers and Magma is deliberate to ensure this flow is >>> > maintained. Once at 10K feet, I can resume stepping through that same >>> > debugger within 5 seconds of restarting the image, DB connections >>> > intact, commit my transactions when I'm ready, done. Magma handles >>> > every aspect of that use-case correctly even in multi-user >>> > environments, and has so many safety and integrity features, it is the >>> > safest way to develop and keep a model in Squeak. >>> > >>> > This release coincides with the release of Squeak 5, and has many >>> > improvements and fixes over Magma 1.4. Detailed notes about these >>> > improvements are available at http://wiki.squeak.org/squeak/6209. >>> > >>> > - Chris >>> > >>> >>> >>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150813/52321a4b/attachment.htm From leves at elte.hu Thu Aug 13 20:35:44 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Aug 13 20:35:49 2015 Subject: Shootout Regex benchmarks (was: Re: [squeak-dev] Suggestion for a performance analysis project, suitable for a masters student) In-Reply-To: References: Message-ID: Hi Eliot, I made many of the Shootout tests work[1] (including those which rely on Regex), and rewrote some of them to use Squeak-specific optimizations instead of VW-specific ones. I know the latter may be something you don't want to have, but the Regex version in the Inbox[2] is (or at least it should be) compatible with the Shootout benchmarks. Evaluating ShootoutTests runAllToDummyStreamVs: ShootoutTests referenceTimesForVW I get the following: {[self binarytrees: 16 to: stream]} took 1.441 seconds ratio: 0.597 % change: -40.331% {[self chameneosredux: 600000 to: stream]} took 2.083 seconds ratio: 0.42 % change: -58.038% {[self fannkuchRedux: 10 to: stream]} took 3.362 seconds ratio: 0.896 % change: -10.371% {[self fasta: 2500000 to: stream]} took 5.794 seconds ratio: 1.199 % change: 19.934% {[self fastaRedux: 2500000 to: stream]} took 2.281 seconds ratio: 0.627 % change: -37.318% {[self mandelbrot3: 1000 to: stream]} took 1.26 seconds ratio: 0.311 % change: -68.943% {[self meteor: 2098 to: stream]} took 0.415 seconds ratio: 0.769 % change: -23.148% {[self nbody: 500000 to: stream]} took 1.076 seconds ratio: 0.332 % change: -66.8% {[self pidigitsTo: 2000 width: 10 to: stream]} took 0.859 seconds ratio: 0.795 % change: -20.463% {[self regexDNA: fasta50000 to: stream]} took 3.729 seconds ratio: 0.533 % change: -46.668% {[self reverseComplement: fasta2500000 to: stream]} took 0.177 seconds ratio: 0.058 % change: -94.231% {[self spectralnorm: 500]} took 0.594 seconds ratio: 0.607 % change: -39.264% {[self threadring: 5000000 to: stream]} took 1.655 seconds ratio: 0.341 % change: -65.89% geometric mean '0.478' average speedup '-52.212'% This comparison is unfair of course, because the reference numbers are from a different machine and they use a dummy stream, but it's still useful to make estimates. Levente [1] http://leves.web.elte.hu/squeak/Shootout-ul.18.mcz [2] http://source.squeak.org/inbox/Regex-Core-ul.37.mcz On Thu, 13 Aug 2015, Eliot Miranda wrote: > Hi All, > ? ? I had occasion to compare VW (vw7.7nc) and Spur recently and was pleasantly surprised to see that Spur is on average -40% faster than VW on a large subset of the benchmarks from the shootout (I didn't > include three because of Regex syntax issues).? Now Spur gets some of its speed from having direct pointers vs VisualWorks' object header/table indirection, but it could get other speedups from various other > differences.? It would be great to know exactly how much speedup comes from what, and indeed how much cost Sour pays for its lazy become:.? I'd like to propose a project to exactly determine the costs of an > explicit read barrier and of lazy forwarding compared to no check at all. > > Spur, part of VMMaker.oscog, is implemented by a hierarchy of classes that implement a 32-bit and a 64-bit memory manager.? Spur is a sibling to the old ObjectMemory class that implements the V3 object > representation.? The current Spur does "lazy forwarding" where two objects are become by cloning each object, making the old versions point to the opposite copy, and relying on send-time checks to lazily > follow forwarding pointers when sends to forwarded objects fail a message lookup. > > The project would create two additional variations on Spur, both of which dispense with the lazy check.? One would explicitly test for a forwarding pointers on every access, and one would never check, not > need send-time checking either and would reimplement become: like the old ObjectMemory, by scanning the entire heap to exchange all references. > > These variations could be implemented as subclasses or siblings of Spur.? The project isn't trivial because it also means making changes to the JIT, albeit within its framework for multiple object > representations.? Because this is probably some months' work I can't do it myself but I'm extremely interested in the results and I think it would make a really good paper, e.g. for ISMM, or one of the > dynamic language workshops. > > If what I've said makes any sense at all to any academics out there who are looking for a challenging but nicely contained and far from open ended Masters project then please get in touch and we can see if we > can take this any further. > > _,,,^..^,,,_ > best,?Eliot > > From eliot.miranda at gmail.com Thu Aug 13 21:45:55 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Aug 13 21:45:58 2015 Subject: Shootout Regex benchmarks (was: Re: [squeak-dev] Suggestion for a performance analysis project, suitable for a masters student) In-Reply-To: References: Message-ID: Levente, On Thu, Aug 13, 2015 at 1:35 PM, Levente Uzonyi wrote: > Hi Eliot, > > I made many of the Shootout tests work[1] (including those which rely on > Regex), and rewrote some of them to use Squeak-specific optimizations > instead of VW-specific ones. > I know the latter may be something you don't want to have, but the Regex > version in the Inbox[2] is (or at least it should be) compatible with the > Shootout benchmarks. > Great! Where were you yesterday ? :-). I spent yesterday getting my own version of these somewhat working only to find that you've done the complete job. Thanks you!! BTW, here's the data I get on a 2.3GHz Core i7 MacMini comparing the latest Spur against vw7.7 #( 46.25857966666666 "total time to run suite on 7.7nc" 26.88 "total time to run suite on Spur r3420" 1.7209293030753967 "ratio Spur vs 7.7" -41.89186050740468 "% speedup of Spur relative to 7.7" "benchmark" "ratio" "% change, new - old / old * 100" #( #(#binarytrees 1.99 -49.77) #(#chameneosredux2 3.52 -71.62) #(#fannkuchredux 0.82 21.59) #(#fastaredux 1.27 -21.22) #(#mandelbrot2 2.6 -61.54) #(#meteor 1.09 -8.26) #(#pidigits4 1.4 -28.54) #(#spectralnorm2 1.20 -16.76))) Good numbers :-) > Evaluating > > ShootoutTests runAllToDummyStreamVs: ShootoutTests > referenceTimesForVW > > I get the following: > > {[self binarytrees: 16 to: stream]} > took 1.441 seconds > ratio: 0.597 % change: -40.331% > > {[self chameneosredux: 600000 to: stream]} > took 2.083 seconds > ratio: 0.42 % change: -58.038% > > {[self fannkuchRedux: 10 to: stream]} > took 3.362 seconds > ratio: 0.896 % change: -10.371% > > {[self fasta: 2500000 to: stream]} > took 5.794 seconds > ratio: 1.199 % change: 19.934% > > {[self fastaRedux: 2500000 to: stream]} > took 2.281 seconds > ratio: 0.627 % change: -37.318% > > {[self mandelbrot3: 1000 to: stream]} > took 1.26 seconds > ratio: 0.311 % change: -68.943% > > {[self meteor: 2098 to: stream]} > took 0.415 seconds > ratio: 0.769 % change: -23.148% > > {[self nbody: 500000 to: stream]} > took 1.076 seconds > ratio: 0.332 % change: -66.8% > > {[self > pidigitsTo: 2000 > width: 10 > to: stream]} > took 0.859 seconds > ratio: 0.795 % change: -20.463% > > {[self regexDNA: fasta50000 to: stream]} > took 3.729 seconds > ratio: 0.533 % change: -46.668% > > {[self reverseComplement: fasta2500000 to: stream]} > took 0.177 seconds > ratio: 0.058 % change: -94.231% > > {[self spectralnorm: 500]} > took 0.594 seconds > ratio: 0.607 % change: -39.264% > > {[self threadring: 5000000 to: stream]} > took 1.655 seconds > ratio: 0.341 % change: -65.89% > geometric mean '0.478' average speedup '-52.212'% > > This comparison is unfair of course, because the reference numbers are > from a different machine and they use a dummy stream, but it's still useful > to make estimates. > Yes. Testing to the dummy stream is useful for profiling where one wants to focus on the cost of the algorithm. But having the framework be flexible is useful. Especially making it easy to compare against different baselines, e.g. VW, Cog V3, Interpreter V3, etc, > > Levente > > [1] http://leves.web.elte.hu/squeak/Shootout-ul.18.mcz > [2] http://source.squeak.org/inbox/Regex-Core-ul.37.mcz Great, thanks! > > > On Thu, 13 Aug 2015, Eliot Miranda wrote: > > Hi All, >> I had occasion to compare VW (vw7.7nc) and Spur recently and was >> pleasantly surprised to see that Spur is on average -40% faster than VW on >> a large subset of the benchmarks from the shootout (I didn't >> include three because of Regex syntax issues). Now Spur gets some of its >> speed from having direct pointers vs VisualWorks' object header/table >> indirection, but it could get other speedups from various other >> differences. It would be great to know exactly how much speedup comes >> from what, and indeed how much cost Sour pays for its lazy become:. I'd >> like to propose a project to exactly determine the costs of an >> explicit read barrier and of lazy forwarding compared to no check at all. >> >> Spur, part of VMMaker.oscog, is implemented by a hierarchy of classes >> that implement a 32-bit and a 64-bit memory manager. Spur is a sibling to >> the old ObjectMemory class that implements the V3 object >> representation. The current Spur does "lazy forwarding" where two >> objects are become by cloning each object, making the old versions point to >> the opposite copy, and relying on send-time checks to lazily >> follow forwarding pointers when sends to forwarded objects fail a message >> lookup. >> >> The project would create two additional variations on Spur, both of which >> dispense with the lazy check. One would explicitly test for a forwarding >> pointers on every access, and one would never check, not >> need send-time checking either and would reimplement become: like the old >> ObjectMemory, by scanning the entire heap to exchange all references. >> >> These variations could be implemented as subclasses or siblings of Spur. >> The project isn't trivial because it also means making changes to the JIT, >> albeit within its framework for multiple object >> representations. Because this is probably some months' work I can't do >> it myself but I'm extremely interested in the results and I think it would >> make a really good paper, e.g. for ISMM, or one of the >> dynamic language workshops. >> >> If what I've said makes any sense at all to any academics out there who >> are looking for a challenging but nicely contained and far from open ended >> Masters project then please get in touch and we can see if we >> can take this any further. >> >> _,,,^..^,,,_ >> best, Eliot >> >> > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150813/119da947/attachment.htm From eliot.miranda at gmail.com Thu Aug 13 22:28:10 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Aug 13 22:28:13 2015 Subject: [squeak-dev] Re: Regex In-Reply-To: <1439465700422-4842488.post@n4.nabble.com> References: <1439465700422-4842488.post@n4.nabble.com> Message-ID: +1. to the trunk. On Thu, Aug 13, 2015 at 4:35 AM, marcel.taeumel wrote: > Wohoooo!!!! :D > > Trunk! Trunk! Trunk! :) > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/Regex-tp4842477p4842488.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/20150813/c6bdc3b4/attachment.htm From dionisiydk at gmail.com Fri Aug 14 07:34:34 2015 From: dionisiydk at gmail.com (Denis Kudriashov) Date: Fri Aug 14 07:34:55 2015 Subject: [squeak-dev] Re: [ANN] Magma 1.5 In-Reply-To: <1439481839068-4842595.post@n4.nabble.com> References: <1439481839068-4842595.post@n4.nabble.com> Message-ID: Hi 2015-08-13 19:03 GMT+03:00 Sean P. DeNigris : > A few questions: > - How does Magma compare to e.g. GemStone? > - Does it run on any other Smalltalks ( like possibly one in our family > tree > Magma is static external object storage. But gemstone is "usual" live smalltalk image which allow transactions and multiusers access. Maybe Chris can explain that it is not much difference in practice. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150814/b2dca46c/attachment.htm From commits at source.squeak.org Fri Aug 14 20:25:55 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:25:56 2015 Subject: [squeak-dev] The Trunk: Collections-ul.640.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.640.mcz ==================== Summary ==================== Name: Collections-ul.640 Author: ul Time: 12 August 2015, 10:35:29.572 pm UUID: 1065564d-36c5-43a1-842b-3be19ce91a3e Ancestors: Collections-cmm.639 Character: - sped up various methods by storing and reusing the result of #asInteger in a temporary variable. - sped up #isSeparator by eliminating the last branch. Swapped the tab and cr checks, because source code has more tabs than crs. - unified methods with mixed #asInteger and #asciiValue sends - #isAscii uses #< instead of #between:and:, like #isOctetCharacter does. - #asUnicode uses the same shortcut as #encodedCharSet does - quick return in #printOn: and #storeOn: String: - added identity check (should help with Text comparison) and quick returns to #= - spaceship operator uses #compare: if the argument is a string - added a fast #asSignedInteger implementation Text: - removed the identity check from Text >> #=, because String >> #= does it - the spaceship operator uses String's spaceship operator =============== Diff against Collections-cmm.639 =============== Item was changed: ----- Method: Character>>< (in category 'comparing') ----- < aCharacter "Answer true if the receiver's value < aCharacter's value." + ^self asInteger < aCharacter asInteger! - ^self asInteger < aCharacter asciiValue! Item was changed: ----- Method: Character>><= (in category 'comparing') ----- <= aCharacter "Answer true if the receiver's value <= aCharacter's value." + ^self asInteger <= aCharacter asInteger! - ^self asInteger <= aCharacter asciiValue! Item was changed: ----- Method: Character>>> (in category 'comparing') ----- > aCharacter "Answer true if the receiver's value > aCharacter's value." + ^self asInteger > aCharacter asInteger! - ^self asInteger > aCharacter asciiValue! Item was changed: ----- Method: Character>>>= (in category 'comparing') ----- >= aCharacter "Answer true if the receiver's value >= aCharacter's value." + ^self asInteger >= aCharacter asInteger! - ^self asInteger >= aCharacter asciiValue! Item was changed: ----- Method: Character>>asLowercase (in category 'converting') ----- asLowercase "Answer the receiver's matching lowercase Character." + | integerValue | + (integerValue := self asInteger) > 255 ifFalse: [ - self asInteger > 255 ifFalse: [ | result | + (result := (ClassificationTable at: integerValue + 1) bitAnd: 16rFF) > 0 - (result := (ClassificationTable at: self asInteger + 1) bitAnd: 16rFF) > 0 ifTrue: [ ^self class value: result ] ]. + ^self class value: (self encodedCharSet toLowercaseCode: integerValue)! - ^self class value: (self encodedCharSet toLowercaseCode: self asInteger)! Item was changed: ----- Method: Character>>asUnicode (in category 'converting') ----- asUnicode "Answer the unicode encoding of the receiver" + + | integerValue | + (integerValue := self asInteger) <= 16r3FFFFF ifTrue: [ ^integerValue ]. + ^self encodedCharSet charsetClass convertToUnicode: (integerValue bitAnd: 16r3FFFFF) - self leadingChar = 0 ifTrue: [^ self asInteger]. - ^self encodedCharSet charsetClass convertToUnicode: self charCode ! Item was changed: ----- Method: Character>>asUppercase (in category 'converting') ----- asUppercase "Answer the receiver's matching uppercase Character." + | integerValue | + (integerValue := self asInteger) > 255 ifFalse: [ - self asInteger > 255 ifFalse: [ | result | + (result := ((ClassificationTable at: integerValue + 1) bitShift: -8) bitAnd: 16rFF) > 0 - (result := ((ClassificationTable at: self asInteger + 1) bitShift: -8) bitAnd: 16rFF) > 0 ifTrue: [ ^self class value: result ] ]. + ^self class value: (self encodedCharSet toUppercaseCode: integerValue)! - ^self class value: (self encodedCharSet toUppercaseCode: self asInteger)! Item was changed: ----- Method: Character>>digitValue (in category 'accessing') ----- digitValue "Answer 0-9 if the receiver is $0-$9, 10-35 if it is $A-$Z, and < 0 otherwise. This is used to parse literal numbers of radix 2-36." + | integerValue | + (integerValue := self asInteger) > 16rFF ifTrue: [^self encodedCharSet digitValueOf: self]. + ^DigitValues at: integerValue + 1! - self asInteger > 16rFF ifTrue: [^self encodedCharSet digitValueOf: self]. - ^DigitValues at: 1 + self asInteger! Item was changed: ----- Method: Character>>isAlphaNumeric (in category 'testing') ----- isAlphaNumeric "Answer whether the receiver is a letter or a digit." + | integerValue | + (integerValue := self asInteger) > 255 ifFalse: [ + ^((ClassificationTable at: integerValue + 1) bitAnd: AlphaNumericMask) > 0 ]. - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self asInteger + 1) bitAnd: AlphaNumericMask) > 0 ]. ^self encodedCharSet isAlphaNumeric: self! Item was changed: ----- Method: Character>>isAscii (in category 'testing') ----- isAscii + + ^self asInteger < 128! - ^ self asInteger between: 0 and: 127! Item was changed: ----- Method: Character>>isDigit (in category 'testing') ----- isDigit + | integerValue | + (integerValue := self asInteger) > 255 ifFalse: [ + ^((ClassificationTable at: integerValue + 1) bitAnd: DigitBit) > 0 ]. - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self asInteger + 1) bitAnd: DigitBit) > 0 ]. ^self encodedCharSet isDigit: self. ! Item was changed: ----- Method: Character>>isLetter (in category 'testing') ----- isLetter + | integerValue | + (integerValue := self asInteger) > 255 ifFalse: [ + ^((ClassificationTable at: integerValue + 1) bitAnd: LetterMask) > 0 ]. - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self asInteger + 1) bitAnd: LetterMask) > 0 ]. ^self encodedCharSet isLetter: self! Item was changed: ----- Method: Character>>isLowercase (in category 'testing') ----- isLowercase + | integerValue | + (integerValue := self asInteger) > 255 ifFalse: [ + ^((ClassificationTable at: integerValue + 1) bitAnd: LowercaseBit) > 0 ]. - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self asInteger + 1) bitAnd: LowercaseBit) > 0 ]. ^self encodedCharSet isLowercase: self. ! Item was changed: ----- Method: Character>>isSeparator (in category 'testing') ----- isSeparator "Answer whether the receiver is one of the separator characters--space, cr, tab, line feed, or form feed." + | integerValue | + (integerValue := self asInteger) = 32 ifTrue: [ ^true ]. "space" + integerValue = 9 ifTrue: [ ^true ]. "tab" + integerValue = 13 ifTrue: [ ^true ]. "cr" + integerValue = 10 ifTrue: [ ^true ]. "line feed" + ^integerValue = 12 "form feed"! - self asInteger = 32 ifTrue: [^true]. "space" - self asInteger = 13 ifTrue: [^true]. "cr" - self asInteger = 9 ifTrue: [^true]. "tab" - self asInteger = 10 ifTrue: [^true]. "line feed" - self asInteger = 12 ifTrue: [^true]. "form feed" - ^false! Item was changed: ----- Method: Character>>isUppercase (in category 'testing') ----- isUppercase + | integerValue | + (integerValue := self asInteger) > 255 ifFalse: [ + ^((ClassificationTable at: integerValue + 1) bitAnd: UppercaseBit) > 0 ]. - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self asInteger + 1) bitAnd: UppercaseBit) > 0 ]. ^self encodedCharSet isUppercase: self. ! Item was changed: ----- Method: Character>>printOn: (in category 'printing') ----- printOn: aStream + + | integerValue | + ((integerValue := self asInteger) > 32 and: [ integerValue ~= 127 ]) ifTrue: [ + aStream nextPut: $$; nextPut: self. + ^self ]. + (self class constantNameFor: self) + ifNotNil: [ :name | aStream nextPutAll: self class name; space; nextPutAll: name ] + ifNil: [ aStream nextPutAll: self class name; nextPutAll: ' value: '; print: integerValue ]! - | name | - (self asInteger > 32 and: [self asInteger ~= 127]) - ifTrue: [ aStream nextPut: $$; nextPut: self ] - ifFalse: [ - name := self class constantNameFor: self. - name notNil - ifTrue: [ aStream nextPutAll: self class name; space; nextPutAll: name ] - ifFalse: [ aStream nextPutAll: self class name; nextPutAll: ' value: '; print: self asInteger ] ].! Item was changed: ----- Method: Character>>shouldBePrintedAsLiteral (in category 'testing') ----- shouldBePrintedAsLiteral + | integerValue | + ^((integerValue := self asInteger) between: 33 and: 255) and: [self asInteger ~= 127]! - ^(self asInteger between: 33 and: 255) and: [self asInteger ~= 127]! Item was changed: ----- Method: Character>>storeBinaryOn: (in category 'printing') ----- storeBinaryOn: aStream "Store the receiver on a binary (file) stream" + | integerValue | + (integerValue := self asInteger) < 256 - self asInteger < 256 ifTrue: [ aStream basicNextPut: self ] + ifFalse: [ aStream nextInt32Put: integerValue ]! - ifFalse: [ aStream nextInt32Put: self asInteger ]! Item was changed: ----- Method: Character>>storeDataOn: (in category 'object fileIn') ----- storeDataOn: aDataStream " Store characters in reference-like way, with value like instvar. This is compatible with various Squeak Memory Systems" aDataStream beginInstance: self class + size: 1; + nextPut: self asInteger! - size: 1. - aDataStream nextPut: self asInteger.! Item was changed: ----- Method: Character>>storeOn: (in category 'printing') ----- storeOn: aStream "Common character literals are preceded by '$', however special need to be encoded differently: for some this might be done by using one of the shortcut constructor methods for the rest we have to create them by ascii-value." + self shouldBePrintedAsLiteral ifTrue: [ + aStream nextPut: $$; nextPut: self. + ^self ]. + (self class constantNameFor: self) ifNotNil: [ :name | + aStream nextPutAll: self class name; space; nextPutAll: name. + ^self ]. + aStream + nextPut: $(; nextPutAll: self class name; + nextPutAll: ' value: '; print: self asInteger; nextPut: $)! - | name | - self shouldBePrintedAsLiteral - ifTrue: [ aStream nextPut: $$; nextPut: self ] - ifFalse: [ - name := self class constantNameFor: self. - name notNil - ifTrue: [ aStream nextPutAll: self class name; space; nextPutAll: name ] - ifFalse: [ - aStream - nextPut: $(; nextPutAll: self class name; - nextPutAll: ' value: '; print: self asInteger; nextPut: $) ] ].! Item was changed: ----- Method: CharacterSet>>includes: (in category 'collection ops') ----- includes: aCharacter + + | index | + (index := aCharacter asInteger + 1) > 256 ifTrue: [ ^false ]. + ^(map at: index) > 0! - aCharacter asciiValue >= 256 - ifTrue: ["Guard against wide characters" - ^false]. - ^(map at: aCharacter asciiValue + 1) > 0! Item was changed: ----- Method: String>><=> (in category 'sorting') ----- <=> aCharacterArray "Return a collation order of -1, 0, or 1, indicating whether I should be collated before the receiver, am equal, or after. See also: http://en.wikipedia.org/wiki/Spaceship_operator" + aCharacterArray isString ifTrue: [ ^(self compare: aCharacterArray) - 2 ]. + self = aCharacterArray ifTrue: [ ^0 ]. + self < aCharacterArray ifTrue: [ ^-1 ]. + ^1! - ^self = aCharacterArray - ifTrue: [ 0 ] - ifFalse: [self < aCharacterArray - ifTrue: [ -1 ] - ifFalse: [ 1 ]]! Item was changed: ----- Method: String>>= (in category 'comparing') ----- = aString "Answer whether the receiver sorts equally as aString. The collation order is simple ascii (with case differences)." + self == aString ifTrue: [ ^true ]. + aString isString ifFalse: [ ^false ]. + self size = aString size ifFalse: [ ^false ]. - (aString isString - and: [self size = aString size]) ifFalse: [^ false]. ^ (self compare: self with: aString collated: AsciiOrder) = 2! Item was changed: ----- Method: String>>asSignedInteger (in category 'converting') ----- asSignedInteger "Returns the first signed integer it can find or nil." + | result character index negative | + (self at: 1) isDigit + ifTrue: [ index := 1 ] + ifFalse: [ + index := self findFirst: [ :char | char isDigit ]. + index = 0 ifTrue: [ ^nil ] ]. + negative := index > 1 and: [ (self at: index - 1) == $- ]. + result := 0. + [ index <= self size and: [ (character := self at: index) isDigit ] ] whileTrue: [ + result := result * 10 + character asciiValue - 48 "$0 asciiValue". + index := index + 1 ]. + negative ifTrue: [ ^0 - result ]. + ^result + ! - | start | - start := self findFirst: [:char | char isDigit]. - start isZero ifTrue: [^ nil]. - (start > 1 and: [self at: start - 1]) = $- ifTrue: [start := start - 1]. - ^ Integer readFrom: (ReadStream on: self from: start to: self size)! Item was changed: ----- Method: Text>><=> (in category 'sorting') ----- <=> aCharacterArray "Return a collation order of -1, 0, or 1, indicating whether I should be collated before the receiver, am equal, or after. See also: http://en.wikipedia.org/wiki/Spaceship_operator" + aCharacterArray isString ifTrue: [ ^string <=> aCharacterArray ]. + ^string <=> aCharacterArray asString! - ^string = aCharacterArray - ifTrue: [ 0 ] - ifFalse: [string < aCharacterArray asString - ifTrue: [ -1 ] - ifFalse: [ 1 ]]! Item was changed: ----- Method: Text>>= (in category 'comparing') ----- = other "Am I equal to the other Text or String? ***** Warning ***** Two Texts are considered equal if they have the same characters in them. They might have completely different emphasis, fonts, sizes, text actions, or embedded morphs. If you need to find out if one is a true copy of the other, you must do (text1 = text2 and: [text1 runs = text2 runs])." + other isText ifTrue: [ ^string = other string ]. + other isString ifTrue: [ ^string = other ]. + ^false! - other isText ifTrue: ["This is designed to run fast even for megabytes" - ^ string == other string or: [string = other string]]. - other isString ifTrue: [^ string == other or: [string = other]]. - ^ false! From commits at source.squeak.org Fri Aug 14 20:27:20 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:27:23 2015 Subject: [squeak-dev] The Trunk: Collections-ul.641.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.641.mcz ==================== Summary ==================== Name: Collections-ul.641 Author: ul Time: 14 August 2015, 6:59:54.138 pm UUID: c373bfdf-0a07-40c8-8505-75c157cbb352 Ancestors: Collections-ul.640 Character: - even faster #isSeparator - class side #initialize sends #initializeClassificationTable - atomic class side #initializeDigitValues String: - renamed #includesSubString: to #includesSubstring: - deprecated #includesSubString: General: #includesSubString: -> #includesSubstring: =============== Diff against Collections-ul.640 =============== Item was changed: ----- Method: Character class>>initialize (in category 'class initialization') ----- initialize - "Create the DigitsValues table." "Character initialize" + + self + initializeClassificationTable; + initializeDigitValues! - self initializeDigitValues! Item was changed: ----- Method: Character class>>initializeDigitValues (in category 'class initialization') ----- initializeDigitValues "Initialize the well known digit value of ascii characters. Note that the DigitValues table is 1-based while ascii values are 0-based, thus the offset +1." + | newDigitValues | + newDigitValues := Array new: 256 withAll: -1. - DigitValues := Array new: 256 withAll: -1. "the digits" + 0 to: 9 do: [:i | newDigitValues at: 48 + i + 1 put: i]. - 0 to: 9 do: [:i | DigitValues at: 48 + i + 1 put: i]. "the uppercase letters" + 10 to: 35 do: [:i | newDigitValues at: 55 + i + 1 put: i]. - 10 to: 35 do: [:i | DigitValues at: 55 + i + 1 put: i]. "the lowercase letters" + 10 to: 35 do: [:i | newDigitValues at: 87 + i + 1 put: i]. + DigitValues := newDigitValues! - 10 to: 35 do: [:i | DigitValues at: 87 + i + 1 put: i].! Item was changed: ----- Method: Character>>isSeparator (in category 'testing') ----- isSeparator "Answer whether the receiver is one of the separator characters--space, cr, tab, line feed, or form feed." | integerValue | + (integerValue := self asInteger) > 32 ifTrue: [ ^false ]. + integerValue + caseOf: { + [ 32 "space" ] -> [ ^true ]. + [ 9 "cr" ] -> [ ^true ]. + [ 13 "tab"] -> [ ^true ]. + [ 10 "line feed" ] -> [ ^true ] } + otherwise: [ ^integerValue = 12 "form feed" ]! - (integerValue := self asInteger) = 32 ifTrue: [ ^true ]. "space" - integerValue = 9 ifTrue: [ ^true ]. "tab" - integerValue = 13 ifTrue: [ ^true ]. "cr" - integerValue = 10 ifTrue: [ ^true ]. "line feed" - ^integerValue = 12 "form feed"! Item was changed: ----- Method: Collection>>includesSubstringAnywhere: (in category 'testing') ----- includesSubstringAnywhere: testString "Answer whether the receiver includes, anywhere in its nested structure, a string that has testString as a substring" self do: [:element | (element isString) ifTrue: + [(element includesSubstring: testString) ifTrue: [^ true]]. - [(element includesSubString: testString) ifTrue: [^ true]]. (element isCollection) ifTrue: [(element includesSubstringAnywhere: testString) ifTrue: [^ true]]]. ^ false "#(first (second third) ((allSentMessages ('Elvis' includes:)))) includesSubstringAnywhere: 'lvi'"! Item was changed: ----- Method: String>>findTokens:includes: (in category 'accessing') ----- findTokens: delimiters includes: subString "Divide self into pieces using delimiters. Return the piece that includes subString anywhere in it. Is case sensitive (say asLowercase to everything beforehand to make insensitive)." ^ (self findTokens: delimiters) + detect: [:str | (str includesSubstring: subString)] - detect: [:str | (str includesSubString: subString)] ifNone: [nil]! Item was changed: ----- Method: String>>includesSubString: (in category 'testing') ----- includesSubString: subString + + self deprecated: 'Use #includesSubstring: instead.'. + ^self includesSubstring: subString! - ^ (self findString: subString startingAt: 1) > 0! Item was added: + ----- Method: String>>includesSubstring: (in category 'testing') ----- + includesSubstring: aString + + ^(self findString: aString startingAt: 1) > 0! From commits at source.squeak.org Fri Aug 14 20:27:24 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:27:26 2015 Subject: [squeak-dev] The Trunk: CollectionsTests-ul.246.mcz Message-ID: Levente Uzonyi uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-ul.246.mcz ==================== Summary ==================== Name: CollectionsTests-ul.246 Author: ul Time: 14 August 2015, 7:00:12.324 pm UUID: 2f3963da-821d-4bea-be7f-7a10e6357841 Ancestors: CollectionsTests-topa.245 #includesSubString: -> #includesSubstring: =============== Diff against CollectionsTests-topa.245 =============== Item was changed: ----- Method: CharacterSetComplementTest>>testPrintString (in category 'testing') ----- testPrintString |s| s := CharacterSet separators complement printString. + self assert: (s includesSubstring: 'complement') description: 'Doesn''t describe its fundamental characteristic'. + self assert: (s includesSubstring: 'Character space') description: 'Doesn''t mention an important separator'.! - self assert: (s includesSubString: 'complement') description: 'Doesn''t describe its fundamental characteristic'. - self assert: (s includesSubString: 'Character space') description: 'Doesn''t mention an important separator'.! From commits at source.squeak.org Fri Aug 14 20:27:47 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:27:48 2015 Subject: [squeak-dev] The Trunk: Compiler-ul.306.mcz Message-ID: Levente Uzonyi uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-ul.306.mcz ==================== Summary ==================== Name: Compiler-ul.306 Author: ul Time: 14 August 2015, 7:00:29.616 pm UUID: d876b73a-547e-4172-b11b-0a878aed4d3d Ancestors: Compiler-cmm.305 #includesSubString: -> #includesSubstring: =============== Diff against Compiler-cmm.305 =============== Item was changed: ----- Method: MethodNode>>printWithClosureAnalysisOn: (in category 'printing') ----- printWithClosureAnalysisOn: aStream self ensureClosureAnalysisDone. precedence = 1 ifTrue: + [(self selector includesSubstring: '()/') - [(self selector includesSubString: '()/') ifTrue: [aStream nextPutAll: (self selector copyUpTo: $)). arguments do: [:arg| aStream nextPutAll: arg key] separatedBy: [aStream nextPutAll: ', ']. aStream nextPut: $)] ifFalse: [aStream nextPutAll: self selector]] "no node for method selector" ifFalse: [self selector keywords with: arguments do: [:kwd :arg | aStream nextPutAll: kwd; space. arg printDefinitionForClosureAnalysisOn: aStream. aStream space]]. comment == nil ifFalse: [aStream crtab: 1. self printCommentOn: aStream indent: 1]. temporaries size > 0 ifTrue: [aStream crtab: 1; nextPut: $|. temporaries do: [:temp | aStream space. temp printDefinitionForClosureAnalysisOn: aStream]. aStream space; nextPut: $|]. primitive > 0 ifTrue: [(primitive between: 255 and: 519) ifFalse: "Dont decompile quick prims e.g, ^ self or ^instVar" [aStream crtab: 1. self printPrimitiveOn: aStream]]. self printPropertiesOn: aStream. self printPragmasOn: aStream. aStream crtab: 1. block printWithClosureAnalysisStatementsOn: aStream indent: 0! Item was changed: ----- Method: SelectorNode>>isForFFICall (in category 'testing') ----- isForFFICall + ^key includesSubstring: '()/'! - ^key includesSubString: '()/'! From commits at source.squeak.org Fri Aug 14 20:28:00 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:28:01 2015 Subject: [squeak-dev] The Trunk: Installer-Core-ul.398.mcz Message-ID: Levente Uzonyi uploaded a new version of Installer-Core to project The Trunk: http://source.squeak.org/trunk/Installer-Core-ul.398.mcz ==================== Summary ==================== Name: Installer-Core-ul.398 Author: ul Time: 14 August 2015, 7:00:44.34 pm UUID: b99e1238-ba2d-4373-bb14-f146de86ff72 Ancestors: Installer-Core-cmm.397 #includesSubString: -> #includesSubstring: =============== Diff against Installer-Core-cmm.397 =============== Item was changed: ----- Method: InstallerInternetBased>>wasPbwikiSpeedWarning (in category 'url') ----- wasPbwikiSpeedWarning + ^ self hasPage and: [pageDataStream contents includesSubstring: 'Please slow down a bit' ] - ^ self hasPage and: [pageDataStream contents includesSubString: 'Please slow down a bit' ] ! Item was changed: ----- Method: InstallerMonticello>>http:user:password: (in category 'instance creation') ----- http: aUrl user: name password: secret | url | + url := (aUrl includesSubstring: '://') - url := (aUrl includesSubString: '://') ifTrue: [aUrl] ifFalse: ['http://', aUrl]. mc := self classMCHttpRepository location: url user: name password: secret. root := mc locationWithTrailingSlash ! From commits at source.squeak.org Fri Aug 14 20:29:55 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:29:56 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.940.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.940.mcz ==================== Summary ==================== Name: Kernel-ul.940 Author: ul Time: 14 August 2015, 7:01:14.824 pm UUID: 45cb01b1-52ab-40ff-ac9d-7b3334915356 Ancestors: Kernel-ul.939 #allCharacters -> #allByteCharacters =============== Diff against Kernel-ul.939 =============== Item was changed: ----- Method: InputSensor class>>installKeyDecodeTable (in category 'class initialization') ----- installKeyDecodeTable "Create a decode table that swaps some keys if Preferences swapControlAndAltKeys is set" KeyDecodeTable := Dictionary new. Preferences duplicateControlAndAltKeys ifTrue: [ self defaultCrossPlatformKeys do: [ :c | self installDuplicateKeyEntryFor: c ] ]. Preferences swapControlAndAltKeys ifTrue: [ self defaultCrossPlatformKeys do: [ :c | self installSwappedKeyEntryFor: c ] ]. Preferences duplicateAllControlAndAltKeys + ifTrue: [ (Character allByteCharacters select: [:ea | ea isAlphaNumeric]) do: - ifTrue: [ (Character allCharacters select: [:ea | ea isAlphaNumeric]) do: [ :c | self installDuplicateKeyEntryFor: c ] ]. ! From commits at source.squeak.org Fri Aug 14 20:30:29 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:30:30 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.941.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.941.mcz ==================== Summary ==================== Name: Kernel-ul.941 Author: ul Time: 14 August 2015, 10:13:29.228 pm UUID: fc6d8eaf-1f0b-459c-9ff7-89c0a607ec72 Ancestors: Kernel-ul.940 - added support for regular expressions to BlockClosure >> #valueSupplyingAnswers: =============== Diff against Kernel-ul.940 =============== Item was changed: ----- Method: BlockClosure>>valueSupplyingAnswers: (in category 'evaluating') ----- valueSupplyingAnswers: aListOfPairs "evaluate the block using a list of questions / answers that might be called upon to automatically respond to Object>>confirm: or FillInTheBlank requests" ^self on: ProvideAnswerNotification do: [ :notification | | caption | caption := notification messageText withSeparatorsCompacted. "to remove new lines" aListOfPairs detect: [ :each | caption = each first or: [ (caption includesSubstring: each first caseSensitive: false) + or: [ (each first match: caption) + or: [ (caption respondsTo: #matchesRegex:) + and: [ caption matchesRegex: each first ] ] ] ] ] - or: [ each first match: caption ] ] ] ifFound: [ :answer | notification resume: answer second ] ifNone: [ (ProvideAnswerNotification signal: notification messageText) ifNil: [ notification resume ] ifNotNil: [ :outerAnswer | notification resume: outerAnswer ] ] ]! From commits at source.squeak.org Fri Aug 14 20:31:15 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:31:17 2015 Subject: [squeak-dev] The Trunk: KernelTests-ul.296.mcz Message-ID: Levente Uzonyi uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-ul.296.mcz ==================== Summary ==================== Name: KernelTests-ul.296 Author: ul Time: 14 August 2015, 7:01:31.26 pm UUID: b3d99417-15da-4af1-88d6-0fc2f2abc25f Ancestors: KernelTests-ul.295 #includesSubString: -> #includesSubstring: =============== Diff against KernelTests-ul.295 =============== Item was changed: ----- Method: BlockContextTest>>testNew (in category 'tests') ----- testNew self should: [ContextPart new: 5] raise: Error. [ContextPart new: 5] on: Error do: [:e| + self assert: (e messageText includesSubstring: 'newForMethod:') description: 'Error doesn''t tell you what you did wrong by calling #new:']. - self assert: (e messageText includesSubString: 'newForMethod:') description: 'Error doesn''t tell you what you did wrong by calling #new:']. self should: [ContextPart new] raise: Error. [ContextPart new] on: Error do: [:e| + self assert: (e messageText includesSubstring: 'newForMethod:') description: 'Error doesn''t tell you what you did wrong by calling #new'].! - self assert: (e messageText includesSubString: 'newForMethod:') description: 'Error doesn''t tell you what you did wrong by calling #new'].! Item was changed: ----- Method: MethodPragmaTest>>assertPragma:givesKeyword:arguments: (in category 'utilities') ----- assertPragma: aString givesKeyword: aSymbol arguments: anArray | pragma decompiled | pragma := self pragma: aString selector: #zork. self assert: pragma keyword = aSymbol. self assert: pragma arguments = anArray. decompiled := (self class>>#zork) decompile. self assert: (decompiled properties pragmas includes: pragma). + self assert: (decompiled asString includesSubstring: pragma asString).! - self assert: (decompiled asString includesSubString: pragma asString).! Item was changed: ----- Method: ObjectTest>>testShouldBeImplemented (in category 'as yet unclassified') ----- testShouldBeImplemented | testClass | testClass := NotImplementedTestData. self should: [testClass new shouldBeImplementedMsg] raise: NotImplemented. [testClass new shouldBeImplementedMsg] ifError: [:errDesc | + self assert: (errDesc includesSubstring: testClass name) description: 'Error should include class name'. + self assert: (errDesc includesSubstring: #shouldBeImplementedMsg asString) description: 'Error should include selector name'].! - self assert: (errDesc includesSubString: testClass name) description: 'Error should include class name'. - self assert: (errDesc includesSubString: #shouldBeImplementedMsg asString) description: 'Error should include selector name'].! Item was changed: ----- Method: ObjectTest>>testShouldNotImplement (in category 'as yet unclassified') ----- testShouldNotImplement | testClass | testClass := NotImplementedTestData. self should: [testClass new shouldNotImplementMsg] raise: NotImplemented. [testClass new shouldNotImplementMsg] ifError: [:errDesc | + self assert: (errDesc includesSubstring: testClass name) description: 'Error should include class name'. + self assert: (errDesc includesSubstring: #shouldNotImplementMsg asString) description: 'Error should include selector name'].! - self assert: (errDesc includesSubString: testClass name) description: 'Error should include class name'. - self assert: (errDesc includesSubString: #shouldNotImplementMsg asString) description: 'Error should include selector name'].! From commits at source.squeak.org Fri Aug 14 20:32:06 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:32:07 2015 Subject: [squeak-dev] The Trunk: Multilingual-ul.210.mcz Message-ID: Levente Uzonyi uploaded a new version of Multilingual to project The Trunk: http://source.squeak.org/trunk/Multilingual-ul.210.mcz ==================== Summary ==================== Name: Multilingual-ul.210 Author: ul Time: 14 August 2015, 7:02:16.93 pm UUID: efda00a9-8cd6-4f9f-9366-f34b5e2b270f Ancestors: Multilingual-ul.209 #includesSubString: -> #includesSubstring: =============== Diff against Multilingual-ul.209 =============== Item was changed: ----- Method: MultiByteBinaryOrTextStream>>guessConverter (in category 'private') ----- guessConverter + ^ (self originalContents includesSubstring: #[27 36] asString) - ^ (self originalContents includesSubString: #[27 36] asString) ifTrue: [CompoundTextConverter new] ifFalse: [self class defaultConverter ]! From commits at source.squeak.org Fri Aug 14 20:32:06 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:32:10 2015 Subject: [squeak-dev] The Trunk: MorphicExtras-ul.165.mcz Message-ID: Levente Uzonyi uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-ul.165.mcz ==================== Summary ==================== Name: MorphicExtras-ul.165 Author: ul Time: 14 August 2015, 7:01:59.85 pm UUID: cbb0e98c-88bf-446c-8478-8b2e8ed7c451 Ancestors: MorphicExtras-cmm.164 #includesSubString: -> #includesSubstring: =============== Diff against MorphicExtras-cmm.164 =============== Item was changed: ----- Method: BooklikeMorph>>makePageControlsFrom: (in category 'page controls') ----- makePageControlsFrom: controlSpecs "From the controlSpecs, create a set of page control and return them -- this method does *not* add the controls to the receiver." | c col row | c := (color saturation > 0.1) ifTrue: [color slightlyLighter] ifFalse: [color slightlyDarker]. col := AlignmentMorph newColumn. col color: c; borderWidth: 0; layoutInset: 0. col hResizing: #spaceFill; vResizing: #shrinkWrap; extent: 5@5. row := AlignmentMorph newRow. row color: c; borderWidth: 0; layoutInset: 0. row hResizing: #spaceFill; vResizing: #shrinkWrap; extent: 5@5. controlSpecs do: [:spec | | lastGuy b | spec == #spacer ifTrue: [row addTransparentSpacerOfSize: (10 @ 0)] ifFalse: [spec == #variableSpacer ifTrue: [row addMorphBack: AlignmentMorph newVariableTransparentSpacer] ifFalse: [b := SimpleButtonMorph new target: self; borderWidth: 1; borderColor: Color veryLightGray; color: c. b label: spec first; actionSelector: spec second; borderWidth: 0; setBalloonText: spec third. row addMorphBack: b. + (((lastGuy := spec last asLowercase) includesSubstring: 'menu') or: + [lastGuy includesSubstring: 'designations']) - (((lastGuy := spec last asLowercase) includesSubString: 'menu') or: - [lastGuy includesSubString: 'designations']) ifTrue: [b actWhen: #buttonDown]]]]. "pop up menu on mouseDown" col addMorphBack: row. ^ col! From commits at source.squeak.org Fri Aug 14 20:33:28 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:33:30 2015 Subject: [squeak-dev] The Trunk: Protocols-ul.49.mcz Message-ID: Levente Uzonyi uploaded a new version of Protocols to project The Trunk: http://source.squeak.org/trunk/Protocols-ul.49.mcz ==================== Summary ==================== Name: Protocols-ul.49 Author: ul Time: 14 August 2015, 7:02:37.352 pm UUID: 2ea47b34-1e1f-448e-9a27-fca207b28edd Ancestors: Protocols-topa.48 #includesSubString: -> #includesSubstring: =============== Diff against Protocols-topa.48 =============== Item was changed: ----- Method: StringType>>initialize (in category 'initialization') ----- initialize "Initialize the receiver (automatically called when instances are created via 'new')" super initialize. self vocabularyName: #String. #((accessing 'The basic info' + (at: at:put: size endsWithDigit findString: findTokens: includesSubstring: indexOf: indexOf:startingAt: indexOf:startingAt:ifAbsent: lineCorrespondingToIndex: lineCount lineNumber: startsWithDigit numArgs)) - (at: at:put: size endsWithDigit findString: findTokens: includesSubString: indexOf: indexOf:startingAt: indexOf:startingAt:ifAbsent: lineCorrespondingToIndex: lineCount lineNumber: startsWithDigit numArgs)) (#'more accessing' 'More basic info' (allButFirst allButFirst: allButLast allButLast: at:ifAbsent: atAllPut: atPin: atRandom: atWrap: atWrap:put: fifth first first: fourth from:to:put: last last: lastIndexOf: lastIndexOf:ifAbsent: middle replaceAll:with: replaceFrom:to:with: replaceFrom:to:with:startingAt: second sixth third)) (comparing 'Determining which comes first alphabeticly' (< <= = > >= beginsWith: endsWith: endsWithAnyOf: howManyMatch: match:)) (testing 'Testing' (includes: isEmpty ifNil: ifNotNil: isAllDigits isAllSeparators isString lastSpacePosition)) (converting 'Converting it to another form' (asCharacter asDate asInteger asLowercase asNumber asString asStringOrText asSymbol asText asTime asUppercase asUrl capitalized keywords numericSuffix romanNumber reversed splitInteger surroundedBySingleQuotes withBlanksTrimmed withSeparatorsCompacted withoutTrailingBlanks withoutTrailingDigits asSortedCollection)) (copying 'Make another one like me' (copy copyFrom:to: copyUpTo: copyUpToLast: shuffled)) (enumerating 'Passing over the letters' (collect: collectWithIndex: do: from:to:do: reverseDo: select: withIndexDo: detect: detect:ifNone:)) ) do: [:item | | aMethodCategory | aMethodCategory := ElementCategory new categoryName: item first. aMethodCategory documentation: item second. item third do: [:aSelector | | aMethodInterface | aMethodInterface := MethodInterface new initializeFor: aSelector. self atKey: aSelector putMethodInterface: aMethodInterface. aMethodCategory elementAt: aSelector put: aMethodInterface]. self addCategory: aMethodCategory]. ! From commits at source.squeak.org Fri Aug 14 20:33:53 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:33:54 2015 Subject: [squeak-dev] The Trunk: SMLoader-ul.83.mcz Message-ID: Levente Uzonyi uploaded a new version of SMLoader to project The Trunk: http://source.squeak.org/trunk/SMLoader-ul.83.mcz ==================== Summary ==================== Name: SMLoader-ul.83 Author: ul Time: 14 August 2015, 7:02:58.782 pm UUID: 4898c13c-15f3-4ed8-867a-df8d79905124 Ancestors: SMLoader-mt.82 #includesSubString: -> #includesSubstring: =============== Diff against SMLoader-mt.82 =============== Item was changed: ----- Method: SMLoader class>>initialize (in category 'class initialization') ----- initialize "Hook us up in the world menu." "self initialize" Smalltalk at: #ToolBuilder ifAbsent: [self registerInFlapsRegistry. (Preferences windowColorFor: #SMLoader) = Color white ifTrue: ["not set" Preferences setWindowColorFor: #SMLoader to: (Color colorFrom: self windowColorSpecification brightColor)]. (TheWorldMenu respondsTo: #registerOpenCommand:) ifTrue: [| oldCmds | + oldCmds := TheWorldMenu registry select: [:cmd | cmd first includesSubstring: 'Package Loader']. - oldCmds := TheWorldMenu registry select: [:cmd | cmd first includesSubString: 'Package Loader']. oldCmds do: [:cmd | TheWorldMenu unregisterOpenCommand: cmd first]. TheWorldMenu registerOpenCommand: {self openMenuString. {self. #open}}]]. DefaultFilters := OrderedCollection new. DefaultCategoriesToFilterIds := OrderedCollection new! Item was changed: ----- Method: SMLoaderPlus class>>initialize (in category 'class initialization') ----- initialize "Hook us up in the world menu." "self initialize" Smalltalk at: #ToolBuilder ifPresent: [ : tb | self registerInFlapsRegistry. (Preferences windowColorFor: #SMLoader) = Color white "note set" ifTrue: [ #(#SMLoader #SMReleaseBrowser ) do: [ : each | Preferences setWindowColorFor: each to: (Color colorFrom: self windowColorSpecification brightColor) ] ]. (TheWorldMenu respondsTo: #registerOpenCommand:) ifTrue: [ | oldCmds | oldCmds := TheWorldMenu registry select: + [ : cmd | cmd first includesSubstring: 'Package Loader' ]. - [ : cmd | cmd first includesSubString: 'Package Loader' ]. oldCmds do: [ : cmd | TheWorldMenu unregisterOpenCommand: cmd first ]. TheWorldMenu registerOpenCommand: {self openMenuString. {self. #open}} ] ]. DefaultFilters := OrderedCollection new. DefaultCategoriesToFilterIds := OrderedCollection new! From commits at source.squeak.org Fri Aug 14 20:34:08 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:34:11 2015 Subject: [squeak-dev] The Trunk: SUnit-ul.103.mcz Message-ID: Levente Uzonyi uploaded a new version of SUnit to project The Trunk: http://source.squeak.org/trunk/SUnit-ul.103.mcz ==================== Summary ==================== Name: SUnit-ul.103 Author: ul Time: 14 August 2015, 7:03:21.454 pm UUID: 0adc8e0f-b262-4dd1-93fa-ec87ad5a67ed Ancestors: SUnit-mt.102 #includesSubString: -> #includesSubstring: =============== Diff against SUnit-mt.102 =============== Item was changed: ----- Method: SUnitTest>>testAssertIdentical (in category 'testing') ----- testAssertIdentical | a b | a := 'foo'. b := 'bar'. self should: [self assert: a identical: b] raise: TestFailure. [self assert: a identical: b] on: TestFailure do: [:e | |error| error := e messageText. + self assert: (error includesSubstring: a) description: 'Error message doesn''t include the expected value'. + self assert: (error includesSubstring: b) description: 'Error message doesn''t include the expected value'].! - self assert: (error includesSubString: a) description: 'Error message doesn''t include the expected value'. - self assert: (error includesSubString: b) description: 'Error message doesn''t include the expected value'].! Item was changed: ----- Method: SUnitTest>>testAssertIdenticalDescription (in category 'testing') ----- testAssertIdenticalDescription | a b | a := 'foo'. b := a copy. self should: [self assert: a identical: b description: 'A desciption'] raise: TestFailure. [self assert: a identical: b description: 'A desciption'] on: TestFailure do: [:e | |error| error := e messageText. + self assert: (error includesSubstring: 'A desciption') description: 'Error message doesn''t give you the description'].! - self assert: (error includesSubString: 'A desciption') description: 'Error message doesn''t give you the description'].! Item was changed: ----- Method: SUnitTest>>testAssertIdenticalWithEqualObjects (in category 'testing') ----- testAssertIdenticalWithEqualObjects | a b | a := 'foo'. b := a copy. self should: [self assert: a identical: b] raise: TestFailure. [self assert: a identical: b] on: TestFailure do: [:e | |error| error := e messageText. + self assert: (error includesSubstring: 'not identical') description: 'Error message doesn''t say the two things aren''t identical'].! - self assert: (error includesSubString: 'not identical') description: 'Error message doesn''t say the two things aren''t identical'].! Item was changed: ----- Method: SUnitTest>>testWithExceptionDo (in category 'testing') ----- testWithExceptionDo self should: [self error: 'foo'] raise: TestResult error withExceptionDo: [:exception | + self assert: (exception description includesSubstring: 'foo') - self assert: (exception description includesSubString: 'foo') ] ! Item was changed: ----- Method: TestCase>>executeShould:inScopeOf:withDescriptionContaining: (in category 'private') ----- executeShould: aBlock inScopeOf: anExceptionalEvent withDescriptionContaining: aString ^[aBlock value. false] on: anExceptionalEvent + do: [:ex | ex return: (ex description includesSubstring: aString) ] - do: [:ex | ex return: (ex description includesSubString: aString) ] ! Item was changed: ----- Method: TestCase>>executeShould:inScopeOf:withDescriptionNotContaining: (in category 'private') ----- executeShould: aBlock inScopeOf: anExceptionalEvent withDescriptionNotContaining: aString ^[aBlock value. false] on: anExceptionalEvent + do: [:ex | ex return: (ex description includesSubstring: aString) not ] - do: [:ex | ex return: (ex description includesSubString: aString) not ] ! From commits at source.squeak.org Fri Aug 14 20:34:46 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:34:47 2015 Subject: [squeak-dev] The Trunk: System-ul.757.mcz Message-ID: Levente Uzonyi uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-ul.757.mcz ==================== Summary ==================== Name: System-ul.757 Author: ul Time: 14 August 2015, 7:19:00.474 pm UUID: fca51b99-736e-4666-acac-e5c5b6a1d397 Ancestors: System-cmm.756 #includesSubString: -> #includesSubstring: #subStrings -> #substrings =============== Diff against System-cmm.756 =============== Item was changed: ----- Method: ChangeRecord>>methodClass: (in category 'access') ----- methodClass: anEnvironment | methodClassName methodClass | (#(method #classComment) includes: type) ifFalse: [ ^ nil ]. + methodClassName := class substrings - methodClassName := class subStrings ifEmpty: [ ^ nil ] ifNotEmptyDo: [ : parts | parts first asSymbol ]. (anEnvironment includesKey: methodClassName) ifFalse: [ ^ nil ]. methodClass := anEnvironment at: methodClassName. ^ meta ifTrue: [ methodClass class ] ifFalse: [ methodClass ]! Item was changed: ----- Method: ChangeSet class>>scanCategory: (in category 'scanning') ----- scanCategory: file "Scan anything that involves more than one chunk; method name is historical only" | itemPosition item tokens stamp isComment anIndex | itemPosition := file position. item := file nextChunk. + isComment := (item includesSubstring: 'commentStamp:'). + (isComment or: [item includesSubstring: 'methodsFor:']) ifFalse: - isComment := (item includesSubString: 'commentStamp:'). - (isComment or: [item includesSubString: 'methodsFor:']) ifFalse: ["Maybe a preamble, but not one we recognize; bail out with the preamble trick" ^{(ChangeRecord new file: file position: itemPosition type: #preamble)}]. 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 scanFile: file category: tokens third class: tokens first meta: false stamp: stamp]. tokens third == #methodsFor: ifTrue: [^ self scanFile: file category: tokens fourth class: tokens first meta: true stamp: stamp]]. tokens second == #commentStamp: ifTrue: [stamp := tokens third. item := (ChangeRecord new file: file position: file position type: #classComment class: tokens first category: nil meta: false stamp: stamp). file nextChunk. file skipStyleChunk. ^Array with: item]. ^#()! Item was changed: ----- Method: FileDirectory class>>openSources:andChanges:forImage: (in category '*System-Files') ----- openSources: sourcesName andChanges: changesName forImage: imageName "Open the changes and sources files and install them in SourceFiles. Inform the user of problems regarding write permissions or CR/CRLF mixups." "Note: SourcesName and imageName are full paths; changesName is a local name." | sources changes msg wmsg | msg := 'Squeak cannot locate &fileRef. Please check that the file is named properly and is in the same directory as this image.'. wmsg := 'Squeak cannot write to &fileRef. Please check that you have write permission for this file. You won''t be able to save this image correctly until you fix this.'. sources := self openSources: sourcesName forImage: imageName. changes := self openChanges: changesName forImage: imageName. ((sources == nil or: [sources atEnd]) and: [Preferences valueOfFlag: #warnIfNoSourcesFile]) ifTrue: [Smalltalk platformName = 'Mac OS' ifTrue: [msg := msg , ' Make sure the sources file is not an Alias.']. self inform: (msg copyReplaceAll: '&fileRef' with: 'the sources file named ' , sourcesName)]. (changes == nil and: [Preferences valueOfFlag: #warnIfNoChangesFile]) ifTrue: [self inform: (msg copyReplaceAll: '&fileRef' with: 'the changes file named ' , changesName)]. ((Preferences valueOfFlag: #warnIfNoChangesFile) and: [changes notNil]) ifTrue: [changes isReadOnly ifTrue: [self inform: (wmsg copyReplaceAll: '&fileRef' with: 'the changes file named ' , changesName)]. ((changes next: 200) + includesSubstring: String crlf) - includesSubString: String crlf) ifTrue: [self inform: 'The changes file named ' , changesName , ' has been injured by an unpacking utility. Crs were changed to CrLfs. Please set the preferences in your decompressing program to "do not convert text files" and unpack the system again.']]. SourceFiles := Array with: sources with: changes! Item was changed: ----- Method: ImageSegment>>findOwnerMap: (in category 'testing') ----- findOwnerMap: morphs | st | "Construct a string that has a printout of the owner chain for every morph in the list. Need it as a string so not hold onto them." st := ''. morphs do: [:mm | + (st includesSubstring: mm printString) ifFalse: [ - (st includesSubString: mm printString) ifFalse: [ st := st, ' ', mm allOwners printString]]. Smalltalk at: #Owners put: st. ! Item was changed: ----- Method: ResourceLocator class>>make:relativeTo: (in category 'utilities') ----- make: newURLString relativeTo: oldURLString "Local file refs are not handled well, so work around here" + ^((oldURLString includesSubstring: '://') not + and: [(newURLString includesSubstring: '://') not]) - ^((oldURLString includesSubString: '://') not - and: [(newURLString includesSubString: '://') not]) ifTrue: [oldURLString , (UnixFileDirectory localNameFor: newURLString)] ifFalse: [(newURLString asUrlRelativeTo: oldURLString asUrl) asString]! Item was changed: ----- Method: SystemVersion>>isPharo (in category 'testing') ----- isPharo + ^ version includesSubstring: 'Pharo'! - ^ version includesSubString: 'Pharo'! Item was changed: ----- Method: SystemVersion>>isSqueak (in category 'testing') ----- isSqueak + ^ version includesSubstring: 'Squeak'! - ^ version includesSubString: 'Squeak'! From commits at source.squeak.org Fri Aug 14 20:35:08 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:35:10 2015 Subject: [squeak-dev] The Trunk: ToolsTests-ul.73.mcz Message-ID: Levente Uzonyi uploaded a new version of ToolsTests to project The Trunk: http://source.squeak.org/trunk/ToolsTests-ul.73.mcz ==================== Summary ==================== Name: ToolsTests-ul.73 Author: ul Time: 14 August 2015, 7:51:04.12 pm UUID: 96d8803b-6424-4249-8fbf-fa62eb44c966 Ancestors: ToolsTests-topa.72 #includesSubString: -> #includesSubstring: =============== Diff against ToolsTests-topa.72 =============== Item was changed: ----- Method: BrowserTest>>testClassCommentAnnotation (in category 'as yet unclassified') ----- testClassCommentAnnotation | annotation | browser selectSystemCategory: browser class category. browser selectClass: browser class. annotation := browser annotationForClassCommentFor: browser class. + self assert: (annotation includesSubstring: browser class organization commentStamp). + self assert: (annotation includesSubstring: 'class comment for'). + self assert: (annotation includesSubstring: browser className).! - self assert: (annotation includesSubString: browser class organization commentStamp). - self assert: (annotation includesSubString: 'class comment for'). - self assert: (annotation includesSubString: browser className).! Item was changed: ----- Method: BrowserTest>>testClassCommentAnnotationIgnoresParameter (in category 'as yet unclassified') ----- testClassCommentAnnotationIgnoresParameter | annotation | browser selectSystemCategory: browser class category. browser selectClass: browser class. "And the method ignores the parameter:" annotation := browser annotationForClassCommentFor: browser class superclass. + self assert: (annotation includesSubstring: browser className).! - self assert: (annotation includesSubString: browser className).! Item was changed: ----- Method: BrowserTest>>testLabelStringAlwaysShowsBrowserType (in category 'as yet unclassified') ----- testLabelStringAlwaysShowsBrowserType browser selectSystemCategory: browser class category. + self assert: (browser labelString includesSubstring: 'System Browser'). - self assert: (browser labelString includesSubString: 'System Browser'). browser selectClass: browser class. + self assert: (browser labelString includesSubstring: 'System Browser'). - self assert: (browser labelString includesSubString: 'System Browser'). browser selectSystemCategory: DependencyBrowser category. browser selectClass: DependencyBrowser. + self assert: (browser labelString includesSubstring: 'System Browser').! - self assert: (browser labelString includesSubString: 'System Browser').! Item was changed: ----- Method: BrowserTest>>testLabelStringShowsBrowsedClassName (in category 'as yet unclassified') ----- testLabelStringShowsBrowsedClassName browser selectSystemCategory: DependencyBrowser category. browser selectClass: DependencyBrowser. + self assert: (browser labelString includesSubstring: DependencyBrowser name).! - self assert: (browser labelString includesSubString: DependencyBrowser name).! From commits at source.squeak.org Fri Aug 14 20:35:10 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:35:15 2015 Subject: [squeak-dev] The Trunk: Tools-ul.630.mcz Message-ID: Levente Uzonyi uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-ul.630.mcz ==================== Summary ==================== Name: Tools-ul.630 Author: ul Time: 14 August 2015, 7:50:48.75 pm UUID: 7dce94fa-8532-413d-a547-2fa120b92092 Ancestors: Tools-cmm.629 #includesSubString: -> #includesSubstring: #allCharacters -> #allByteCharacters =============== Diff against Tools-cmm.629 =============== 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 | itemPosition := file position. item := file nextChunk. + ((item includesSubstring: 'commentStamp:') + or: [(item includesSubstring: 'methodsFor:') - ((item includesSubString: 'commentStamp:') - or: [(item includesSubString: 'methodsFor:') 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]. 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! Item was changed: ----- Method: ChangeList>>selectContentsMatching (in category 'menu actions') ----- selectContentsMatching | pattern | pattern := UIManager default request: 'pattern to match'. pattern isEmpty ifTrue: [^self]. ^Cursor execute showWhile: [self selectSuchThat: ((pattern includesAnyOf: '?*') ifTrue: [[ :change | pattern match: change string]] + ifFalse: [[ :change | change string includesSubstring: pattern]])]! - ifFalse: [[ :change | change string includesSubString: pattern]])]! Item was changed: ----- Method: ClassListBrowser class>>example1 (in category 'examples') ----- example1 "Put up a ClassListBrowser that shows all classes that have the string 'Pluggable' in their names" + self browseClassesSatisfying: [:cl | cl name includesSubstring: 'Pluggable'] title: 'Pluggables' - self browseClassesSatisfying: [:cl | cl name includesSubString: 'Pluggable'] title: 'Pluggables' "ClassListBrowser example1" ! Item was changed: ----- Method: Debugger class>>openInterrupt:onProcess: (in category 'opening') ----- openInterrupt: aString onProcess: interruptedProcess "Open a notifier in response to an interrupt. An interrupt occurs when the user types the interrupt key (cmd-. on Macs, ctrl-c or alt-. on other systems) or when the low-space watcher detects that memory is low." | debugger | "Simulation guard" debugger := self new. debugger process: interruptedProcess controller: ((Smalltalk isMorphic not and: [ScheduledControllers activeControllerProcess == interruptedProcess]) ifTrue: [ScheduledControllers activeController]) context: interruptedProcess suspendedContext. debugger externalInterrupt: true. Preferences logDebuggerStackToFile ifTrue: + [(aString includesSubstring: 'Space') & (aString includesSubstring: 'low') - [(aString includesSubString: 'Space') & (aString includesSubString: 'low') ifTrue: [Smalltalk logError: aString inContext: debugger interruptedContext to: 'LowSpaceDebug.log'] "logging disabled for 4.3 release, see http://lists.squeak.org/pipermail/squeak-dev/2011-December/162503.html" "ifFalse: [Smalltalk logSqueakError: aString inContext: debugger interruptedContext]"]. Preferences eToyFriendly ifTrue: [World stopRunningAll]. ^debugger openNotifierContents: nil label: aString; yourself ! Item was changed: ----- Method: MessageSet class>>parse:toClassAndSelector: (in category 'utilities') ----- parse: methodRef toClassAndSelector: csBlock "Decode strings of the form [class] ." | tuple cl | self flag: #mref. "compatibility with pre-MethodReference lists" methodRef ifNil: [^ csBlock value: nil value: nil]. methodRef isString ifFalse: [^methodRef setClassAndSelectorIn: csBlock]. methodRef isEmpty ifTrue: [^csBlock value: nil value: nil]. + tuple := (methodRef asString includesSubstring: '>>') - tuple := (methodRef asString includesSubString: '>>') ifTrue: [(methodRef findTokens: '>>') fold: [:a :b| (a findTokens: ' '), {b first = $# ifTrue: [b allButFirst] ifFalse: [b]}]] ifFalse: [methodRef asString findTokens: ' .']. cl := Smalltalk at: tuple first asSymbol ifAbsent: [^ csBlock value: nil value: nil]. ^(tuple size = 2 or: [tuple size > 2 and: [(tuple at: 2) ~= 'class']]) ifTrue: [csBlock value: cl value: (tuple at: 2) asSymbol] ifFalse: [csBlock value: cl class value: (tuple at: 3) asSymbol]! Item was changed: ----- Method: MethodFinder>>initialize2 (in category 'initialize') ----- (excessive size, no diff calculated) Item was changed: ----- Method: ProcessBrowser>>nextContext (in category 'process list') ----- nextContext | initialProcessIndex initialStackIndex | searchString isEmpty ifTrue: [ ^false ]. initialProcessIndex := self processListIndex. initialStackIndex := self stackListIndex. initialProcessIndex to: self processList size do: [:pi | self processListIndex: pi. self stackNameList withIndexDo: [:name :si | (pi ~= initialProcessIndex or: [si > initialStackIndex]) + ifTrue: [(name includesSubstring: searchString) - ifTrue: [(name includesSubString: searchString) ifTrue: [self stackListIndex: si. ^true]]]]. self processListIndex: initialProcessIndex. self stackListIndex: initialStackIndex. ^ false! From commits at source.squeak.org Fri Aug 14 20:35:20 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:35:22 2015 Subject: [squeak-dev] The Trunk: ToolsTests-ul.74.mcz Message-ID: Levente Uzonyi uploaded a new version of ToolsTests to project The Trunk: http://source.squeak.org/trunk/ToolsTests-ul.74.mcz ==================== Summary ==================== Name: ToolsTests-ul.74 Author: ul Time: 14 August 2015, 10:08:27.31 pm UUID: 58d8ab5b-a922-422f-ab70-4584a7b1449d Ancestors: ToolsTests-ul.73 - declare that the category we want to select is #'class list' =============== Diff against ToolsTests-ul.73 =============== Item was changed: ----- Method: BrowserTest>>testSelectClassNamedPreservesPlace (in category 'as yet unclassified') ----- testSelectClassNamedPreservesPlace | commonCategory commonSelector otherClass | browser selectSystemCategory: browser class category. otherClass := HierarchyBrowser. "Unlikely to move out of Browser's package!!" browser selectClassNamed: browser class name. + commonCategory := (browser class organization categories intersection: otherClass organization categories) detect: [ :each | each == #'class list' ]. - commonCategory := (browser class organization categories intersection: otherClass organization categories) first. commonSelector := #classList. browser selectMessageCategoryNamed: commonCategory. browser selectMessageNamed: commonSelector. browser selectClass: otherClass. self assert: browser selectedClassName = otherClass name. self assert: browser selectedMessageCategoryName = commonCategory. self assert: browser selectedMessageName = commonSelector.! From commits at source.squeak.org Fri Aug 14 20:35:33 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 14 20:35:35 2015 Subject: [squeak-dev] The Trunk: UpdateStream-ul.5.mcz Message-ID: Levente Uzonyi uploaded a new version of UpdateStream to project The Trunk: http://source.squeak.org/trunk/UpdateStream-ul.5.mcz ==================== Summary ==================== Name: UpdateStream-ul.5 Author: ul Time: 14 August 2015, 7:51:22.944 pm UUID: e4d793e4-bd54-4ca3-a232-998259a83102 Ancestors: UpdateStream-nice.4 #includesSubString: -> #includesSubstring: =============== Diff against UpdateStream-nice.4 =============== Item was changed: ----- Method: UpdateStreamDownloader class>>retrieveUrls:ontoQueue:withWaitSema: (in category 'fetching updates') ----- retrieveUrls: urls ontoQueue: queue withWaitSema: waitSema "download the given list of URLs. The queue will be loaded alternately with url's and with the retrieved contents. If a download fails, the contents will be #failed. If all goes well, a special pair with an empty URL and the contents #finished will be put on the queue. waitSema is waited on every time before a new document is downloaded; this keeps the downloader from getting too far ahead of the main process" "kill the existing downloader if there is one" | updateCounter | UpdateDownloader ifNotNil: [UpdateDownloader terminate]. updateCounter := 0. "fork a new downloading process" UpdateDownloader := [ 'Downloading updates' displayProgressFrom: 0 to: urls size during: [:bar | urls do: [:url | | front canPeek doc | waitSema wait. queue nextPut: url. doc := HTTPClient httpGet: url. doc isString ifTrue: [queue nextPut: #failed. UpdateDownloader := nil. Processor activeProcess terminate] ifFalse: [canPeek := 120 min: doc size. front := doc next: canPeek. doc skip: -1 * canPeek. (front beginsWith: ' Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-August/008842.html Name: Regex-Core-ul.37 Ancestors: Regex-Core-ul.36 Accept \r as an escape for the carriage return character (cr). Further optimizations in RxCharSetParser, RxMatchOptimizer, and RxmSubstring. Renamed extension method category to *Regex-Core. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008843.html Name: Collections-ul.640 Ancestors: Collections-cmm.639 Character: - sped up various methods by storing and reusing the result of #asInteger in a temporary variable. - sped up #isSeparator by eliminating the last branch. Swapped the tab and cr checks, because source code has more tabs than crs. - unified methods with mixed #asInteger and #asciiValue sends - #isAscii uses #< instead of #between:and:, like #isOctetCharacter does. - #asUnicode uses the same shortcut as #encodedCharSet does - quick return in #printOn: and #storeOn: String: - added identity check (should help with Text comparison) and quick returns to #= - spaceship operator uses #compare: if the argument is a string - added a fast #asSignedInteger implementation Text: - removed the identity check from Text >> #=, because String >> #= does it - the spaceship operator uses String's spaceship operator ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008844.html Name: Collections-ul.641 Ancestors: Collections-ul.640 Character: - even faster #isSeparator - class side #initialize sends #initializeClassificationTable - atomic class side #initializeDigitValues String: - renamed #includesSubString: to #includesSubstring: - deprecated #includesSubString: General: #includesSubString: -> #includesSubstring: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008845.html Name: CollectionsTests-ul.246 Ancestors: CollectionsTests-topa.245 #includesSubString: -> #includesSubstring: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008846.html Name: Compiler-ul.306 Ancestors: Compiler-cmm.305 #includesSubString: -> #includesSubstring: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008847.html Name: Installer-Core-ul.398 Ancestors: Installer-Core-cmm.397 #includesSubString: -> #includesSubstring: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008848.html Name: Kernel-ul.940 Ancestors: Kernel-ul.939 #allCharacters -> #allByteCharacters ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008849.html Name: Kernel-ul.941 Ancestors: Kernel-ul.940 - added support for regular expressions to BlockClosure >> #valueSupplyingAnswers: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008850.html Name: KernelTests-ul.296 Ancestors: KernelTests-ul.295 #includesSubString: -> #includesSubstring: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008851.html Name: Multilingual-ul.210 Ancestors: Multilingual-ul.209 #includesSubString: -> #includesSubstring: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008852.html Name: MorphicExtras-ul.165 Ancestors: MorphicExtras-cmm.164 #includesSubString: -> #includesSubstring: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008853.html Name: Protocols-ul.49 Ancestors: Protocols-topa.48 #includesSubString: -> #includesSubstring: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008854.html Name: SMLoader-ul.83 Ancestors: SMLoader-mt.82 #includesSubString: -> #includesSubstring: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008855.html Name: SUnit-ul.103 Ancestors: SUnit-mt.102 #includesSubString: -> #includesSubstring: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008856.html Name: System-ul.757 Ancestors: System-cmm.756 #includesSubString: -> #includesSubstring: #subStrings -> #substrings ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008857.html Name: ToolsTests-ul.73 Ancestors: ToolsTests-topa.72 #includesSubString: -> #includesSubstring: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008858.html Name: Tools-ul.630 Ancestors: Tools-cmm.629 #includesSubString: -> #includesSubstring: #allCharacters -> #allByteCharacters ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008859.html Name: ToolsTests-ul.74 Ancestors: ToolsTests-ul.73 - declare that the category we want to select is #'class list' ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008860.html Name: UpdateStream-ul.5 Ancestors: UpdateStream-nice.4 #includesSubString: -> #includesSubstring: ============================================= From lewis at mail.msen.com Fri Aug 14 23:05:00 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Aug 14 23:05:03 2015 Subject: [squeak-dev] 404 Not Found for the 4.6 all in one download Message-ID: <20150814230500.GA38581@shell.msen.com> Hi, There is a typo in the download link the 4.6 all-in-one. Can someone fix it? On this page: http://squeak.org/downloads/ The link is http://ftp.squeak.org/4.6/Squeak-4.6-All-in-One.zzip ^^^^ But it should be http://ftp.squeak.org/4.6/Squeak-4.6-All-in-One.zip ^^^ Thanks, Dave From lewis at mail.msen.com Fri Aug 14 23:12:11 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Aug 14 23:12:14 2015 Subject: [squeak-dev] 404 Not Found for the 4.6 all in one download In-Reply-To: <20150814230500.GA38581@shell.msen.com> References: <20150814230500.GA38581@shell.msen.com> Message-ID: <20150814231211.GA40011@shell.msen.com> On Fri, Aug 14, 2015 at 07:05:00PM -0400, David T. Lewis wrote: > Hi, > > There is a typo in the download link the 4.6 all-in-one. Can someone fix it? > > On this page: http://squeak.org/downloads/ > > The link is http://ftp.squeak.org/4.6/Squeak-4.6-All-in-One.zzip > ^^^^ > But it should be http://ftp.squeak.org/4.6/Squeak-4.6-All-in-One.zip > ^^^ > Oops, just noticed that the download link for 4.6 image and changes (Old Stable (Non-Spur) 4.6-15102) is pointing to the 5.0 download instead, so that also needs an update. BTW, I absolutely love this new web site. Fantastic. Dave From tim at rowledge.org Sat Aug 15 00:17:43 2015 From: tim at rowledge.org (tim Rowledge) Date: Sat Aug 15 00:17:47 2015 Subject: [squeak-dev] 404 Not Found for the 4.6 all in one download In-Reply-To: <20150814231211.GA40011@shell.msen.com> References: <20150814230500.GA38581@shell.msen.com> <20150814231211.GA40011@shell.msen.com> Message-ID: On 14-08-2015, at 4:12 PM, David T. Lewis wrote: > BTW, I absolutely love this new web site. Fantastic. It *is* looking pretty damn good, isn?t it? Of course, I have a couple of typo-level suggestions; a) on the projects page, in the ?Scratch? section I?d like to add something like ?The original Squeak based version is pre-installed on Raspberry Pi (link to www.raspberrypi.org) and the current MIT supported version is implemented in Flash (add boo-hiss sound effects)? b) the link for ?STEPS and Frank? pints to a very interesting list of publications but not to something that would particularly explain STEPS or Frank. Somebody must be able to provide a more appropriate link - and the general list should be pointed to from some other place. c) the VMMaker section points to a rather dated page on the swiki. Somebody oughta whack the author on the head to get him to update it. d) the Croquet entry points to openCobalt - perhaps a couple of words explaining the name change would make it less surprising? And if anyone involved is reading, that site could do with an update or two to make it look less cob-webby e) on the downloads page we could do with an ?elevator? explanation of what we mean by ?Spur? and ?non-Spur?, as well as ?Classic VM? vs ?Cog VM?. f) still on downloads, the linux stuff should probably split between x86 (where you need the 32bit libraries for 64bit releases of linux) and ARM/RaspberryPi where you don?t. And we need to mention that on ARM, the Cog VM?s are only for Spur images. And, dammit, font-awesome still doesn?t have a RaspberryPi icon to use. I +1?d it on their github thingy. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- So dumb, he faxes face up. From eliot.miranda at gmail.com Sat Aug 15 00:30:54 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Aug 15 00:30:57 2015 Subject: [squeak-dev] 404 Not Found for the 4.6 all in one download In-Reply-To: References: <20150814230500.GA38581@shell.msen.com> <20150814231211.GA40011@shell.msen.com> Message-ID: On Fri, Aug 14, 2015 at 5:17 PM, tim Rowledge wrote: > > On 14-08-2015, at 4:12 PM, David T. Lewis wrote: > > BTW, I absolutely love this new web site. Fantastic. > > It *is* looking pretty damn good, isn?t it? > > Of course, I have a couple of typo-level suggestions; > > a) on the projects page, in the ?Scratch? section I?d like to add > something like > ?The original Squeak based version is pre-installed on Raspberry Pi (link > to www.raspberrypi.org) and the current MIT supported version is > implemented in Flash (add boo-hiss sound effects)? > > b) the link for ?STEPS and Frank? pints to a very interesting list of > publications but not to something that would particularly explain STEPS or > Frank. Somebody must be able to provide a more appropriate link - and the > general list should be pointed to from some other place. > > c) the VMMaker section points to a rather dated page on the swiki. > Somebody oughta whack the author on the head to get him to update it. > Whack :-) > > d) the Croquet entry points to openCobalt - perhaps a couple of words > explaining the name change would make it less surprising? And if anyone > involved is reading, that site could do with an update or two to make it > look less cob-webby > > e) on the downloads page we could do with an ?elevator? explanation of > what we mean by ?Spur? and ?non-Spur?, as well as ?Classic VM? vs ?Cog VM?. > > f) still on downloads, the linux stuff should probably split between x86 > (where you need the 32bit libraries for 64bit releases of linux) and > ARM/RaspberryPi where you don?t. And we need to mention that on ARM, the > Cog VM?s are only for Spur images. And, dammit, font-awesome still doesn?t > have a RaspberryPi icon to use. I +1?d it on their github thingy. > > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful random insult:- So dumb, he faxes face up. > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150814/7501142a/attachment.htm From Das.Linux at gmx.de Sat Aug 15 06:00:51 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sat Aug 15 06:00:54 2015 Subject: [squeak-dev] The Trunk: SMLoader-ul.83.mcz Message-ID: <48A6619A-0CCF-4BCB-9AF1-EEC6E7341345@gmx.de> On 14.08.2015, at 20:33, commits@source.squeak.org wrote: > Levente Uzonyi uploaded a new version of SMLoader to project The Trunk: > http://source.squeak.org/trunk/SMLoader-ul.83.mcz > > ==================== Summary ==================== > > Name: SMLoader-ul.83 > Author: ul > Time: 14 August 2015, 7:02:58.782 pm > UUID: 4898c13c-15f3-4ed8-867a-df8d79905124 > Ancestors: SMLoader-mt.82 > > #includesSubString: -> #includesSubstring: > > =============== Diff against SMLoader-mt.82 =============== > > Item was changed: Hi. The Trunk says: http://build.squeak.org/job/Trunk/default/10/ 2015-08-14T22:46:37.575+01:00: Installing Tools-ul.630 2015-08-14T22:46:37.645+01:00: Installing Protocols-ul.49 2015-08-14T22:46:37.71+01:00: Installing SMLoader-ul.83 vvvvvvvvvvvvvvvvvv MessageNotUnderstood: ByteString>>includesSubstring: vvvvvvvvvvvvvvvvvv The time is 2015-08-14T22:46:37.743+01:00 ByteString(Object)>>doesNotUnderstand: #includesSubstring: [] in [] in SMLoaderPlus class>>initialize OrderedCollection>>select: That's Strange? Best regards -Tobias From leves at elte.hu Sat Aug 15 09:16:04 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sat Aug 15 09:16:09 2015 Subject: [squeak-dev] The Trunk: SMLoader-ul.83.mcz In-Reply-To: <48A6619A-0CCF-4BCB-9AF1-EEC6E7341345@gmx.de> References: <48A6619A-0CCF-4BCB-9AF1-EEC6E7341345@gmx.de> Message-ID: Hi Tobias, Thanks for pointing it out. I thought Bert made some changes which ensure that such dependencies don't require a separate update map. I tested the update process on my machine, and it worked for me. Anyway, I've modified the last update map to load Collections-ul.641 before other packages related to this change. Btw, am I right that Jenkins is still using a non-Spur image to run the tests? Levente On Sat, 15 Aug 2015, Tobias Pape wrote: > > On 14.08.2015, at 20:33, commits@source.squeak.org wrote: > >> Levente Uzonyi uploaded a new version of SMLoader to project The Trunk: >> http://source.squeak.org/trunk/SMLoader-ul.83.mcz >> >> ==================== Summary ==================== >> >> Name: SMLoader-ul.83 >> Author: ul >> Time: 14 August 2015, 7:02:58.782 pm >> UUID: 4898c13c-15f3-4ed8-867a-df8d79905124 >> Ancestors: SMLoader-mt.82 >> >> #includesSubString: -> #includesSubstring: >> >> =============== Diff against SMLoader-mt.82 =============== >> >> Item was changed: > > Hi. The Trunk says: > > http://build.squeak.org/job/Trunk/default/10/ > > 2015-08-14T22:46:37.575+01:00: Installing Tools-ul.630 > 2015-08-14T22:46:37.645+01:00: Installing Protocols-ul.49 > 2015-08-14T22:46:37.71+01:00: Installing SMLoader-ul.83 > vvvvvvvvvvvvvvvvvv MessageNotUnderstood: ByteString>>includesSubstring: vvvvvvvvvvvvvvvvvv > The time is 2015-08-14T22:46:37.743+01:00 > ByteString(Object)>>doesNotUnderstand: #includesSubstring: > [] in [] in SMLoaderPlus class>>initialize > OrderedCollection>>select: > > > That's Strange? > > > Best regards > -Tobias > From Das.Linux at gmx.de Sat Aug 15 10:44:29 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sat Aug 15 10:44:32 2015 Subject: Jenkins/Trunk/Spur (was: Re: [squeak-dev] The Trunk: SMLoader-ul.83.mcz) In-Reply-To: References: <48A6619A-0CCF-4BCB-9AF1-EEC6E7341345@gmx.de> Message-ID: <9FC5435F-FEFF-4F2F-8DFF-32B64AA9B359@gmx.de> Hi Levente, On 15.08.2015, at 11:16, Levente Uzonyi wrote: > Hi Tobias, > > Thanks for pointing it out. I thought Bert made some changes which ensure that such dependencies don't require a separate update map. I tested the update process on my machine, and it worked for me. > Anyway, I've modified the last update map to load Collections-ul.641 before other packages related to this change. > Btw, am I right that Jenkins is still using a non-Spur image to run the tests? The traditional Job is non-Spur: http://build.squeak.org/job/SqueakTrunk/ The 'old' Spur job ~~http://build.squeak.org/job/SqueakTrunkOnSpur/~~ is gone (it didn't work most of the time). There's a new Trunk job that is Spur-based: http://build.squeak.org/job/Trunk/ But it still crashes the VM in some image segment code. See related messages with Eliot. Best regards -Tobias > > On Sat, 15 Aug 2015, Tobias Pape wrote: > >> >> On 14.08.2015, at 20:33, commits@source.squeak.org wrote: >> >>> Levente Uzonyi uploaded a new version of SMLoader to project The Trunk: >>> http://source.squeak.org/trunk/SMLoader-ul.83.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: SMLoader-ul.83 >>> Author: ul >>> Time: 14 August 2015, 7:02:58.782 pm >>> UUID: 4898c13c-15f3-4ed8-867a-df8d79905124 >>> Ancestors: SMLoader-mt.82 >>> >>> #includesSubString: -> #includesSubstring: >>> >>> =============== Diff against SMLoader-mt.82 =============== >>> >>> Item was changed: >> >> Hi. The Trunk says: >> >> http://build.squeak.org/job/Trunk/default/10/ >> >> 2015-08-14T22:46:37.575+01:00: Installing Tools-ul.630 >> 2015-08-14T22:46:37.645+01:00: Installing Protocols-ul.49 >> 2015-08-14T22:46:37.71+01:00: Installing SMLoader-ul.83 >> vvvvvvvvvvvvvvvvvv MessageNotUnderstood: ByteString>>includesSubstring: vvvvvvvvvvvvvvvvvv >> The time is 2015-08-14T22:46:37.743+01:00 >> ByteString(Object)>>doesNotUnderstand: #includesSubstring: >> [] in [] in SMLoaderPlus class>>initialize >> OrderedCollection>>select: >> >> >> That's Strange? >> >> >> Best regards >> -Tobias From lists at fniephaus.com Sat Aug 15 11:29:33 2015 From: lists at fniephaus.com (Fabio Niephaus) Date: Sat Aug 15 11:29:45 2015 Subject: [squeak-dev] 404 Not Found for the 4.6 all in one download In-Reply-To: References: <20150814230500.GA38581@shell.msen.com> <20150814231211.GA40011@shell.msen.com> Message-ID: Hi guys, I've fixed the links. Sorry about that. It's a little weird, because the link checking process should have failed before deployment... Anyway, my MacBook should be repaired next week and then it'll be much easier again to maintain the page. Thanks for all the feedback and please keep it coming! I'll try to incorporate it as best as I can or feel free to submit a pull-request at: https://github.com/squeak-smalltalk/squeak.org Best, Fabio On Sat 15 Aug 2015 at 01:31 Eliot Miranda wrote: > On Fri, Aug 14, 2015 at 5:17 PM, tim Rowledge wrote: > >> >> On 14-08-2015, at 4:12 PM, David T. Lewis wrote: >> > BTW, I absolutely love this new web site. Fantastic. >> >> It *is* looking pretty damn good, isn?t it? >> >> Of course, I have a couple of typo-level suggestions; >> >> a) on the projects page, in the ?Scratch? section I?d like to add >> something like >> ?The original Squeak based version is pre-installed on Raspberry Pi (link >> to www.raspberrypi.org) and the current MIT supported version is >> implemented in Flash (add boo-hiss sound effects)? >> >> b) the link for ?STEPS and Frank? pints to a very interesting list of >> publications but not to something that would particularly explain STEPS or >> Frank. Somebody must be able to provide a more appropriate link - and the >> general list should be pointed to from some other place. >> >> c) the VMMaker section points to a rather dated page on the swiki. >> Somebody oughta whack the author on the head to get him to update it. >> > > Whack :-) > > >> >> d) the Croquet entry points to openCobalt - perhaps a couple of words >> explaining the name change would make it less surprising? And if anyone >> involved is reading, that site could do with an update or two to make it >> look less cob-webby >> >> e) on the downloads page we could do with an ?elevator? explanation of >> what we mean by ?Spur? and ?non-Spur?, as well as ?Classic VM? vs ?Cog VM?. >> >> f) still on downloads, the linux stuff should probably split between x86 >> (where you need the 32bit libraries for 64bit releases of linux) and >> ARM/RaspberryPi where you don?t. And we need to mention that on ARM, the >> Cog VM?s are only for Spur images. And, dammit, font-awesome still doesn?t >> have a RaspberryPi icon to use. I +1?d it on their github thingy. >> >> >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> Useful random insult:- So dumb, he faxes face up. >> >> >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150815/3ff14a20/attachment.htm From Marcel.Taeumel at hpi.de Sat Aug 15 15:25:49 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Aug 15 15:29:34 2015 Subject: [squeak-dev] Re: The Trunk: Collections-ul.641.mcz In-Reply-To: References: Message-ID: <1439652349016-4843107.post@n4.nabble.com> +1 ! This specific capital S has bugged me quite a bit... :D Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Collections-ul-641-mcz-tp4842927p4843107.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From nicolas.cellier.aka.nice at gmail.com Sat Aug 15 20:52:53 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Sat Aug 15 20:52:57 2015 Subject: [squeak-dev] The Trunk: Collections-ul.640.mcz In-Reply-To: <55ce4eda.41ea8c0a.3bde6.ffffc2cdSMTPIN_ADDED_MISSING@mx.google.com> References: <55ce4eda.41ea8c0a.3bde6.ffffc2cdSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2015-08-14 22:25 GMT+02:00 : > Levente Uzonyi uploaded a new version of Collections to project The Trunk: > http://source.squeak.org/trunk/Collections-ul.640.mcz > > ==================== Summary ==================== > > Name: Collections-ul.640 > Author: ul > Time: 12 August 2015, 10:35:29.572 pm > UUID: 1065564d-36c5-43a1-842b-3be19ce91a3e > Ancestors: Collections-cmm.639 > > Character: > - sped up various methods by storing and reusing the result of #asInteger > in a temporary variable. > - sped up #isSeparator by eliminating the last branch. Swapped the tab and > cr checks, because source code has more tabs than crs. > - unified methods with mixed #asInteger and #asciiValue sends > - #isAscii uses #< instead of #between:and:, like #isOctetCharacter does. > - #asUnicode uses the same shortcut as #encodedCharSet does > - quick return in #printOn: and #storeOn: > > String: > - added identity check (should help with Text comparison) and quick > returns to #= > - spaceship operator uses #compare: if the argument is a string > - added a fast #asSignedInteger implementation > > Text: > - removed the identity check from Text >> #=, because String >> #= does it > - the spaceship operator uses String's spaceship operator > > =============== Diff against Collections-cmm.639 =============== > > Item was changed: > ----- Method: Character>>< (in category 'comparing') ----- > < aCharacter > "Answer true if the receiver's value < aCharacter's value." > > + ^self asInteger < aCharacter asInteger! > - ^self asInteger < aCharacter asciiValue! > > Item was changed: > ----- Method: Character>><= (in category 'comparing') ----- > <= aCharacter > "Answer true if the receiver's value <= aCharacter's value." > > + ^self asInteger <= aCharacter asInteger! > - ^self asInteger <= aCharacter asciiValue! > > Item was changed: > ----- Method: Character>>> (in category 'comparing') ----- > > aCharacter > "Answer true if the receiver's value > aCharacter's value." > > + ^self asInteger > aCharacter asInteger! > - ^self asInteger > aCharacter asciiValue! > > Item was changed: > ----- Method: Character>>>= (in category 'comparing') ----- > >= aCharacter > "Answer true if the receiver's value >= aCharacter's value." > > + ^self asInteger >= aCharacter asInteger! > - ^self asInteger >= aCharacter asciiValue! > > Item was changed: > ----- Method: Character>>asLowercase (in category 'converting') ----- > asLowercase > "Answer the receiver's matching lowercase Character." > > + | integerValue | > + (integerValue := self asInteger) > 255 ifFalse: [ > - self asInteger > 255 ifFalse: [ > | result | > + (result := (ClassificationTable at: integerValue + 1) > bitAnd: 16rFF) > 0 > - (result := (ClassificationTable at: self asInteger + 1) > bitAnd: 16rFF) > 0 > ifTrue: [ ^self class value: result ] ]. > + ^self class value: (self encodedCharSet toLowercaseCode: > integerValue)! > - ^self class value: (self encodedCharSet toLowercaseCode: self > asInteger)! > > Item was changed: > ----- Method: Character>>asUnicode (in category 'converting') ----- > asUnicode > "Answer the unicode encoding of the receiver" > + > + | integerValue | > + (integerValue := self asInteger) <= 16r3FFFFF ifTrue: [ > ^integerValue ]. > + ^self encodedCharSet charsetClass convertToUnicode: (integerValue > bitAnd: 16r3FFFFF) > - self leadingChar = 0 ifTrue: [^ self asInteger]. > - ^self encodedCharSet charsetClass convertToUnicode: self charCode > ! > > Item was changed: > ----- Method: Character>>asUppercase (in category 'converting') ----- > asUppercase > "Answer the receiver's matching uppercase Character." > > + | integerValue | > + (integerValue := self asInteger) > 255 ifFalse: [ > - self asInteger > 255 ifFalse: [ > | result | > + (result := ((ClassificationTable at: integerValue + 1) > bitShift: -8) bitAnd: 16rFF) > 0 > - (result := ((ClassificationTable at: self asInteger + 1) > bitShift: -8) bitAnd: 16rFF) > 0 > ifTrue: [ ^self class value: result ] ]. > + ^self class value: (self encodedCharSet toUppercaseCode: > integerValue)! > - ^self class value: (self encodedCharSet toUppercaseCode: self > asInteger)! > > Item was changed: > ----- Method: Character>>digitValue (in category 'accessing') ----- > digitValue > "Answer 0-9 if the receiver is $0-$9, 10-35 if it is $A-$Z, and < 0 > otherwise. This is used to parse literal numbers of radix 2-36." > > + | integerValue | > + (integerValue := self asInteger) > 16rFF ifTrue: [^self > encodedCharSet digitValueOf: self]. > + ^DigitValues at: integerValue + 1! > - self asInteger > 16rFF ifTrue: [^self encodedCharSet digitValueOf: > self]. > - ^DigitValues at: 1 + self asInteger! > > Item was changed: > ----- Method: Character>>isAlphaNumeric (in category 'testing') ----- > isAlphaNumeric > "Answer whether the receiver is a letter or a digit." > > + | integerValue | > + (integerValue := self asInteger) > 255 ifFalse: [ > + ^((ClassificationTable at: integerValue + 1) bitAnd: > AlphaNumericMask) > 0 ]. > - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self > asInteger + 1) bitAnd: AlphaNumericMask) > 0 ]. > ^self encodedCharSet isAlphaNumeric: self! > > Item was changed: > ----- Method: Character>>isAscii (in category 'testing') ----- > isAscii > + > + ^self asInteger < 128! > - ^ self asInteger between: 0 and: 127! > > Item was changed: > ----- Method: Character>>isDigit (in category 'testing') ----- > isDigit > > + | integerValue | > + (integerValue := self asInteger) > 255 ifFalse: [ > + ^((ClassificationTable at: integerValue + 1) bitAnd: > DigitBit) > 0 ]. > - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self > asInteger + 1) bitAnd: DigitBit) > 0 ]. > ^self encodedCharSet isDigit: self. > ! > > Item was changed: > ----- Method: Character>>isLetter (in category 'testing') ----- > isLetter > > + | integerValue | > + (integerValue := self asInteger) > 255 ifFalse: [ > + ^((ClassificationTable at: integerValue + 1) bitAnd: > LetterMask) > 0 ]. > - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self > asInteger + 1) bitAnd: LetterMask) > 0 ]. > ^self encodedCharSet isLetter: self! > > Item was changed: > ----- Method: Character>>isLowercase (in category 'testing') ----- > isLowercase > > + | integerValue | > + (integerValue := self asInteger) > 255 ifFalse: [ > + ^((ClassificationTable at: integerValue + 1) bitAnd: > LowercaseBit) > 0 ]. > - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self > asInteger + 1) bitAnd: LowercaseBit) > 0 ]. > ^self encodedCharSet isLowercase: self. > ! > > Item was changed: > ----- Method: Character>>isSeparator (in category 'testing') ----- > isSeparator > "Answer whether the receiver is one of the separator > characters--space, > cr, tab, line feed, or form feed." > > + | integerValue | > + (integerValue := self asInteger) = 32 ifTrue: [ ^true ]. > "space" > + integerValue = 9 ifTrue: [ ^true ]. "tab" > + integerValue = 13 ifTrue: [ ^true ]. "cr" > + integerValue = 10 ifTrue: [ ^true ]. "line feed" > + ^integerValue = 12 "form feed"! > - self asInteger = 32 ifTrue: [^true]. "space" > - self asInteger = 13 ifTrue: [^true]. "cr" > - self asInteger = 9 ifTrue: [^true]. "tab" > - self asInteger = 10 ifTrue: [^true]. "line feed" > - self asInteger = 12 ifTrue: [^true]. "form feed" > - ^false! > > Item was changed: > ----- Method: Character>>isUppercase (in category 'testing') ----- > isUppercase > > + | integerValue | > + (integerValue := self asInteger) > 255 ifFalse: [ > + ^((ClassificationTable at: integerValue + 1) bitAnd: > UppercaseBit) > 0 ]. > - self asInteger > 255 ifFalse: [ ^((ClassificationTable at: self > asInteger + 1) bitAnd: UppercaseBit) > 0 ]. > ^self encodedCharSet isUppercase: self. > ! > > Item was changed: > ----- Method: Character>>printOn: (in category 'printing') ----- > printOn: aStream > + > + | integerValue | > + ((integerValue := self asInteger) > 32 and: [ integerValue ~= 127 > ]) ifTrue: [ > + aStream nextPut: $$; nextPut: self. > + ^self ]. > + (self class constantNameFor: self) > + ifNotNil: [ :name | aStream nextPutAll: self class name; > space; nextPutAll: name ] > + ifNil: [ aStream nextPutAll: self class name; nextPutAll: > ' value: '; print: integerValue ]! > - | name | > - (self asInteger > 32 and: [self asInteger ~= 127]) > - ifTrue: [ aStream nextPut: $$; nextPut: self ] > - ifFalse: [ > - name := self class constantNameFor: self. > - name notNil > - ifTrue: [ aStream nextPutAll: self class > name; space; nextPutAll: name ] > - ifFalse: [ aStream nextPutAll: self class > name; nextPutAll: ' value: '; print: self asInteger ] ].! > > Item was changed: > ----- Method: Character>>shouldBePrintedAsLiteral (in category > 'testing') ----- > shouldBePrintedAsLiteral > > + | integerValue | > + ^((integerValue := self asInteger) between: 33 and: 255) and: > [self asInteger ~= 127]! > I guess you forgot to use your fresh integerValue here in the and block ;) --^ > - ^(self asInteger between: 33 and: 255) and: [self asInteger ~= > 127]! > > Item was changed: > ----- Method: Character>>storeBinaryOn: (in category 'printing') ----- > storeBinaryOn: aStream > "Store the receiver on a binary (file) stream" > > + | integerValue | > + (integerValue := self asInteger) < 256 > - self asInteger < 256 > ifTrue: [ aStream basicNextPut: self ] > + ifFalse: [ aStream nextInt32Put: integerValue ]! > - ifFalse: [ aStream nextInt32Put: self asInteger ]! > > Item was changed: > ----- Method: Character>>storeDataOn: (in category 'object fileIn') ----- > storeDataOn: aDataStream > " Store characters in reference-like way, with value like instvar. > This is compatible with various Squeak Memory Systems" > > aDataStream > beginInstance: self class > + size: 1; > + nextPut: self asInteger! > - size: 1. > - aDataStream nextPut: self asInteger.! > > Item was changed: > ----- Method: Character>>storeOn: (in category 'printing') ----- > storeOn: aStream > "Common character literals are preceded by '$', however special > need to be encoded differently: for some this might be done by using one of > the shortcut constructor methods for the rest we have to create them by > ascii-value." > > + self shouldBePrintedAsLiteral ifTrue: [ > + aStream nextPut: $$; nextPut: self. > + ^self ]. > + (self class constantNameFor: self) ifNotNil: [ :name | > + aStream nextPutAll: self class name; space; nextPutAll: > name. > + ^self ]. > + aStream > + nextPut: $(; nextPutAll: self class name; > + nextPutAll: ' value: '; print: self asInteger; nextPut: $)! > - | name | > - self shouldBePrintedAsLiteral > - ifTrue: [ aStream nextPut: $$; nextPut: self ] > - ifFalse: [ > - name := self class constantNameFor: self. > - name notNil > - ifTrue: [ aStream nextPutAll: self class > name; space; nextPutAll: name ] > - ifFalse: [ > - aStream > - nextPut: $(; nextPutAll: > self class name; > - nextPutAll: ' value: '; > print: self asInteger; nextPut: $) ] ].! > > Item was changed: > ----- Method: CharacterSet>>includes: (in category 'collection ops') > ----- > includes: aCharacter > + > + | index | > + (index := aCharacter asInteger + 1) > 256 ifTrue: [ ^false ]. > + ^(map at: index) > 0! > - aCharacter asciiValue >= 256 > - ifTrue: ["Guard against wide characters" > - ^false]. > - ^(map at: aCharacter asciiValue + 1) > 0! > > Item was changed: > ----- Method: String>><=> (in category 'sorting') ----- > <=> aCharacterArray > "Return a collation order of -1, 0, or 1, indicating whether I > should be collated before the receiver, am equal, or after. > See also: http://en.wikipedia.org/wiki/Spaceship_operator" > > + aCharacterArray isString ifTrue: [ ^(self compare: > aCharacterArray) - 2 ]. > + self = aCharacterArray ifTrue: [ ^0 ]. > + self < aCharacterArray ifTrue: [ ^-1 ]. > + ^1! > - ^self = aCharacterArray > - ifTrue: [ 0 ] > - ifFalse: [self < aCharacterArray > - ifTrue: [ -1 ] > - ifFalse: [ 1 ]]! > > Item was changed: > ----- Method: String>>= (in category 'comparing') ----- > = aString > "Answer whether the receiver sorts equally as aString. > The collation order is simple ascii (with case differences)." > > + self == aString ifTrue: [ ^true ]. > + aString isString ifFalse: [ ^false ]. > + self size = aString size ifFalse: [ ^false ]. > - (aString isString > - and: [self size = aString size]) ifFalse: [^ false]. > ^ (self compare: self with: aString collated: AsciiOrder) = 2! > > Item was changed: > ----- Method: String>>asSignedInteger (in category 'converting') ----- > asSignedInteger > "Returns the first signed integer it can find or nil." > > + | result character index negative | > + (self at: 1) isDigit > + ifTrue: [ index := 1 ] > + ifFalse: [ > + index := self findFirst: [ :char | char isDigit ]. > + index = 0 ifTrue: [ ^nil ] ]. > + negative := index > 1 and: [ (self at: index - 1) == $- ]. > + result := 0. > + [ index <= self size and: [ (character := self at: index) isDigit > ] ] whileTrue: [ > + result := result * 10 + character asciiValue - 48 "$0 > asciiValue". > + index := index + 1 ]. > + negative ifTrue: [ ^0 - result ]. > + ^result > + ! > - | start | > - start := self findFirst: [:char | char isDigit]. > - start isZero ifTrue: [^ nil]. > - (start > 1 and: [self at: start - 1]) = $- ifTrue: [start := start > - 1]. > - ^ Integer readFrom: (ReadStream on: self from: start to: self > size)! > > Item was changed: > ----- Method: Text>><=> (in category 'sorting') ----- > <=> aCharacterArray > "Return a collation order of -1, 0, or 1, indicating whether I > should be collated before the receiver, am equal, or after. > See also: http://en.wikipedia.org/wiki/Spaceship_operator" > > + aCharacterArray isString ifTrue: [ ^string <=> aCharacterArray ]. > + ^string <=> aCharacterArray asString! > - ^string = aCharacterArray > - ifTrue: [ 0 ] > - ifFalse: [string < aCharacterArray asString > - ifTrue: [ -1 ] > - ifFalse: [ 1 ]]! > > Item was changed: > ----- Method: Text>>= (in category 'comparing') ----- > = other > "Am I equal to the other Text or String? > ***** Warning ***** Two Texts are considered equal if they have > the same characters in them. They might have completely different > emphasis, fonts, sizes, text actions, or embedded morphs. If you need to > find out if one is a true copy of the other, you must do (text1 = text2 > and: [text1 runs = text2 runs])." > > + other isText ifTrue: [ ^string = other string ]. > + other isString ifTrue: [ ^string = other ]. > + ^false! > - other isText ifTrue: ["This is designed to run fast even for > megabytes" > - ^ string == other string or: [string = > other string]]. > - other isString ifTrue: [^ string == other or: [string = other]]. > - ^ false! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150815/28f2ed3f/attachment.htm From nicolas.cellier.aka.nice at gmail.com Sat Aug 15 20:55:08 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Sat Aug 15 20:55:10 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.940.mcz In-Reply-To: <55ce4fc7.44968c0a.1d9a2.fffff437SMTPIN_ADDED_MISSING@mx.google.com> References: <55ce4fc7.44968c0a.1d9a2.fffff437SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: +1, I had the same change rotting for months in an image... 2015-08-14 22:29 GMT+02:00 : > Levente Uzonyi uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-ul.940.mcz > > ==================== Summary ==================== > > Name: Kernel-ul.940 > Author: ul > Time: 14 August 2015, 7:01:14.824 pm > UUID: 45cb01b1-52ab-40ff-ac9d-7b3334915356 > Ancestors: Kernel-ul.939 > > #allCharacters -> #allByteCharacters > > =============== Diff against Kernel-ul.939 =============== > > Item was changed: > ----- Method: InputSensor class>>installKeyDecodeTable (in category > 'class initialization') ----- > installKeyDecodeTable > "Create a decode table that swaps some keys if > Preferences swapControlAndAltKeys is set" > KeyDecodeTable := Dictionary new. > Preferences duplicateControlAndAltKeys > ifTrue: [ self defaultCrossPlatformKeys do: > [ :c | self installDuplicateKeyEntryFor: c > ] ]. > Preferences swapControlAndAltKeys > ifTrue: [ self defaultCrossPlatformKeys do: > [ :c | self installSwappedKeyEntryFor: c ] > ]. > Preferences duplicateAllControlAndAltKeys > + ifTrue: [ (Character allByteCharacters select: [:ea | ea > isAlphaNumeric]) do: > - ifTrue: [ (Character allCharacters select: [:ea | ea > isAlphaNumeric]) do: > [ :c | self installDuplicateKeyEntryFor: c > ] ]. > ! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150815/73bf8852/attachment.htm From unoduetre at poczta.onet.pl Sat Aug 15 22:56:09 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Sat Aug 15 22:56:36 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font Message-ID: <1439679369.9270.2@mglap> Hi, First of all thank you for the new version of Squeak. It's really great. Special thanks for Tobias and Marcel for the font import tool! It works perfectly. Nevertheless I have noticed that there is a regression in Squeak 4.6/5.0 in the font handling. It's not possible anymore to use non-english characters even after loading a font that contains them (I've changed the code font and tried to use the characters in a workspace). Can anyone verify? Mateusz From johnson at cs.uiuc.edu Sun Aug 16 10:19:23 2015 From: johnson at cs.uiuc.edu (Ralph Johnson) Date: Sun Aug 16 10:19:26 2015 Subject: [squeak-dev] googlecode pre-shutdown cleanup In-Reply-To: References: Message-ID: Most projects have a pointer to another web site already. Those that do not are glassdb nativeboost metacello (I thought it was just a part of Pharo by now) There is a github repo but the googlecode site doesn't point to it. objectbrowserpharo There is also an entry for Omnibrowser but there is no code, no wiki pages, no nothing. On Tue, Aug 11, 2015 at 10:33 AM, Ben Coman wrote: > Seems like some historical Squeak/Pharo projects might be worth > migrating to github just to maintain a historical record. Soon won't > be able to mark projects "moved". > > https://code.google.com/p/support/wiki/ReadOnlyTransition > https://code.google.com/hosting/search?q=pharo > https://code.google.com/hosting/search?q=squeak > > cheers -ben > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150816/a37a880f/attachment.htm From shouse.patrick at gmail.com Mon Aug 17 01:44:53 2015 From: shouse.patrick at gmail.com (Patrick Shouse) Date: Mon Aug 17 01:48:50 2015 Subject: [squeak-dev] Tiny patch for RFB Message-ID: <1439775893966-4843388.post@n4.nabble.com> I've fixed a tiny bug in RFBMenuMorph that was causing RFBServer open to fail in an up-to-date Squeak-5.0-All-in-One image. I simply replaced the reference to a missing class, EmptyArray, with Array empty. Seems to have solved the problem. Is there a preferred way to submit this change so that the repository on SqueakSource gets updated? 'From Squeak5.0 of 14 August 2015 [latest update: #15135] on 17 August 2015 at 1:25:32 am'! !RFBMenuMorph methodsFor: 'construction' stamp: 'pls 8/17/2015 00:28'! add: label get: getBlock set: setBlock help: helpString "Add a new updating item with the given label and balloon helpString. The getBlock provides a Boolean with which the / prefix for the label is retrieved. If the item is selected then setBlock is invoked." (self addUpdating: #getLabel: target: setBlock selector: #value argumentList: Array empty) wordingProvider: self wordingSelector: #getLabel:; wordingArgument: (Array with: getBlock with: label). self balloonTextForLastItem: helpString! ! -- View this message in context: http://forum.world.st/Tiny-patch-for-RFB-tp4843388.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lewis at mail.msen.com Mon Aug 17 11:55:40 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Aug 17 11:55:44 2015 Subject: [squeak-dev] Tiny patch for RFB In-Reply-To: <1439775893966-4843388.post@n4.nabble.com> References: <1439775893966-4843388.post@n4.nabble.com> Message-ID: <20150817115540.GA40143@shell.msen.com> On Sun, Aug 16, 2015 at 06:44:53PM -0700, Patrick Shouse wrote: > I've fixed a tiny bug in RFBMenuMorph that was causing RFBServer open to fail > in an up-to-date Squeak-5.0-All-in-One image. I simply replaced the > reference to a missing class, EmptyArray, with Array empty. Seems to have > solved the problem. Is there a preferred way to submit this change so that > the repository on SqueakSource gets updated? Hi Patrick, Checking the RFB project on www.squeaksource.com, the project is owned by Ian Piumarta (author of the package). You can send the change to Ian (CCed on this), or ask him if he would like to add you or someone else as an additional developer on the project. Your fix looks good to me. Thanks, Dave > > 'From Squeak5.0 of 14 August 2015 [latest update: #15135] on 17 August 2015 > at 1:25:32 am'! > > !RFBMenuMorph methodsFor: 'construction' stamp: 'pls 8/17/2015 00:28'! > add: label get: getBlock set: setBlock help: helpString > "Add a new updating item with the given label and balloon helpString. The > getBlock provides a Boolean with which the / prefix for the label > is retrieved. If the item is selected then setBlock is invoked." > > (self addUpdating: #getLabel: target: setBlock selector: #value > argumentList: Array empty) > wordingProvider: self > wordingSelector: #getLabel:; > wordingArgument: (Array with: getBlock with: label). > self balloonTextForLastItem: helpString! ! > > > > -- > View this message in context: http://forum.world.st/Tiny-patch-for-RFB-tp4843388.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at elte.hu Mon Aug 17 12:15:46 2015 From: leves at elte.hu (Levente Uzonyi) Date: Mon Aug 17 12:15:52 2015 Subject: [squeak-dev] Tiny patch for RFB In-Reply-To: <1439775893966-4843388.post@n4.nabble.com> References: <1439775893966-4843388.post@n4.nabble.com> Message-ID: I've fixed this bug a while ago in "my branch", but it has some other changes which may not be useful for everyone. You can find the latest version here: http://leves.web.elte.hu/squeak/RFB-ul.11.mcz Levente On Sun, 16 Aug 2015, Patrick Shouse wrote: > I've fixed a tiny bug in RFBMenuMorph that was causing RFBServer open to fail > in an up-to-date Squeak-5.0-All-in-One image. I simply replaced the > reference to a missing class, EmptyArray, with Array empty. Seems to have > solved the problem. Is there a preferred way to submit this change so that > the repository on SqueakSource gets updated? > > 'From Squeak5.0 of 14 August 2015 [latest update: #15135] on 17 August 2015 > at 1:25:32 am'! > > !RFBMenuMorph methodsFor: 'construction' stamp: 'pls 8/17/2015 00:28'! > add: label get: getBlock set: setBlock help: helpString > "Add a new updating item with the given label and balloon helpString. The > getBlock provides a Boolean with which the / prefix for the label > is retrieved. If the item is selected then setBlock is invoked." > > (self addUpdating: #getLabel: target: setBlock selector: #value > argumentList: Array empty) > wordingProvider: self > wordingSelector: #getLabel:; > wordingArgument: (Array with: getBlock with: label). > self balloonTextForLastItem: helpString! ! > > > > -- > View this message in context: http://forum.world.st/Tiny-patch-for-RFB-tp4843388.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From asqueaker at gmail.com Mon Aug 17 14:49:38 2015 From: asqueaker at gmail.com (Chris Muller) Date: Mon Aug 17 14:49:41 2015 Subject: [squeak-dev] Tiny patch for RFB In-Reply-To: References: <1439775893966-4843388.post@n4.nabble.com> Message-ID: I, too, fixed this a while ago as well as a couple of other improvements. Since RFB is now needed by the updated SqueakSource package at http://source.squeak.org/ss, and none of the original authors RFB are active in the community, continued development on RFB should continue there. Please find my improved versions of RFB with that fix there. Levente, what other improvements did you make? We may want to integrate them? - Chris On Mon, Aug 17, 2015 at 7:15 AM, Levente Uzonyi wrote: > I've fixed this bug a while ago in "my branch", but it has some other > changes which may not be useful for everyone. You can find the latest > version here: http://leves.web.elte.hu/squeak/RFB-ul.11.mcz > > Levente > > > On Sun, 16 Aug 2015, Patrick Shouse wrote: > >> I've fixed a tiny bug in RFBMenuMorph that was causing RFBServer open to >> fail >> in an up-to-date Squeak-5.0-All-in-One image. I simply replaced the >> reference to a missing class, EmptyArray, with Array empty. Seems to have >> solved the problem. Is there a preferred way to submit this change so that >> the repository on SqueakSource gets updated? >> >> 'From Squeak5.0 of 14 August 2015 [latest update: #15135] on 17 August >> 2015 >> at 1:25:32 am'! >> >> !RFBMenuMorph methodsFor: 'construction' stamp: 'pls 8/17/2015 00:28'! >> add: label get: getBlock set: setBlock help: helpString >> "Add a new updating item with the given label and balloon >> helpString. The >> getBlock provides a Boolean with which the / prefix for the label >> is retrieved. If the item is selected then setBlock is invoked." >> >> (self addUpdating: #getLabel: target: setBlock selector: #value >> argumentList: Array empty) >> wordingProvider: self >> wordingSelector: #getLabel:; >> wordingArgument: (Array with: getBlock with: label). >> self balloonTextForLastItem: helpString! ! >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Tiny-patch-for-RFB-tp4843388.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> > From lewis at mail.msen.com Mon Aug 17 14:58:12 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Aug 17 14:58:15 2015 Subject: [squeak-dev] Tiny patch for RFB In-Reply-To: References: <1439775893966-4843388.post@n4.nabble.com> Message-ID: <45908.136.2.1.105.1439823492.squirrel@webmail.msen.com> As a matter of protocol and of common courtesy, please ask the author of the package how he prefers to handle this. Dave > I, too, fixed this a while ago as well as a couple of other > improvements. Since RFB is now needed by the updated SqueakSource > package at http://source.squeak.org/ss, and none of the original > authors RFB are active in the community, continued development on RFB > should continue there. Please find my improved versions of RFB with > that fix there. > > Levente, what other improvements did you make? We may want to integrate > them? > > - Chris > > On Mon, Aug 17, 2015 at 7:15 AM, Levente Uzonyi wrote: >> I've fixed this bug a while ago in "my branch", but it has some other >> changes which may not be useful for everyone. You can find the latest >> version here: http://leves.web.elte.hu/squeak/RFB-ul.11.mcz >> >> Levente >> >> >> On Sun, 16 Aug 2015, Patrick Shouse wrote: >> >>> I've fixed a tiny bug in RFBMenuMorph that was causing RFBServer open >>> to >>> fail >>> in an up-to-date Squeak-5.0-All-in-One image. I simply replaced the >>> reference to a missing class, EmptyArray, with Array empty. Seems to >>> have >>> solved the problem. Is there a preferred way to submit this change so >>> that >>> the repository on SqueakSource gets updated? >>> >>> 'From Squeak5.0 of 14 August 2015 [latest update: #15135] on 17 August >>> 2015 >>> at 1:25:32 am'! >>> >>> !RFBMenuMorph methodsFor: 'construction' stamp: 'pls 8/17/2015 00:28'! >>> add: label get: getBlock set: setBlock help: helpString >>> "Add a new updating item with the given label and balloon >>> helpString. The >>> getBlock provides a Boolean with which the / prefix for the >>> label >>> is retrieved. If the item is selected then setBlock is invoked." >>> >>> (self addUpdating: #getLabel: target: setBlock selector: #value >>> argumentList: Array empty) >>> wordingProvider: self >>> wordingSelector: #getLabel:; >>> wordingArgument: (Array with: getBlock with: label). >>> self balloonTextForLastItem: helpString! ! >>> >>> >>> >>> -- >>> View this message in context: >>> http://forum.world.st/Tiny-patch-for-RFB-tp4843388.html >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >>> >>> >> > From asqueaker at gmail.com Mon Aug 17 15:27:25 2015 From: asqueaker at gmail.com (Chris Muller) Date: Mon Aug 17 15:27:28 2015 Subject: [squeak-dev] Tiny patch for RFB In-Reply-To: <45908.136.2.1.105.1439823492.squirrel@webmail.msen.com> References: <1439775893966-4843388.post@n4.nabble.com> <45908.136.2.1.105.1439823492.squirrel@webmail.msen.com> Message-ID: The system (SqueakSource) does not provide any way to contact the original author (no email information), but you said you've already done that anyway, ("cc'd on this" you said). Since Ian has not been visible in the community for a long time, I do not feel I'm being discourteous. How long do you want to wait for a reply before proceeding with further development needed by today's community? On Mon, Aug 17, 2015 at 9:58 AM, David T. Lewis wrote: > As a matter of protocol and of common courtesy, please ask the author of > the package how he prefers to handle this. > > Dave > >> I, too, fixed this a while ago as well as a couple of other >> improvements. Since RFB is now needed by the updated SqueakSource >> package at http://source.squeak.org/ss, and none of the original >> authors RFB are active in the community, continued development on RFB >> should continue there. Please find my improved versions of RFB with >> that fix there. >> >> Levente, what other improvements did you make? We may want to integrate >> them? >> >> - Chris >> >> On Mon, Aug 17, 2015 at 7:15 AM, Levente Uzonyi wrote: >>> I've fixed this bug a while ago in "my branch", but it has some other >>> changes which may not be useful for everyone. You can find the latest >>> version here: http://leves.web.elte.hu/squeak/RFB-ul.11.mcz >>> >>> Levente >>> >>> >>> On Sun, 16 Aug 2015, Patrick Shouse wrote: >>> >>>> I've fixed a tiny bug in RFBMenuMorph that was causing RFBServer open >>>> to >>>> fail >>>> in an up-to-date Squeak-5.0-All-in-One image. I simply replaced the >>>> reference to a missing class, EmptyArray, with Array empty. Seems to >>>> have >>>> solved the problem. Is there a preferred way to submit this change so >>>> that >>>> the repository on SqueakSource gets updated? >>>> >>>> 'From Squeak5.0 of 14 August 2015 [latest update: #15135] on 17 August >>>> 2015 >>>> at 1:25:32 am'! >>>> >>>> !RFBMenuMorph methodsFor: 'construction' stamp: 'pls 8/17/2015 00:28'! >>>> add: label get: getBlock set: setBlock help: helpString >>>> "Add a new updating item with the given label and balloon >>>> helpString. The >>>> getBlock provides a Boolean with which the / prefix for the >>>> label >>>> is retrieved. If the item is selected then setBlock is invoked." >>>> >>>> (self addUpdating: #getLabel: target: setBlock selector: #value >>>> argumentList: Array empty) >>>> wordingProvider: self >>>> wordingSelector: #getLabel:; >>>> wordingArgument: (Array with: getBlock with: label). >>>> self balloonTextForLastItem: helpString! ! >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://forum.world.st/Tiny-patch-for-RFB-tp4843388.html >>>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >>>> >>>> >>> >> > > > From lewis at mail.msen.com Mon Aug 17 15:42:22 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Aug 17 15:42:27 2015 Subject: [squeak-dev] Tiny patch for RFB In-Reply-To: References: <1439775893966-4843388.post@n4.nabble.com> <45908.136.2.1.105.1439823492.squirrel@webmail.msen.com> Message-ID: <24850.136.2.1.105.1439826142.squirrel@webmail.msen.com> Try piumarta at gmail dot com Dave > The system (SqueakSource) does not provide any way to contact the > original author (no email information), but you said you've already > done that anyway, ("cc'd on this" you said). Since Ian has not been > visible in the community for a long time, I do not feel I'm being > discourteous. How long do you want to wait for a reply before > proceeding with further development needed by today's community? > > > On Mon, Aug 17, 2015 at 9:58 AM, David T. Lewis > wrote: >> As a matter of protocol and of common courtesy, please ask the author of >> the package how he prefers to handle this. >> >> Dave >> >>> I, too, fixed this a while ago as well as a couple of other >>> improvements. Since RFB is now needed by the updated SqueakSource >>> package at http://source.squeak.org/ss, and none of the original >>> authors RFB are active in the community, continued development on RFB >>> should continue there. Please find my improved versions of RFB with >>> that fix there. >>> >>> Levente, what other improvements did you make? We may want to >>> integrate >>> them? >>> >>> - Chris >>> >>> On Mon, Aug 17, 2015 at 7:15 AM, Levente Uzonyi wrote: >>>> I've fixed this bug a while ago in "my branch", but it has some other >>>> changes which may not be useful for everyone. You can find the latest >>>> version here: http://leves.web.elte.hu/squeak/RFB-ul.11.mcz >>>> >>>> Levente >>>> >>>> >>>> On Sun, 16 Aug 2015, Patrick Shouse wrote: >>>> >>>>> I've fixed a tiny bug in RFBMenuMorph that was causing RFBServer open >>>>> to >>>>> fail >>>>> in an up-to-date Squeak-5.0-All-in-One image. I simply replaced the >>>>> reference to a missing class, EmptyArray, with Array empty. Seems to >>>>> have >>>>> solved the problem. Is there a preferred way to submit this change so >>>>> that >>>>> the repository on SqueakSource gets updated? >>>>> >>>>> 'From Squeak5.0 of 14 August 2015 [latest update: #15135] on 17 >>>>> August >>>>> 2015 >>>>> at 1:25:32 am'! >>>>> >>>>> !RFBMenuMorph methodsFor: 'construction' stamp: 'pls 8/17/2015 >>>>> 00:28'! >>>>> add: label get: getBlock set: setBlock help: helpString >>>>> "Add a new updating item with the given label and balloon >>>>> helpString. The >>>>> getBlock provides a Boolean with which the / prefix for the >>>>> label >>>>> is retrieved. If the item is selected then setBlock is invoked." >>>>> >>>>> (self addUpdating: #getLabel: target: setBlock selector: >>>>> #value >>>>> argumentList: Array empty) >>>>> wordingProvider: self >>>>> wordingSelector: #getLabel:; >>>>> wordingArgument: (Array with: getBlock with: label). >>>>> self balloonTextForLastItem: helpString! ! >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://forum.world.st/Tiny-patch-for-RFB-tp4843388.html >>>>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >>>>> >>>>> >>>> >>> >> >> >> > From leves at elte.hu Mon Aug 17 19:14:13 2015 From: leves at elte.hu (Levente Uzonyi) Date: Mon Aug 17 19:14:18 2015 Subject: [squeak-dev] Tiny patch for RFB In-Reply-To: References: <1439775893966-4843388.post@n4.nabble.com> Message-ID: Hi Chris, Most changes are related to server-side key decoding (see RFBSession >> #decodeKey:). I've added support for 8-bit ASCII, Unicode and all legacy X11R7 keysyms. With these changes you can enter accented characters to the image over RFB. If your client has Unicode support (I haven't seen such client yet), then you can enter any Unicode character. Levente On Mon, 17 Aug 2015, Chris Muller wrote: > I, too, fixed this a while ago as well as a couple of other > improvements. Since RFB is now needed by the updated SqueakSource > package at http://source.squeak.org/ss, and none of the original > authors RFB are active in the community, continued development on RFB > should continue there. Please find my improved versions of RFB with > that fix there. > > Levente, what other improvements did you make? We may want to integrate them? > > - Chris > > On Mon, Aug 17, 2015 at 7:15 AM, Levente Uzonyi wrote: >> I've fixed this bug a while ago in "my branch", but it has some other >> changes which may not be useful for everyone. You can find the latest >> version here: http://leves.web.elte.hu/squeak/RFB-ul.11.mcz >> >> Levente >> >> >> On Sun, 16 Aug 2015, Patrick Shouse wrote: >> >>> I've fixed a tiny bug in RFBMenuMorph that was causing RFBServer open to >>> fail >>> in an up-to-date Squeak-5.0-All-in-One image. I simply replaced the >>> reference to a missing class, EmptyArray, with Array empty. Seems to have >>> solved the problem. Is there a preferred way to submit this change so that >>> the repository on SqueakSource gets updated? >>> >>> 'From Squeak5.0 of 14 August 2015 [latest update: #15135] on 17 August >>> 2015 >>> at 1:25:32 am'! >>> >>> !RFBMenuMorph methodsFor: 'construction' stamp: 'pls 8/17/2015 00:28'! >>> add: label get: getBlock set: setBlock help: helpString >>> "Add a new updating item with the given label and balloon >>> helpString. The >>> getBlock provides a Boolean with which the / prefix for the label >>> is retrieved. If the item is selected then setBlock is invoked." >>> >>> (self addUpdating: #getLabel: target: setBlock selector: #value >>> argumentList: Array empty) >>> wordingProvider: self >>> wordingSelector: #getLabel:; >>> wordingArgument: (Array with: getBlock with: label). >>> self balloonTextForLastItem: helpString! ! >>> >>> >>> >>> -- >>> View this message in context: >>> http://forum.world.st/Tiny-patch-for-RFB-tp4843388.html >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >>> >>> >> > > From commits at source.squeak.org Mon Aug 17 20:20:49 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Aug 17 20:20:51 2015 Subject: [squeak-dev] The Trunk: Regex-Core-ul.38.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Core-ul.38.mcz ==================== Summary ==================== Name: Regex-Core-ul.38 Author: ul Time: 17 August 2015, 10:09:02.436 pm UUID: 0c1d8e56-381a-4fe0-ad20-80ede67b4ba5 Ancestors: Regex-Core-ul.37 - further optimizations =============== Diff against Regex-Core-ul.37 =============== Item was changed: ----- Method: RxMatchOptimizer>>conditionTester (in category 'accessing') ----- conditionTester "#any condition is filtered at the higher level; it cannot appear among the conditions here." + | matchConditions size | + (size := conditions size) = 0ifTrue: [ ^nil ]. + size = 1 ifTrue: [ - | matchConditions | - conditions isEmpty ifTrue: [^nil]. - conditions size = 1 ifTrue: [ | matchCondition | matchCondition := conditions anyOne. "Special case all of the possible conditions." #atBeginningOfLine == matchCondition ifTrue: [^[:c :matcher | matcher atBeginningOfLine]]. #atEndOfLine == matchCondition ifTrue: [^[:c :matcher | matcher atEndOfLine]]. #atBeginningOfWord == matchCondition ifTrue: [^[:c :matcher | matcher atBeginningOfWord]]. #atEndOfWord == matchCondition ifTrue: [^[:c :matcher | matcher atEndOfWord]]. #atWordBoundary == matchCondition ifTrue: [^[:c :matcher | matcher atWordBoundary]]. #notAtWordBoundary == matchCondition ifTrue: [^[:c :matcher | matcher notAtWordBoundary]]. RxParser signalCompilationException: 'invalid match condition']. "More than one condition. Capture them as an array in scope." matchConditions := conditions asArray. ^[ :c :matcher | matchConditions anySatisfy: [ :conditionSelector | matcher perform: conditionSelector ] ]! Item was changed: ----- Method: RxMatchOptimizer>>initialize:ignoreCase: (in category 'initialize-release') ----- initialize: aRegex ignoreCase: aBoolean "Set `testMethod' variable to a can-match predicate block: two-argument block which accepts a lookahead character and a matcher (presumably built from aRegex) and answers a boolean indicating whether a match could start at the given lookahead. " ignoreCase := aBoolean. + prefixes := IdentitySet new: 10. + nonPrefixes := IdentitySet new: 10. + conditions := IdentitySet new: 3. - prefixes := Set new: 10. - nonPrefixes := Set new: 10. - conditions := Set new: 3. methodPredicates := Set new: 3. nonMethodPredicates := Set new: 3. predicates := Set new: 3. nonPredicates := Set new: 3. lookarounds := Set new: 3. aRegex dispatchTo: self. "If the whole expression is nullable, end-of-line is an implicit can-match condition!!" aRegex isNullable ifTrue: [conditions add: #atEndOfLine]. testBlock := self determineTestMethod! Item was changed: ----- Method: RxMatchOptimizer>>methodPredicateTester (in category 'accessing') ----- methodPredicateTester | p size | (size := methodPredicates size) = 0 ifTrue: [ ^nil ]. size = 1 ifTrue: [ + | selector | - | selector | "might be a pretty common case" selector := methodPredicates anyOne. ^[ :char :matcher | RxParser doHandlingMessageNotUnderstood: [ char perform: selector ] ] ]. p := methodPredicates asArray. ^[ :char :matcher | RxParser doHandlingMessageNotUnderstood: [ p anySatisfy: [ :sel | char perform: sel ] ] ]! Item was removed: - ----- Method: RxMatchOptimizer>>optimizeSet: (in category 'private') ----- - optimizeSet: aSet - "If a set is small, convert it to array to speed up lookup - (Array has no hashing overhead, beats Set on small number - of elements)." - - ^aSet size < 10 ifTrue: [aSet asArray] ifFalse: [aSet]! Item was changed: ----- Method: RxMatchOptimizer>>syntaxRegex: (in category 'double dispatch') ----- syntaxRegex: regexNode "All prefixes of the regex's branches should be combined. Therefore, just recurse." regexNode branch dispatchTo: self. + regexNode regex ifNotNil: [ :regex | + regex dispatchTo: self ]! - regexNode regex notNil - ifTrue: [regexNode regex dispatchTo: self]! Item was changed: ----- Method: RxMatcher>>allocateMarker (in category 'private') ----- allocateMarker "Answer an integer to use as an index of the next marker." + ^markerCount := markerCount + 1! - markerCount := markerCount + 1. - ^markerCount! Item was changed: ----- Method: RxsCharSet>>enumerablePartPredicateIgnoringCase: (in category 'privileged') ----- enumerablePartPredicateIgnoringCase: aBoolean | enumeration | + enumeration := (self enumerableSetIgnoringCase: aBoolean) ifNil: [ ^nil ]. - enumeration := self enumerableSetIgnoringCase: aBoolean. - enumeration ifNil: [ ^nil ]. negated ifTrue: [ ^[ :char | (enumeration includes: char) not ] ]. ^[ :char | enumeration includes: char ]! Item was changed: ----- Method: RxsCharSet>>enumerableSetIgnoringCase: (in category 'privileged') ----- enumerableSetIgnoringCase: aBoolean "Answer a collection of characters that make up the portion of me that can be enumerated, or nil if there are no such characters." + | highestCharacterCode set | + highestCharacterCode := elements detectMax: [ :each | + each maximumCharacterCodeIgnoringCase: aBoolean ]. + highestCharacterCode = -1 ifTrue: [ ^nil ]. + set := highestCharacterCode <= 255 + ifTrue: [ CharacterSet new ] + ifFalse: [ WideCharacterSet new ]. - | size set | - size := elements detectSum: [ :each | - each enumerateSizeIgnoringCase: aBoolean ]. - size = 0 ifTrue: [ ^nil ]. - set := Set new: size. elements do: [ :each | each enumerateTo: set ignoringCase: aBoolean ]. ^set! Item was removed: - ----- Method: RxsCharacter>>enumerateSizeIgnoringCase: (in category 'accessing') ----- - enumerateSizeIgnoringCase: aBoolean - - aBoolean ifFalse: [ ^1 ]. - character isLetter ifTrue: [ ^2 ]. - ^1! Item was added: + ----- Method: RxsCharacter>>maximumCharacterCodeIgnoringCase: (in category 'accessing') ----- + maximumCharacterCodeIgnoringCase: aBoolean + "Return the largest character code among the characters I represent." + + aBoolean ifFalse: [ ^character asInteger ]. + ^character asUppercase asInteger max: character asLowercase asInteger! Item was removed: - ----- Method: RxsPredicate>>enumerateSizeIgnoringCase: (in category 'accessing') ----- - enumerateSizeIgnoringCase: aBoolean - - ^0 "Not enumerable"! Item was added: + ----- Method: RxsPredicate>>maximumCharacterCodeIgnoringCase: (in category 'accessing') ----- + maximumCharacterCodeIgnoringCase: aBoolean + "Return the largest character code among the characters I represent." + + ^-1 "Not enumerable"! Item was removed: - ----- Method: RxsRange>>enumerateSizeIgnoringCase: (in category 'accessing') ----- - enumerateSizeIgnoringCase: aBoolean - "Add all of the elements I represent to the collection." - - | characterCount | - characterCount := last asInteger - first asInteger + 1 max: 0. - aBoolean ifFalse: [ ^characterCount ]. - (last isLetter or: [ first isLetter ]) ifTrue: [ ^characterCount * 2 "Assume many letters" ]. - ^characterCount "Assume no letters"! Item was added: + ----- Method: RxsRange>>maximumCharacterCodeIgnoringCase: (in category 'accessing') ----- + maximumCharacterCodeIgnoringCase: aBoolean + "Return the largest character code among the characters I represent." + + first <= last ifFalse: [ ^-1 "Empty range" ]. + aBoolean ifFalse: [ ^last asInteger ]. + ^(first to: last) detectMax: [ :each | + each asLowercase asInteger max: each asUppercase asInteger ] + ! From commits at source.squeak.org Mon Aug 17 20:21:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Aug 17 20:21:05 2015 Subject: [squeak-dev] The Trunk: Regex-Core-ul.39.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Core-ul.39.mcz ==================== Summary ==================== Name: Regex-Core-ul.39 Author: ul Time: 17 August 2015, 10:16:17.568 pm UUID: 9b543eea-9025-4635-b176-188298a6a07e Ancestors: Regex-Core-ul.38 - fix: use #injecto:into: instead of #detectMax: in RxsCharSet>>enumerableSetIgnoringCase:, because the latter returns the object instead of the maximum. =============== Diff against Regex-Core-ul.38 =============== Item was changed: ----- Method: RxsCharSet>>enumerableSetIgnoringCase: (in category 'privileged') ----- enumerableSetIgnoringCase: aBoolean "Answer a collection of characters that make up the portion of me that can be enumerated, or nil if there are no such characters." | highestCharacterCode set | + highestCharacterCode := elements inject: -1 into: [ :max :each | + max := (each maximumCharacterCodeIgnoringCase: aBoolean) max: max ]. - highestCharacterCode := elements detectMax: [ :each | - each maximumCharacterCodeIgnoringCase: aBoolean ]. highestCharacterCode = -1 ifTrue: [ ^nil ]. set := highestCharacterCode <= 255 ifTrue: [ CharacterSet new ] ifFalse: [ WideCharacterSet new ]. elements do: [ :each | each enumerateTo: set ignoringCase: aBoolean ]. ^set! From commits at source.squeak.org Mon Aug 17 20:21:45 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Aug 17 20:21:47 2015 Subject: [squeak-dev] The Trunk: Collections-ul.642.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.642.mcz ==================== Summary ==================== Name: Collections-ul.642 Author: ul Time: 17 August 2015, 10:12:38.668 pm UUID: 4a6c1591-8a42-41a2-b3ae-2644c2d12320 Ancestors: Collections-ul.641 - Character >> #shouldBePrintedAsLiteral uses the local variable holding the integer value of the character. Also added quick returns. WideCharacterSet - faster #includes: - use #integerDictionary for map =============== Diff against Collections-ul.641 =============== Item was changed: ----- Method: Character>>shouldBePrintedAsLiteral (in category 'testing') ----- shouldBePrintedAsLiteral | integerValue | + (integerValue := self asInteger) < 33 ifTrue: [ ^false ]. + 255 < integerValue ifTrue: [ ^false ]. + ^integerValue ~= 127! - ^((integerValue := self asInteger) between: 33 and: 255) and: [self asInteger ~= 127]! Item was changed: ----- Method: WideCharacterSet>>includes: (in category 'collection ops') ----- includes: aCharacter + + | value bitmap | + (value := aCharacter asInteger) < 256 ifTrue: [ + ^(byteArrayMap at: value + 1) ~= 0 ]. + bitmap := (map at: (value bitShift: -16) ifAbsent: nil) ifNil: [ ^false ]. + ^(self + bitmap: bitmap + at: (value bitAnd: 16rFFFF)) ~= 0! - | val high low | - val := aCharacter asciiValue. - high := val bitShift: -16. - low := val bitAnd: 16rFFFF. - ^(self - bitmap: (map - at: high - ifAbsent: [^ false]) - at: low) isZero not! Item was changed: ----- Method: WideCharacterSet>>initialize (in category 'initialize-release') ----- initialize + + map := PluggableDictionary integerDictionary. - map := Dictionary new. byteArrayMap := ByteArray new: 256! From commits at source.squeak.org Mon Aug 17 20:21:57 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Aug 17 20:21:58 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.942.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.942.mcz ==================== Summary ==================== Name: Kernel-ul.942 Author: ul Time: 17 August 2015, 10:10:26.712 pm UUID: 79a558ac-3366-4483-9ddf-04d9b02fb589 Ancestors: Kernel-ul.941 - use #becomeForward: instead of #become: where possible =============== Diff against Kernel-ul.941 =============== Item was changed: ----- Method: CompiledMethod>>putSource:fromParseNode:inFile:withPreamble: (in category 'source code management') ----- putSource: sourceStr fromParseNode: methodNode inFile: fileIndex withPreamble: preambleBlock "Store the source code for the receiver on an external file. If no sources are available, i.e., SourceFile is nil, then store temp names for decompilation at the end of the method. If the fileIndex is 1, print on *.sources; if it is 2, print on *.changes, in each case, storing a 4-byte source code pointer at the method end." | file remoteString | (SourceFiles == nil or: [(file := SourceFiles at: fileIndex) == nil]) ifTrue: + [^self becomeForward: (self copyWithTempsFromMethodNode: methodNode)]. - [^self become: (self copyWithTempsFromMethodNode: methodNode)]. Smalltalk assureStartupStampLogged. file setToEnd. preambleBlock value: file. "Write the preamble" remoteString := RemoteString newString: sourceStr onFileNumber: fileIndex toFile: file. file nextChunkPut: ' '. InMidstOfFileinNotification signal ifFalse: [file flush]. self checkOKToAdd: sourceStr size at: remoteString position. self setSourcePosition: remoteString position inFile: fileIndex! Item was changed: ----- Method: MethodDictionary>>grow (in category 'private') ----- grow | newSelf | newSelf := self species newForCapacity: self basicSize * 2. 1 to: self basicSize do: [ :i | (self basicAt: i) ifNotNil: [ :key | newSelf at: key put: (array at: i) ] ]. + self becomeForward: newSelf! - self become: newSelf! From leves at elte.hu Mon Aug 17 20:25:10 2015 From: leves at elte.hu (Levente Uzonyi) Date: Mon Aug 17 20:25:15 2015 Subject: [squeak-dev] The Trunk: Collections-ul.640.mcz In-Reply-To: References: <55ce4eda.41ea8c0a.3bde6.ffffc2cdSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Thanks Nicolas. It's fixed in Collections-ul.642. Levente On Sat, 15 Aug 2015, Nicolas Cellier wrote: > > I guess you forgot to use your fresh integerValue here in the and block ;) --^ > ? From commits at source.squeak.org Mon Aug 17 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Aug 17 21:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150817215502.11338.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-August/008861.html Name: Regex-Core-ul.38 Ancestors: Regex-Core-ul.37 - further optimizations ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008862.html Name: Regex-Core-ul.39 Ancestors: Regex-Core-ul.38 - fix: use #injecto:into: instead of #detectMax: in RxsCharSet>>enumerableSetIgnoringCase:, because the latter returns the object instead of the maximum. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008863.html Name: Collections-ul.642 Ancestors: Collections-ul.641 - Character >> #shouldBePrintedAsLiteral uses the local variable holding the integer value of the character. Also added quick returns. WideCharacterSet - faster #includes: - use #integerDictionary for map ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008864.html Name: Kernel-ul.942 Ancestors: Kernel-ul.941 - use #becomeForward: instead of #become: where possible ============================================= From goran at krampe.se Tue Aug 18 08:35:33 2015 From: goran at krampe.se (=?UTF-8?B?R8O2cmFuIEtyYW1wZQ==?=) Date: Tue Aug 18 08:35:37 2015 Subject: [squeak-dev] SqueakNim - an FFI glue code tool Message-ID: <55D2EE55.1040304@krampe.se> Hi fellow Smalltalkers! At 3DICC we are using Nim (http://nim-lang.org) to write our performance critical code that typically otherwise would have been written in C/C++. But now we have Nim :) Nim can generate dlls/so libraries following C conventions so they can easily be called via FFI. Andreas Rumpf (author of Nim who works with us) wrote a small utility called SqueakNim - its a set of Nim macros that generates the .st primitive calls based on the Nim code, so it takes out some grunt work and matches up types as far as it can. Simple, but very nice. The docs etc are a bit unpolished, but the trivial example in "tests" has comments in it and it works in Squeak 5, Pharo 3, Pharo 4 and I guess in most versions of Squeak/Pharo. Why would you be interested? - Nim is great fun! C/C++ is torture. Same performance, nuff said. - Nim has a tool called c2nim that wraps C *and* C++ libraries. That last part is a killer. We use c2nim to wrap Urho3D - a huge C++ game engine, works great, and that wrapper is also open source btw, Urhonimo. How do I use it? See README at: https://gitlab.3dicc.com/3dicc/squeaknim For some more information my article (predating this tool) might have some details: http://goran.krampe.se/2014/11/03/squeak-to-nim ...and if you want to ask questions, hop onto freenode on either #squeak, #pharo or #nim. Me and Andreas are around. regards, G?ran From Das.Linux at gmx.de Tue Aug 18 09:00:16 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Aug 18 09:00:20 2015 Subject: [squeak-dev] SqueakNim - an FFI glue code tool In-Reply-To: <55D2EE55.1040304@krampe.se> References: <55D2EE55.1040304@krampe.se> Message-ID: <51CC6AAD-A246-49B1-B59C-FC7ABE180A0D@gmx.de> Hi G?ran On 18.08.2015, at 10:35, G?ran Krampe wrote: > Hi fellow Smalltalkers! > > At 3DICC we are using Nim (http://nim-lang.org) to write our performance critical code that typically otherwise would have been written in C/C++. But now we have Nim :) > > Nim can generate dlls/so libraries following C conventions so they can easily be called via FFI. > > Andreas Rumpf (author of Nim who works with us) wrote a small utility called SqueakNim - its a set of Nim macros that generates the .st primitive calls based on the Nim code, so it takes out some grunt work and matches up types as far as it can. Simple, but very nice. > > The docs etc are a bit unpolished, but the trivial example in "tests" has comments in it and it works in Squeak 5, Pharo 3, Pharo 4 and I guess in most versions of Squeak/Pharo. > > Why would you be interested? > > - Nim is great fun! C/C++ is torture. Same performance, nuff said. > - Nim has a tool called c2nim that wraps C *and* C++ libraries. > > That last part is a killer. We use c2nim to wrap Urho3D - a huge C++ game engine, works great, and that wrapper is also open source btw, Urhonimo. > > How do I use it? See README at: > > https://gitlab.3dicc.com/3dicc/squeaknim > > For some more information my article (predating this tool) might have some details: > > http://goran.krampe.se/2014/11/03/squeak-to-nim > > ...and if you want to ask questions, hop onto freenode on either #squeak, #pharo or #nim. Me and Andreas are around. Thanks for that tool. I'll sure have a look at it! Best regards -Tobias From Das.Linux at gmx.de Tue Aug 18 14:45:06 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Aug 18 14:45:10 2015 Subject: [squeak-dev] Mini-poll: Who uses Installer package-definitions? Message-ID: Hi, I again came across the 'package-definition'-part of Installer and now I'm just curious, who uses these? here's a Poll: http://vote.pollcode.com/84673616 Best regards -Tobias From ron at usmedrec.com Tue Aug 18 15:23:45 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Tue Aug 18 15:24:20 2015 Subject: [squeak-dev] SqueakNim - an FFI glue code tool In-Reply-To: <55D2EE55.1040304@krampe.se> References: <55D2EE55.1040304@krampe.se> Message-ID: <005101d0d9c9$e05ed6b0$a11c8410$@usmedrec.com> Hi All, Quick question. I would normally take a message like this and announce it on news.squeak.org and other places. Since this release comes from 3D ICC I wanted to see first if anyone sees a conflict between my role as news team guy and my real job. Would anyone object to my adding this announcement to news.squeak.org? Thanks! All the best, Ron Teitelbaum Head Of Engineering 3D Immersive Collaboration Consulting ron@3Dicc.com Follow Me On Twitter: @RonTeitelbaum www.3Dicc.com https://www.google.com/+3Dicc > -----Original Message----- > From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- > bounces@lists.squeakfoundation.org] On Behalf Of G?ran Krampe > Sent: Tuesday, August 18, 2015 4:36 AM > To: The general-purpose Squeak developers list; Pharo Development > Subject: [squeak-dev] SqueakNim - an FFI glue code tool > > Hi fellow Smalltalkers! > > At 3DICC we are using Nim (http://nim-lang.org) to write our performance > critical code that typically otherwise would have been written in C/C++. > But now we have Nim :) > > Nim can generate dlls/so libraries following C conventions so they can easily > be called via FFI. > > Andreas Rumpf (author of Nim who works with us) wrote a small utility > called SqueakNim - its a set of Nim macros that generates the .st primitive > calls based on the Nim code, so it takes out some grunt work and matches > up types as far as it can. Simple, but very nice. > > The docs etc are a bit unpolished, but the trivial example in "tests" > has comments in it and it works in Squeak 5, Pharo 3, Pharo 4 and I guess in > most versions of Squeak/Pharo. > > Why would you be interested? > > - Nim is great fun! C/C++ is torture. Same performance, nuff said. > - Nim has a tool called c2nim that wraps C *and* C++ libraries. > > That last part is a killer. We use c2nim to wrap Urho3D - a huge C++ game > engine, works great, and that wrapper is also open source btw, Urhonimo. > > How do I use it? See README at: > > https://gitlab.3dicc.com/3dicc/squeaknim > > For some more information my article (predating this tool) might have some > details: > > http://goran.krampe.se/2014/11/03/squeak-to-nim > > ...and if you want to ask questions, hop onto freenode on either #squeak, > #pharo or #nim. Me and Andreas are around. > > regards, G?ran From lewis at mail.msen.com Tue Aug 18 16:11:00 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Aug 18 16:11:03 2015 Subject: [squeak-dev] SqueakNim - an FFI glue code tool In-Reply-To: <005101d0d9c9$e05ed6b0$a11c8410$@usmedrec.com> References: <55D2EE55.1040304@krampe.se> <005101d0d9c9$e05ed6b0$a11c8410$@usmedrec.com> Message-ID: <21043.136.2.1.105.1439914260.squirrel@webmail.msen.com> +1 to adding it to the Squeak news. (and thank you for asking) Dave > Hi All, > > Quick question. I would normally take a message like this and announce it > on news.squeak.org and other places. Since this release comes from 3D ICC > I wanted to see first if anyone sees a conflict between my role as news > team guy and my real job. Would anyone object to my adding this > announcement to news.squeak.org? > > Thanks! > > All the best, > > Ron Teitelbaum > Head Of Engineering > 3D Immersive Collaboration Consulting > ron@3Dicc.com > Follow Me On Twitter: @RonTeitelbaum > www.3Dicc.com > https://www.google.com/+3Dicc > > > >> -----Original Message----- >> From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- >> bounces@lists.squeakfoundation.org] On Behalf Of G??ran Krampe >> Sent: Tuesday, August 18, 2015 4:36 AM >> To: The general-purpose Squeak developers list; Pharo Development >> Subject: [squeak-dev] SqueakNim - an FFI glue code tool >> >> Hi fellow Smalltalkers! >> >> At 3DICC we are using Nim (http://nim-lang.org) to write our performance >> critical code that typically otherwise would have been written in C/C++. >> But now we have Nim :) >> >> Nim can generate dlls/so libraries following C conventions so they can >> easily >> be called via FFI. >> >> Andreas Rumpf (author of Nim who works with us) wrote a small utility >> called SqueakNim - its a set of Nim macros that generates the .st >> primitive >> calls based on the Nim code, so it takes out some grunt work and matches >> up types as far as it can. Simple, but very nice. >> >> The docs etc are a bit unpolished, but the trivial example in "tests" >> has comments in it and it works in Squeak 5, Pharo 3, Pharo 4 and I >> guess in >> most versions of Squeak/Pharo. >> >> Why would you be interested? >> >> - Nim is great fun! C/C++ is torture. Same performance, nuff said. >> - Nim has a tool called c2nim that wraps C *and* C++ libraries. >> >> That last part is a killer. We use c2nim to wrap Urho3D - a huge C++ >> game >> engine, works great, and that wrapper is also open source btw, Urhonimo. >> >> How do I use it? See README at: >> >> https://gitlab.3dicc.com/3dicc/squeaknim >> >> For some more information my article (predating this tool) might have >> some >> details: >> >> http://goran.krampe.se/2014/11/03/squeak-to-nim >> >> ...and if you want to ask questions, hop onto freenode on either >> #squeak, >> #pharo or #nim. Me and Andreas are around. >> >> regards, G??ran > > > From btc at openinworld.com Tue Aug 18 16:43:28 2015 From: btc at openinworld.com (Ben Coman) Date: Tue Aug 18 16:43:51 2015 Subject: [squeak-dev] Re: [Pharo-dev] SqueakNim - an FFI glue code tool In-Reply-To: <55D31D19.2030308@krampe.se> References: <55D31D19.2030308@krampe.se> Message-ID: Sounds interesting. Thanks for the notice. cheers -ben On Tue, Aug 18, 2015 at 7:55 PM, G?ran Krampe wrote: > (resend) > Hi fellow Smalltalkers! > > At 3DICC we are using Nim (http://nim-lang.org) to write our performance > critical code that typically otherwise would have been written in C/C++. But > now we have Nim :) > > Nim can generate dlls/so libraries following C conventions so they can > easily be called via FFI. > > Andreas Rumpf (author of Nim who works with us) wrote a small utility called > SqueakNim - its a set of Nim macros that generates the .st primitive calls > based on the Nim code, so it takes out some grunt work and matches up types > as far as it can. Simple, but very nice. > > The docs etc are a bit unpolished, but the trivial example in "tests" has > comments in it and it works in Squeak 5, Pharo 3, Pharo 4 and I guess in > most versions of Squeak/Pharo. > > Why would you be interested? > > - Nim is great fun! C/C++ is torture. Same performance, nuff said. > - Nim has a tool called c2nim that wraps C *and* C++ libraries. > > That last part is a killer. We use c2nim to wrap Urho3D - a huge C++ game > engine, works great, and that wrapper is also open source btw, Urhonimo. > > How do I use it? See README at: > > https://gitlab.3dicc.com/3dicc/squeaknim > > For some more information my article (predating this tool) might have some > details: > > http://goran.krampe.se/2014/11/03/squeak-to-nim > > ...and if you want to ask questions, hop onto freenode on either #squeak, > #pharo or #nim. Me and Andreas are around. > > regards, G?ran > > From tim at rowledge.org Tue Aug 18 16:50:51 2015 From: tim at rowledge.org (tim Rowledge) Date: Tue Aug 18 16:50:59 2015 Subject: [squeak-dev] SqueakNim - an FFI glue code tool In-Reply-To: <005101d0d9c9$e05ed6b0$a11c8410$@usmedrec.com> References: <55D2EE55.1040304@krampe.se> <005101d0d9c9$e05ed6b0$a11c8410$@usmedrec.com> Message-ID: <9BCC5241-7E7D-4AD0-AC1F-F5F0601CB34F@rowledge.org> On 18-08-2015, at 8:23 AM, Ron Teitelbaum wrote: > Hi All, > > Quick question. I would normally take a message like this and announce it on news.squeak.org and other places. Since this release comes from 3D ICC I wanted to see first if anyone sees a conflict between my role as news team guy and my real job. Would anyone object to my adding this announcement to news.squeak.org? Good grief no; this is exactly the kind of thing I hope to see out there! tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: OI: Vey From asqueaker at gmail.com Tue Aug 18 16:53:38 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Aug 18 16:53:40 2015 Subject: [squeak-dev] SqueakNim - an FFI glue code tool In-Reply-To: <005101d0d9c9$e05ed6b0$a11c8410$@usmedrec.com> References: <55D2EE55.1040304@krampe.se> <005101d0d9c9$e05ed6b0$a11c8410$@usmedrec.com> Message-ID: What about Magma 1.5? I think it is very relevant to Squeak. News it too? On Tue, Aug 18, 2015 at 10:23 AM, Ron Teitelbaum wrote: > Hi All, > > Quick question. I would normally take a message like this and announce it on news.squeak.org and other places. Since this release comes from 3D ICC I wanted to see first if anyone sees a conflict between my role as news team guy and my real job. Would anyone object to my adding this announcement to news.squeak.org? > > Thanks! > > All the best, > > Ron Teitelbaum > Head Of Engineering > 3D Immersive Collaboration Consulting > ron@3Dicc.com > Follow Me On Twitter: @RonTeitelbaum > www.3Dicc.com > https://www.google.com/+3Dicc > > > >> -----Original Message----- >> From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- >> bounces@lists.squeakfoundation.org] On Behalf Of G?ran Krampe >> Sent: Tuesday, August 18, 2015 4:36 AM >> To: The general-purpose Squeak developers list; Pharo Development >> Subject: [squeak-dev] SqueakNim - an FFI glue code tool >> >> Hi fellow Smalltalkers! >> >> At 3DICC we are using Nim (http://nim-lang.org) to write our performance >> critical code that typically otherwise would have been written in C/C++. >> But now we have Nim :) >> >> Nim can generate dlls/so libraries following C conventions so they can easily >> be called via FFI. >> >> Andreas Rumpf (author of Nim who works with us) wrote a small utility >> called SqueakNim - its a set of Nim macros that generates the .st primitive >> calls based on the Nim code, so it takes out some grunt work and matches >> up types as far as it can. Simple, but very nice. >> >> The docs etc are a bit unpolished, but the trivial example in "tests" >> has comments in it and it works in Squeak 5, Pharo 3, Pharo 4 and I guess in >> most versions of Squeak/Pharo. >> >> Why would you be interested? >> >> - Nim is great fun! C/C++ is torture. Same performance, nuff said. >> - Nim has a tool called c2nim that wraps C *and* C++ libraries. >> >> That last part is a killer. We use c2nim to wrap Urho3D - a huge C++ game >> engine, works great, and that wrapper is also open source btw, Urhonimo. >> >> How do I use it? See README at: >> >> https://gitlab.3dicc.com/3dicc/squeaknim >> >> For some more information my article (predating this tool) might have some >> details: >> >> http://goran.krampe.se/2014/11/03/squeak-to-nim >> >> ...and if you want to ask questions, hop onto freenode on either #squeak, >> #pharo or #nim. Me and Andreas are around. >> >> regards, G?ran > > > From lewis at mail.msen.com Tue Aug 18 17:00:26 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Aug 18 17:00:29 2015 Subject: [squeak-dev] SqueakNim - an FFI glue code tool In-Reply-To: References: <55D2EE55.1040304@krampe.se> <005101d0d9c9$e05ed6b0$a11c8410$@usmedrec.com> Message-ID: <33664.136.2.1.105.1439917226.squirrel@webmail.msen.com> +1 !!!! Dave > What about Magma 1.5? I think it is very relevant to Squeak. News it > too? > > On Tue, Aug 18, 2015 at 10:23 AM, Ron Teitelbaum wrote: >> Hi All, >> >> Quick question. I would normally take a message like this and announce >> it on news.squeak.org and other places. Since this release comes from >> 3D ICC I wanted to see first if anyone sees a conflict between my role >> as news team guy and my real job. Would anyone object to my adding this >> announcement to news.squeak.org? >> >> Thanks! >> >> All the best, >> >> Ron Teitelbaum >> Head Of Engineering >> 3D Immersive Collaboration Consulting >> ron@3Dicc.com >> Follow Me On Twitter: @RonTeitelbaum >> www.3Dicc.com >> https://www.google.com/+3Dicc >> >> >> >>> -----Original Message----- >>> From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- >>> bounces@lists.squeakfoundation.org] On Behalf Of G??ran Krampe >>> Sent: Tuesday, August 18, 2015 4:36 AM >>> To: The general-purpose Squeak developers list; Pharo Development >>> Subject: [squeak-dev] SqueakNim - an FFI glue code tool >>> >>> Hi fellow Smalltalkers! >>> >>> At 3DICC we are using Nim (http://nim-lang.org) to write our >>> performance >>> critical code that typically otherwise would have been written in >>> C/C++. >>> But now we have Nim :) >>> >>> Nim can generate dlls/so libraries following C conventions so they can >>> easily >>> be called via FFI. >>> >>> Andreas Rumpf (author of Nim who works with us) wrote a small utility >>> called SqueakNim - its a set of Nim macros that generates the .st >>> primitive >>> calls based on the Nim code, so it takes out some grunt work and >>> matches >>> up types as far as it can. Simple, but very nice. >>> >>> The docs etc are a bit unpolished, but the trivial example in "tests" >>> has comments in it and it works in Squeak 5, Pharo 3, Pharo 4 and I >>> guess in >>> most versions of Squeak/Pharo. >>> >>> Why would you be interested? >>> >>> - Nim is great fun! C/C++ is torture. Same performance, nuff said. >>> - Nim has a tool called c2nim that wraps C *and* C++ libraries. >>> >>> That last part is a killer. We use c2nim to wrap Urho3D - a huge C++ >>> game >>> engine, works great, and that wrapper is also open source btw, >>> Urhonimo. >>> >>> How do I use it? See README at: >>> >>> https://gitlab.3dicc.com/3dicc/squeaknim >>> >>> For some more information my article (predating this tool) might have >>> some >>> details: >>> >>> http://goran.krampe.se/2014/11/03/squeak-to-nim >>> >>> ...and if you want to ask questions, hop onto freenode on either >>> #squeak, >>> #pharo or #nim. Me and Andreas are around. >>> >>> regards, G??ran >> >> >> > From goran at krampe.se Tue Aug 18 17:16:29 2015 From: goran at krampe.se (=?UTF-8?B?R8O2cmFuIEtyYW1wZQ==?=) Date: Tue Aug 18 17:16:34 2015 Subject: [squeak-dev] SqueakNim - an FFI glue code tool In-Reply-To: References: <55D2EE55.1040304@krampe.se> <005101d0d9c9$e05ed6b0$a11c8410$@usmedrec.com> Message-ID: <55D3686D.4010308@krampe.se> Hi all! On 08/18/2015 06:53 PM, Chris Muller wrote: > What about Magma 1.5? I think it is very relevant to Squeak. News it too? For sure! Its generally better if you bug Ron with items for him to put up because he is working like a dog right now so hardly any "periscope up" time at all. regards, G?ran From ron at usmedrec.com Tue Aug 18 17:35:46 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Tue Aug 18 17:36:20 2015 Subject: [squeak-dev] SqueakNim - an FFI glue code tool In-Reply-To: References: <55D2EE55.1040304@krampe.se> <005101d0d9c9$e05ed6b0$a11c8410$@usmedrec.com> Message-ID: <009801d0d9dc$51cf0a60$f56d1f20$@usmedrec.com> Hi Chris, Sorry I missed it! Here ya go! http://news.squeak.org/2015/08/18/magma-1-5-for-squeak-5-ships/ If anyone else has suggestions for posts, please feel free to ping me. Last ping I got was from Bert. Also if anyone would like to volunteer for the news team and write articles we can always use help! All the best, Ron Teitelbaum Head Of Engineering 3D Immersive Collaboration Consulting ron@3Dicc.com Follow Me On Twitter: @RonTeitelbaum www.3Dicc.com https://www.google.com/+3Dicc > -----Original Message----- > From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- > bounces@lists.squeakfoundation.org] On Behalf Of Chris Muller > Sent: Tuesday, August 18, 2015 12:54 PM > To: The general-purpose Squeak developers list > Cc: Pharo Development > Subject: Re: [squeak-dev] SqueakNim - an FFI glue code tool > > What about Magma 1.5? I think it is very relevant to Squeak. News it too? > > On Tue, Aug 18, 2015 at 10:23 AM, Ron Teitelbaum > wrote: > > Hi All, > > > > Quick question. I would normally take a message like this and announce it > on news.squeak.org and other places. Since this release comes from 3D ICC I > wanted to see first if anyone sees a conflict between my role as news team > guy and my real job. Would anyone object to my adding this announcement > to news.squeak.org? > > > > Thanks! > > > > All the best, > > > > Ron Teitelbaum > > Head Of Engineering > > 3D Immersive Collaboration Consulting > > ron@3Dicc.com > > Follow Me On Twitter: @RonTeitelbaum > > www.3Dicc.com > > https://www.google.com/+3Dicc > > > > > > > >> -----Original Message----- > >> From: squeak-dev-bounces@lists.squeakfoundation.org > >> [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf Of > >> G?ran Krampe > >> Sent: Tuesday, August 18, 2015 4:36 AM > >> To: The general-purpose Squeak developers list; Pharo Development > >> Subject: [squeak-dev] SqueakNim - an FFI glue code tool > >> > >> Hi fellow Smalltalkers! > >> > >> At 3DICC we are using Nim (http://nim-lang.org) to write our > >> performance critical code that typically otherwise would have been > written in C/C++. > >> But now we have Nim :) > >> > >> Nim can generate dlls/so libraries following C conventions so they > >> can easily be called via FFI. > >> > >> Andreas Rumpf (author of Nim who works with us) wrote a small utility > >> called SqueakNim - its a set of Nim macros that generates the .st > >> primitive calls based on the Nim code, so it takes out some grunt > >> work and matches up types as far as it can. Simple, but very nice. > >> > >> The docs etc are a bit unpolished, but the trivial example in "tests" > >> has comments in it and it works in Squeak 5, Pharo 3, Pharo 4 and I > >> guess in most versions of Squeak/Pharo. > >> > >> Why would you be interested? > >> > >> - Nim is great fun! C/C++ is torture. Same performance, nuff said. > >> - Nim has a tool called c2nim that wraps C *and* C++ libraries. > >> > >> That last part is a killer. We use c2nim to wrap Urho3D - a huge C++ > >> game engine, works great, and that wrapper is also open source btw, > Urhonimo. > >> > >> How do I use it? See README at: > >> > >> https://gitlab.3dicc.com/3dicc/squeaknim > >> > >> For some more information my article (predating this tool) might have > >> some > >> details: > >> > >> http://goran.krampe.se/2014/11/03/squeak-to-nim > >> > >> ...and if you want to ask questions, hop onto freenode on either > >> #squeak, #pharo or #nim. Me and Andreas are around. > >> > >> regards, G?ran > > > > > > From ma.chris.m at gmail.com Tue Aug 18 17:48:33 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Tue Aug 18 17:49:16 2015 Subject: [squeak-dev] SqueakNim - an FFI glue code tool In-Reply-To: <009801d0d9dc$51cf0a60$f56d1f20$@usmedrec.com> References: <55D2EE55.1040304@krampe.se> <005101d0d9c9$e05ed6b0$a11c8410$@usmedrec.com> <009801d0d9dc$51cf0a60$f56d1f20$@usmedrec.com> Message-ID: Thanks Ron! On Tue, Aug 18, 2015 at 12:35 PM, Ron Teitelbaum wrote: > Hi Chris, > > Sorry I missed it! Here ya go! > > http://news.squeak.org/2015/08/18/magma-1-5-for-squeak-5-ships/ > > If anyone else has suggestions for posts, please feel free to ping me. > > Last ping I got was from Bert. Also if anyone would like to volunteer for the news team and write articles we can always use help! > > All the best, > > Ron Teitelbaum > Head Of Engineering > 3D Immersive Collaboration Consulting > ron@3Dicc.com > Follow Me On Twitter: @RonTeitelbaum > www.3Dicc.com > https://www.google.com/+3Dicc > > > > >> -----Original Message----- >> From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- >> bounces@lists.squeakfoundation.org] On Behalf Of Chris Muller >> Sent: Tuesday, August 18, 2015 12:54 PM >> To: The general-purpose Squeak developers list >> Cc: Pharo Development >> Subject: Re: [squeak-dev] SqueakNim - an FFI glue code tool >> >> What about Magma 1.5? I think it is very relevant to Squeak. News it too? >> >> On Tue, Aug 18, 2015 at 10:23 AM, Ron Teitelbaum >> wrote: >> > Hi All, >> > >> > Quick question. I would normally take a message like this and announce it >> on news.squeak.org and other places. Since this release comes from 3D ICC I >> wanted to see first if anyone sees a conflict between my role as news team >> guy and my real job. Would anyone object to my adding this announcement >> to news.squeak.org? >> > >> > Thanks! >> > >> > All the best, >> > >> > Ron Teitelbaum >> > Head Of Engineering >> > 3D Immersive Collaboration Consulting >> > ron@3Dicc.com >> > Follow Me On Twitter: @RonTeitelbaum >> > www.3Dicc.com >> > https://www.google.com/+3Dicc >> > >> > >> > >> >> -----Original Message----- >> >> From: squeak-dev-bounces@lists.squeakfoundation.org >> >> [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf Of >> >> G?ran Krampe >> >> Sent: Tuesday, August 18, 2015 4:36 AM >> >> To: The general-purpose Squeak developers list; Pharo Development >> >> Subject: [squeak-dev] SqueakNim - an FFI glue code tool >> >> >> >> Hi fellow Smalltalkers! >> >> >> >> At 3DICC we are using Nim (http://nim-lang.org) to write our >> >> performance critical code that typically otherwise would have been >> written in C/C++. >> >> But now we have Nim :) >> >> >> >> Nim can generate dlls/so libraries following C conventions so they >> >> can easily be called via FFI. >> >> >> >> Andreas Rumpf (author of Nim who works with us) wrote a small utility >> >> called SqueakNim - its a set of Nim macros that generates the .st >> >> primitive calls based on the Nim code, so it takes out some grunt >> >> work and matches up types as far as it can. Simple, but very nice. >> >> >> >> The docs etc are a bit unpolished, but the trivial example in "tests" >> >> has comments in it and it works in Squeak 5, Pharo 3, Pharo 4 and I >> >> guess in most versions of Squeak/Pharo. >> >> >> >> Why would you be interested? >> >> >> >> - Nim is great fun! C/C++ is torture. Same performance, nuff said. >> >> - Nim has a tool called c2nim that wraps C *and* C++ libraries. >> >> >> >> That last part is a killer. We use c2nim to wrap Urho3D - a huge C++ >> >> game engine, works great, and that wrapper is also open source btw, >> Urhonimo. >> >> >> >> How do I use it? See README at: >> >> >> >> https://gitlab.3dicc.com/3dicc/squeaknim >> >> >> >> For some more information my article (predating this tool) might have >> >> some >> >> details: >> >> >> >> http://goran.krampe.se/2014/11/03/squeak-to-nim >> >> >> >> ...and if you want to ask questions, hop onto freenode on either >> >> #squeak, #pharo or #nim. Me and Andreas are around. >> >> >> >> regards, G?ran >> > >> > >> > > > From avalloud at smalltalk.comcastbiz.net Wed Aug 19 00:55:15 2015 From: avalloud at smalltalk.comcastbiz.net (Andres Valloud) Date: Wed Aug 19 00:56:28 2015 Subject: [squeak-dev] [Smalltalks 2015] --- Invitation Message-ID: <55D3D3F3.4040205@smalltalk.comcastbiz.net> The Fundaci?n Argentina de Smalltalk proudly invites you to one of the premier Smalltalk conferences in the world. Let's meet at Buenos Aires, November 11-13! For more details, see the invitation here: http://www.fast.org.ar/Smalltalks2015-invitation.pdf From Das.Linux at gmx.de Wed Aug 19 12:03:34 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Aug 19 12:03:37 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: <1439679369.9270.2@mglap> References: <1439679369.9270.2@mglap> Message-ID: <161882DC-F291-4B33-9DD7-D59965C1E1D8@gmx.de> Hi Mateusz On 16.08.2015, at 00:56, Mateusz Grotek wrote: > Hi, > First of all thank you for the new version of Squeak. It's really great. > > Special thanks for Tobias and Marcel for the font import tool! It works perfectly. > > Nevertheless I have noticed that there is a regression in Squeak 4.6/5.0 in the font handling. It's not possible anymore to use non-english characters even after loading a font that contains them (I've changed the code font and tried to use the characters in a workspace). Can anyone verify? It is somewhat strange, I imported Arial Unicode (the whole stuff) and, yes some characters did not show up, but others (such as ?) did. I don't know yet _where_ the problem is. Although I've written the importer, I still lack some knowledge to debug this behavior. Best regards -Tobias From leves at elte.hu Wed Aug 19 15:34:42 2015 From: leves at elte.hu (Levente Uzonyi) Date: Wed Aug 19 15:34:46 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: <161882DC-F291-4B33-9DD7-D59965C1E1D8@gmx.de> References: <1439679369.9270.2@mglap> <161882DC-F291-4B33-9DD7-D59965C1E1D8@gmx.de> Message-ID: I see the following issues here (latest Trunk image): 1. Glyphs for non-ascii (asciiValue >= 256) characters are shown as a black rectangle. 2. FontImporterTool doesn't see fonts in the subdirectories of the base font directory. Because of this, there's only one font on the list for me. 3. FontImporterTool doesn't use the selected font in the preview panel. Levente On Wed, 19 Aug 2015, Tobias Pape wrote: > Hi Mateusz > > On 16.08.2015, at 00:56, Mateusz Grotek wrote: > >> Hi, >> First of all thank you for the new version of Squeak. It's really great. >> >> Special thanks for Tobias and Marcel for the font import tool! It works perfectly. >> >> Nevertheless I have noticed that there is a regression in Squeak 4.6/5.0 in the font handling. It's not possible anymore to use non-english characters even after loading a font that contains them (I've changed the code font and tried to use the characters in a workspace). Can anyone verify? > > It is somewhat strange, > I imported Arial Unicode (the whole stuff) and, yes some characters did not show up, > but others (such as ?) did. I don't know yet _where_ the problem is. Although > I've written the importer, I still lack some knowledge to debug this behavior. > > Best regards > -Tobias > From lewis at mail.msen.com Wed Aug 19 16:56:22 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Aug 19 16:56:27 2015 Subject: [squeak-dev] Re: [Cuis] Updates: Smart underscores & BouncingAtomsMorph performance In-Reply-To: <55D47BBA.3060805@jvuletich.org> References: <55D0A754.2070602@jvuletich.org> <55D24C6D.6090500@jvuletich.org> <47674.136.2.1.105.1439847296.squirrel@webmail.msen.com> <55D47BBA.3060805@jvuletich.org> Message-ID: <37162.136.2.1.102.1440003382.squirrel@webmail.msen.com> Juan, I hope you don't mind if I CC squeak-dev. > On 8/17/2015 6:34 PM, David T. Lewis wrote: >>> >>> I'm a bit surprised nobody commented on the attach. I'm quite happy >>> about not having to give up our traditional assignment symbol, and at >>> the same time, handle and display correctly underscores in names. These >>> are sometimes useful when dealing with external code and stuff. I won't >>> deny it, I'm also a bit proud of the idea to make it possible. Looking >>> at the screenshot, doesn't it make you think "how the hell did he do >>> it?" >>> ? >> Well, that's what *I* was wondering. So how did you do that??? >> >> :-) >> >> Dave >> > > Well, the first idea was that it given that a StrikeFont can already > swap glyphs (#useUnderscores, #useLeftArrow), then it is possible to > build cheap derivative fonts that do that, and TextStyles for them. > Then, Shout parses code and sets TextEmphasis like italics or colors for > differenc code elements. I just made it set a TextEmphasis with > underscores for identifiers. > > It is so simple that I find it surprising that nobody (including me) > thought about this years ago! > > Cheers, > Juan Vuletich > What a great idea! Dave From cunningham.cb at gmail.com Wed Aug 19 16:58:17 2015 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Wed Aug 19 16:58:21 2015 Subject: [squeak-dev] Why do the Class Variables get sorted alphabetically? Message-ID: I create a class with variables: Object subclass: #ClassOrderExample instanceVariableNames: 'a d e c b' classVariableNames: 'A D E C B' poolDictionaries: '' category: 'Example' (in that order, because that is the right order). As soon as I save the class: Object subclass: #ClassOrderExample instanceVariableNames: 'a d e c b' classVariableNames: 'A B C D E' poolDictionaries: '' category: 'Example' Why? Note that the instance variables aren't sorted. (using 5.0 - not sure if that is relevant or not) -cbc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150819/14b06b21/attachment-0001.htm From hmm at heeg.de Wed Aug 19 17:23:05 2015 From: hmm at heeg.de (Hans-Martin Mosner) Date: Wed Aug 19 17:23:10 2015 Subject: [squeak-dev] Why do the Class Variables get sorted alphabetically? In-Reply-To: References: Message-ID: <55D4BB79.8080404@heeg.de> Am 19.08.2015 um 18:58 schrieb Chris Cunningham: > I create a class with variables: > > Object subclass: #ClassOrderExample > instanceVariableNames: 'a d e c b' > classVariableNames: 'A D E C B' > poolDictionaries: '' > category: 'Example' > (in that order, because that is the right order). > > As soon as I save the class: > > Object subclass: #ClassOrderExample > instanceVariableNames: 'a d e c b' > classVariableNames: 'A B C D E' > poolDictionaries: '' > category: 'Example' > > Why? > > Note that the instance variables aren't sorted. > > (using 5.0 - not sure if that is relevant or not) > > -cbc > > instance variables are ordered (their order determines their inst var slot index, so Smalltalk can't just shuffle them around). Class variables are keys in a Dictionary, so essentially unordered. To make it easier for users to find a given class variable in the definition, Smalltalk sorts them alphabetically (otherwise the order could change inexplicably when the Dictionary would be rehashed after a new one is inserted.) Cheers, Hans-Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150819/4f671f99/attachment.htm From cunningham.cb at gmail.com Wed Aug 19 20:06:48 2015 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Wed Aug 19 20:06:51 2015 Subject: [squeak-dev] Questionable comment Message-ID: well, not questionable - bad. (in ByteArray) long64At: index "Answer a 64-bit integer in Smalltalk order (little-endian)." | n1 n2 | n1 := self unsignedLongAt: index bigEndian: true. n2 := self unsignedLongAt: index+4 bigEndian: true. These are obviously bigEndian now, nto litte-endian. Does this mean Smalltalk order (or now Squeak order) has changed? -cbc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150819/da3daed4/attachment.htm From eliot.miranda at gmail.com Wed Aug 19 20:47:48 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Aug 19 20:47:51 2015 Subject: [squeak-dev] Why do the Class Variables get sorted alphabetically? In-Reply-To: <55D4BB79.8080404@heeg.de> References: <55D4BB79.8080404@heeg.de> Message-ID: Hi HM On Wed, Aug 19, 2015 at 10:23 AM, Hans-Martin Mosner wrote: > Am 19.08.2015 um 18:58 schrieb Chris Cunningham: > > I create a class with variables: > > Object subclass: #ClassOrderExample > instanceVariableNames: 'a d e c b' > classVariableNames: 'A D E C B' > poolDictionaries: '' > category: 'Example' > (in that order, because that is the right order). > > As soon as I save the class: > > Object subclass: #ClassOrderExample > instanceVariableNames: 'a d e c b' > classVariableNames: 'A B C D E' > poolDictionaries: '' > category: 'Example' > > Why? > > Note that the instance variables aren't sorted. > > (using 5.0 - not sure if that is relevant or not) > > -cbc > > > instance variables are ordered (their order determines their inst var slot > index, so Smalltalk can't just shuffle them around). > Class variables are keys in a Dictionary, so essentially unordered. To > make it easier for users to find a given class variable in the definition, > Smalltalk sorts them alphabetically (otherwise the order could change > inexplicably when the Dictionary would be rehashed after a new one is > inserted.) > Also, sorting means that code comparison (e.g. on loading a package to identify changes) isn't confused by different permutations of the same set of class variables. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150819/7fdbb0f7/attachment.htm From eliot.miranda at gmail.com Wed Aug 19 21:09:32 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Aug 19 21:09:36 2015 Subject: Squeak 5 Image Segment Work [was [squeak-dev] [ANN] Squeak 5] Message-ID: Hi All, but especially Tobias, as we know, ImageSegments are broken in Spur. They work occasionally, but when stressed the VM ends up crashing. The fundamental issue is that the ImageSegment code makes assumptions about object ordering that Spur violates. For example, here's ImageSegment's install: install "This operation retrieves the segment if necessary from file storage, installs it in memory, and replaces (using become:) all the root stubs with the reconstructed roots of the segment." | newRoots | state = #onFile ifTrue: [self readFromFile]. state = #onFileWithSymbols ifTrue: [self readFromFileWithSymbols. endMarker := segment nextObject. "for enumeration of objects" endMarker == 0 ifTrue: [endMarker := 'End' clone]]. (state = #active) | (state = #imported) ifFalse: [self errorWrongState]. newRoots := self loadSegmentFrom: segment outPointers: outPointers. state = #imported ifTrue: ["just came in from exported file" arrayOfRoots := newRoots] ifFalse: [ arrayOfRoots elementsForwardIdentityTo: newRoots]. state := #inactive. Beeper beepPrimitive So before the image segment bytes (the segment inst var) is loaded, the object after it is assigned to endMarker, and if there isn't an object after segment, a new object ('End' clone) is assigned to endMarker. This makes the assumption that objects are allocated in a strict order, and therefore endMarker will always be the object after segment. Loading the segment via "newRoots := self loadSegmentFrom: segment outPointers: outPointers" then turns segment into a zero-length WordArray and its contents into the objects loaded by the segment. Therefore, in the V3 system, the objects loaded from segment can be enumerated starting at segment nextObject and repeating until endMarker is found: allObjectsDo: aBlock "Enumerate all objects that came from this segment. NOTE this assumes that the segment was created (and extracted). After the segment has been installed (install), this method allows you to enumerate its objects." | obj | endMarker == nil ifTrue: [ ^ self error: 'Just extract and install, don''t writeToFile:']. segment size ~= 1 ifTrue: [ ^ self error: 'Vestigial segment size must be 1 (version word)']. obj := segment nextObject. "Start with the next object after the vestigial header" [obj == endMarker] whileFalse: "Stop at the next object after the full segment" [aBlock value: obj. obj := obj nextObject]. "Step through the objects installed from the segment." Now, as written, this just won't work in Spur. a) the only place where there is any kind of stable order to objects is in oldSpace, so segment /has/ to be forced to old space to have any chance of its objects being in order when it gets converted from bytes to objects. b) 'End' clone will be in newSpace and so endMarker isn't reliable unless it was obtained by segment nextObject when segment was already in oldSpace. So it is perhaps possible to fix ImageSegments in Spur by forcing segment to oldSpace and being more careful with endMarker. But I think there is a better way. If the set of objects the segment contains can be obtained some how then this set can be simply enumerated, not depending on nextObject. The primitive has to answer the array of roots, so its result can't be changed to be the entire array. But segment could be becomed into an Array of all the objects in segment prior to it being loaded, in which case the above would become install "This operation retrieves the segment if necessary from file storage, installs it in memory, and replaces (using become:) all the root stubs with the reconstructed roots of the segment." | newRoots | state = #onFile ifTrue: [self readFromFile]. state = #onFileWithSymbols ifTrue: [self readFromFileWithSymbols]. (state = #active) | (state = #imported) ifFalse: [self errorWrongState]. newRoots := self loadSegmentFrom: segment outPointers: outPointers. state = #imported ifTrue: "just came in from exported file" [arrayOfRoots := newRoots] ifFalse: [arrayOfRoots elementsForwardIdentityTo: newRoots]. state := #inactive. Beeper beepPrimitive allObjectsDo: aBlock "Enumerate all objects that came from this segment. NOTE this assumes that the segment was created (and extracted). After the segment has been installed (install), this method allows you to enumerate its objects." | obj | segment isArray ifFalse: [^ self error: 'Segment hasn''t been loaded?']. segment do: aBlock and the endMarker instVar would be deleted. I am willing and ready to modify the primitive to convert the segment correctly. Who will volunteer to rewrite the image-level ImageSegment code to use the new primitive? On Wed, Aug 12, 2015 at 10:40 PM, Eliot Miranda wrote: > Hi Tobias, > > On Wed, Aug 12, 2015 at 10:18 PM, Tobias Pape wrote: > >> Hi all >> On 13.08.2015, at 02:15, Eliot Miranda wrote: >> >> > Hi Tobias, >> > >> > forget that. I found it. THis right? >> > >> > Trunk test suite for Spur >> > Using existing cogspur r.3410 >> > cp -r /var/lib/jenkins/workspace/Trunk/default/target/cogspur.r3410 >> /tmp/d20150812-28620-etbikj >> > image test suite >> > VM: /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak >> > /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak >> -version >> > /var/lib/jenkins/workspace/Trunk/default/tests.st >> > spawning command 0 with timeout 1800 seconds: >> "/tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak" >> "-vm-sound-null" "-vm-display-null" >> "/var/lib/jenkins/workspace/Trunk/default/target/SpurPostTestTrunkImage.image" >> "../tests.st" >> > (Command started with PID 28643) >> > 2015-08-12T23:31:48.17+01:00: Loading Hudson build tools... from >> /var/lib/jenkins/workspace/Trunk/default/target/HudsonBuildTools.st >> > 2015-08-12T23:31:48.388+01:00: Running tests... >> > setsockopt: Protocol not available >> > setsockopt: Protocol not available >> > 28646:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown >> protocol:s23_clnt.c:612: >> > >> > Recursive not understood error encountered >> > >> > >> > I bet this is ImageSegment related. >> >> It sure is. >> >> BitmapStreamTests>testMatrixTransform2x3WithImageSegment >> sends >> BitmapStreamTests>validateImageSegment >> > > Basically the ImageSegment code has been working in Spur on a hope and a > prayer. The code assumes objects are allocated in chronological order and > that this order is preserved, not so with Spur. So post image segment > loading someObject/nextObject is used to enumerate the objects loaded. > This can't work reliably in Spur. I *think* (ok I hope) that I've > implemented the segment load primitive in Spur to answer an Array of the > objects loaded, so that these can be explicitly enumerated. > > So the job is a) to check that I have indeed implemented the primitive to > do this and b) to rewrite the image segment loading code in the light of > this. > > David, this is an example of something that isn't back portable and should > not be back-ported. > > The most strange thing is that I cannot reproduce this on my Mac? >> There the test does not crash the image? >> > > Well then it may be a signed/unsigned bug in image loading instead. On > linux the image typically gets loaded quite high in the address space and > so a good portion of the heap ends up above 0x7FFFFFFF, or negative > territory if misinterpreted as signed integers. On Mac and Windows the > image tends to get loaded quite low and so has to be pretty big to fall > foul of signedness issues. > > > Busy right now but will check tomorrow. > > >> Best regards >> -Tobias >> >> >> > >> > On Wed, Aug 12, 2015 at 5:11 PM, Eliot Miranda >> wrote: >> > Hi Tobias, >> > >> > On Wed, Aug 12, 2015 at 12:49 PM, Tobias Pape wrote: >> > >> > On 12.08.2015, at 20:55, Eliot Miranda wrote: >> > >> > > Hi All, >> > > >> > > >> > > Fabio's kindly done most of the changes. But some questions >> remain for more general discussion. See below. >> > > >> > > Fabio, thanks so much for doing this, and so quickly! >> > > >> > > On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda < >> eliot.miranda@gmail.com> wrote: >> > > Hi All, >> > > >> > > who will update http://squeak.org/downloads/ to include the 5.0 >> release? >> > > >> > > a) I suggest that the 5.0 all-in-one have a line in the left-hand >> table that includes the 4.6 release and that it precede the 4.6 release in >> the list. >> > > >> > > Done. >> > > >> > > >> > > b) the Trunk link points to TrunkImage.zip which contains a non-Spur >> image. >> > > >> > > So this is the biggie. What should we do? >> > > >> > > - add a Trunk 5.0 build with a different link? (Noooooo) >> > > >> > > - change http://build.squeak.org/job/SqueakTrunk to build what it >> says (Yessss please, who can do this?) >> > >> > Done: build.squeak.org/job/Trunk/ >> > But as I said several times, Spur/trunk test just crash for month? >> > >> > can you point me to the crash? I'm looking at >> http://build.squeak.org/job/Trunk/default/lastBuild/#showFailuresLink >> and see 8 test failures but no crash. >> > >> > >> > > >> > > - add a Squeak 4.6 build job? Is that even worth it any more >> considering 4.6 is released and stable? If it is then what should it >> build? David? >> > > >> > > >> > > c) Spur VMs need to be linked to by an added line in the Virtual >> Machines list. >> > > >> > > Not applicable. the VM links point to the root of my site so they >> effectively point to both old and Spur VMs. >> > > >> > > >> > > d) Spur imagers need to be included in the Image and Changes list >> under Custom Installation >> > > >> > > Done. >> > > >> > > >> > > >> > > e) The SqueakV50.sources file also needs to be included in the >> Current Sources list. >> > > >> > > Done. >> > > >> > > >> > > f) we could start a History list for the 5.0 line >> > > >> > > This is probably quite a big reorg on the page and not urgent. >> > > >> > > >> > > So there are a few things to fix before 5.0 is freely downloadable. >> > > >> > > On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller >> wrote: >> > > In the 17 months since Squeak 4.5 was released, a huge development >> > > effort took place to create the next generation virtual-machine for >> > > the Squeak / Pharo / Newspeak family of programming systems. Squeak >> > > is the modern incarnation of the Smalltalk-80 programming environment >> > > originally developed at the Xerox PARC. >> > > >> > > "Squeak 5" introduces this new VM and associated new memory model, >> > > collectively referred to as "Spur". Presented [1] by Eliot Miranda >> > > and Cl?ment B?ra at the 2015 International Symposium on Memory >> > > Management, this new VM affords Squeak applications a significant >> > > boost in performance and memory management. Among other >> > > optimizations, the #become operation no longer requires a memory scan. >> > > Object pinning and ephemerons are also now supported. The release >> > > notes [2] provide more details. >> > > >> > > The new memory model requires a new image file format. Although this >> > > new format results in about a 15% increased memory requirement for the >> > > same number of 4.x objects, a new segmented heap allows memory to be >> > > given back to the OS when its no longer needed, a great benefit for >> > > application servers. >> > > >> > > As forward compatibility is as important to the Squeak community as >> > > backward compatibility, Squeak 5 is delivers an image with identical >> > > content as the recent 4.6 release. Although this new Squeak 5 VM >> > > cannot open images saved under the prior 4.x Cog format, objects and >> > > code can be easily exported from the 4.x image and then imported into >> > > Squeak 5. Applications whose code runs strictly above the Smalltalk >> > > meta layer will prove remarkably compatible with the new format, most >> > > applications will require no changes whatsotever. >> > > >> > > Squeak 5 is the result of monumental effort by a tiny group of very >> > > talented people, but its also just the beginning of yet a new effort; >> > > Spur is just a stepping stone to a more ambitious goals planned over >> > > the next five years. >> > > >> > > [1] -- A Partial Read Barrier for Efficient Support of Live >> > > Object-oriented Programming >> > > >> http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming >> > > >> > > [2] -- Squeak 5 Release Notes >> > > http://wiki.squeak.org/squeak/6207 >> >> >> >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150819/cf811604/attachment.htm From lewis at mail.msen.com Thu Aug 20 00:12:29 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Aug 20 00:12:32 2015 Subject: [Vm-dev] Squeak 5 Image Segment Work [was [squeak-dev] [ANN] Squeak 5] In-Reply-To: References: Message-ID: <20150820001229.GB68874@shell.msen.com> I think that image segments are a worthwhile idea, regardless of whether we are worried about support project saving and other image conversion issues. Here is a post by Dan Ingalls from 1999 that summarizes the work on image segments at that time: http://lists.squeakfoundation.org/pipermail/squeak-dev/1999-October/014604.html Dan also mentioned it in "the future of Squeak, 1999": http://wiki.squeak.org/squeak/393 It is quite clear that saving projects was a proof of concept to illustrate what might be done with image segments, but the overall motivation had more to do with exploring modularity and mechanisms for delivering minimal images. Tim Rowledge added a comment to that effect here: http://lists.squeakfoundation.org/pipermail/squeak-dev/1999-October/014604.html I will also note that Spur is not the first time we have needed to think about making image segments work on a new image format. When Dan Ingalls and Ian Piumarta announced the first 64-bit Squeak image, they said "We may ask for help from the Squeak community in converting the remaining plugins, and also image segment code." http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-August/081383.html Quite a few of the things that Dan and Ian asked for help on have since been done, but I don't think that image segment support for the 64-bit image was among them. With the arrival of Spur, and the upcoming Spur 64-bit image, it would be great if we can put some thought and effort into doing this right. $0.02, Dave On Wed, Aug 19, 2015 at 02:09:32PM -0700, Eliot Miranda wrote: > > Hi All, but especially Tobias, > > as we know, ImageSegments are broken in Spur. They work occasionally, > but when stressed the VM ends up crashing. The fundamental issue is that > the ImageSegment code makes assumptions about object ordering that Spur > violates. For example, here's ImageSegment's install: > > install > "This operation retrieves the segment if necessary from file storage, > installs it in memory, and replaces (using become:) all the root stubs with > the reconstructed roots of the segment." > > | newRoots | > state = #onFile ifTrue: [self readFromFile]. > state = #onFileWithSymbols ifTrue: [self readFromFileWithSymbols. > endMarker := segment nextObject. "for enumeration of objects" > endMarker == 0 ifTrue: [endMarker := 'End' clone]]. > (state = #active) | (state = #imported) ifFalse: [self errorWrongState]. > newRoots := self loadSegmentFrom: segment outPointers: outPointers. > state = #imported > ifTrue: ["just came in from exported file" > arrayOfRoots := newRoots] > ifFalse: [ > arrayOfRoots elementsForwardIdentityTo: newRoots]. > state := #inactive. > Beeper beepPrimitive > > So before the image segment bytes (the segment inst var) is loaded, the > object after it is assigned to endMarker, and if there isn't an object > after segment, a new object ('End' clone) is assigned to endMarker. > > This makes the assumption that objects are allocated in a strict order, and > therefore endMarker will always be the object after segment. > > Loading the segment via "newRoots := self loadSegmentFrom: segment > outPointers: outPointers" then turns segment into a zero-length WordArray > and its contents into the objects loaded by the segment. Therefore, in the > V3 system, the objects loaded from segment can be enumerated starting at > segment nextObject and repeating until endMarker is found: > > allObjectsDo: aBlock > "Enumerate all objects that came from this segment. NOTE this assumes that > the segment was created (and extracted). After the segment has been > installed (install), this method allows you to enumerate its objects." > | obj | > > endMarker == nil ifTrue: [ > ^ self error: 'Just extract and install, don''t writeToFile:']. > segment size ~= 1 ifTrue: [ > ^ self error: 'Vestigial segment size must be 1 (version word)']. > > obj := segment nextObject. "Start with the next object after the vestigial > header" > [obj == endMarker] whileFalse: "Stop at the next object after the full > segment" > [aBlock value: obj. > obj := obj nextObject]. "Step through the objects installed from the > segment." > > Now, as written, this just won't work in Spur. > > a) the only place where there is any kind of stable order to objects is in > oldSpace, so segment /has/ to be forced to old space to have any chance of > its objects being in order when it gets converted from bytes to objects. > > b) 'End' clone will be in newSpace and so endMarker isn't reliable unless > it was obtained by segment nextObject when segment was already in oldSpace. > > So it is perhaps possible to fix ImageSegments in Spur by forcing segment > to oldSpace and being more careful with endMarker. But I think there is a > better way. > > If the set of objects the segment contains can be obtained some how then > this set can be simply enumerated, not depending on nextObject. The > primitive has to answer the array of roots, so its result can't be changed > to be the entire array. But segment could be becomed into an Array of all > the objects in segment prior to it being loaded, in which case the above > would become > > > install > "This operation retrieves the segment if necessary from file storage, > installs it in memory, and replaces (using become:) all the root stubs with > the reconstructed roots of the segment." > > | newRoots | > state = #onFile ifTrue: [self readFromFile]. > state = #onFileWithSymbols ifTrue: > [self readFromFileWithSymbols]. > (state = #active) | (state = #imported) ifFalse: [self errorWrongState]. > newRoots := self loadSegmentFrom: segment outPointers: outPointers. > state = #imported > ifTrue: "just came in from exported file" > [arrayOfRoots := newRoots] > ifFalse: > [arrayOfRoots elementsForwardIdentityTo: newRoots]. > state := #inactive. > Beeper beepPrimitive > > allObjectsDo: aBlock > "Enumerate all objects that came from this segment. NOTE this assumes that > the segment was created (and extracted). After the segment has been > installed (install), this method allows you to enumerate its objects." > | obj | > > segment isArray ifFalse: > [^ self error: 'Segment hasn''t been loaded?']. > > segment do: aBlock > > and the endMarker instVar would be deleted. > > I am willing and ready to modify the primitive to convert the segment > correctly. Who will volunteer to rewrite the image-level ImageSegment code > to use the new primitive? > > > > On Wed, Aug 12, 2015 at 10:40 PM, Eliot Miranda > wrote: > > > Hi Tobias, > > > > On Wed, Aug 12, 2015 at 10:18 PM, Tobias Pape wrote: > > > >> Hi all > >> On 13.08.2015, at 02:15, Eliot Miranda wrote: > >> > >> > Hi Tobias, > >> > > >> > forget that. I found it. THis right? > >> > > >> > Trunk test suite for Spur > >> > Using existing cogspur r.3410 > >> > cp -r /var/lib/jenkins/workspace/Trunk/default/target/cogspur.r3410 > >> /tmp/d20150812-28620-etbikj > >> > image test suite > >> > VM: /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak > >> > /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak > >> -version > >> > /var/lib/jenkins/workspace/Trunk/default/tests.st > >> > spawning command 0 with timeout 1800 seconds: > >> "/tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak" > >> "-vm-sound-null" "-vm-display-null" > >> "/var/lib/jenkins/workspace/Trunk/default/target/SpurPostTestTrunkImage.image" > >> "../tests.st" > >> > (Command started with PID 28643) > >> > 2015-08-12T23:31:48.17+01:00: Loading Hudson build tools... from > >> /var/lib/jenkins/workspace/Trunk/default/target/HudsonBuildTools.st > >> > 2015-08-12T23:31:48.388+01:00: Running tests... > >> > setsockopt: Protocol not available > >> > setsockopt: Protocol not available > >> > 28646:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown > >> protocol:s23_clnt.c:612: > >> > > >> > Recursive not understood error encountered > >> > > >> > > >> > I bet this is ImageSegment related. > >> > >> It sure is. > >> > >> BitmapStreamTests>testMatrixTransform2x3WithImageSegment > >> sends > >> BitmapStreamTests>validateImageSegment > >> > > > > Basically the ImageSegment code has been working in Spur on a hope and a > > prayer. The code assumes objects are allocated in chronological order and > > that this order is preserved, not so with Spur. So post image segment > > loading someObject/nextObject is used to enumerate the objects loaded. > > This can't work reliably in Spur. I *think* (ok I hope) that I've > > implemented the segment load primitive in Spur to answer an Array of the > > objects loaded, so that these can be explicitly enumerated. > > > > So the job is a) to check that I have indeed implemented the primitive to > > do this and b) to rewrite the image segment loading code in the light of > > this. > > > > David, this is an example of something that isn't back portable and should > > not be back-ported. > > > > The most strange thing is that I cannot reproduce this on my Mac??? > >> There the test does not crash the image??? > >> > > > > Well then it may be a signed/unsigned bug in image loading instead. On > > linux the image typically gets loaded quite high in the address space and > > so a good portion of the heap ends up above 0x7FFFFFFF, or negative > > territory if misinterpreted as signed integers. On Mac and Windows the > > image tends to get loaded quite low and so has to be pretty big to fall > > foul of signedness issues. > > > > > > Busy right now but will check tomorrow. > > > > > >> Best regards > >> -Tobias > >> > >> > >> > > >> > On Wed, Aug 12, 2015 at 5:11 PM, Eliot Miranda > >> wrote: > >> > Hi Tobias, > >> > > >> > On Wed, Aug 12, 2015 at 12:49 PM, Tobias Pape wrote: > >> > > >> > On 12.08.2015, at 20:55, Eliot Miranda wrote: > >> > > >> > > Hi All, > >> > > > >> > > > >> > > Fabio's kindly done most of the changes. But some questions > >> remain for more general discussion. See below. > >> > > > >> > > Fabio, thanks so much for doing this, and so quickly! > >> > > > >> > > On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda < > >> eliot.miranda@gmail.com> wrote: > >> > > Hi All, > >> > > > >> > > who will update http://squeak.org/downloads/ to include the 5.0 > >> release? > >> > > > >> > > a) I suggest that the 5.0 all-in-one have a line in the left-hand > >> table that includes the 4.6 release and that it precede the 4.6 release in > >> the list. > >> > > > >> > > Done. > >> > > > >> > > > >> > > b) the Trunk link points to TrunkImage.zip which contains a non-Spur > >> image. > >> > > > >> > > So this is the biggie. What should we do? > >> > > > >> > > - add a Trunk 5.0 build with a different link? (Noooooo) > >> > > > >> > > - change http://build.squeak.org/job/SqueakTrunk to build what it > >> says (Yessss please, who can do this?) > >> > > >> > Done: build.squeak.org/job/Trunk/ > >> > But as I said several times, Spur/trunk test just crash for month??? > >> > > >> > can you point me to the crash? I'm looking at > >> http://build.squeak.org/job/Trunk/default/lastBuild/#showFailuresLink > >> and see 8 test failures but no crash. > >> > > >> > > >> > > > >> > > - add a Squeak 4.6 build job? Is that even worth it any more > >> considering 4.6 is released and stable? If it is then what should it > >> build? David? > >> > > > >> > > > >> > > c) Spur VMs need to be linked to by an added line in the Virtual > >> Machines list. > >> > > > >> > > Not applicable. the VM links point to the root of my site so they > >> effectively point to both old and Spur VMs. > >> > > > >> > > > >> > > d) Spur imagers need to be included in the Image and Changes list > >> under Custom Installation > >> > > > >> > > Done. > >> > > > >> > > > >> > > > >> > > e) The SqueakV50.sources file also needs to be included in the > >> Current Sources list. > >> > > > >> > > Done. > >> > > > >> > > > >> > > f) we could start a History list for the 5.0 line > >> > > > >> > > This is probably quite a big reorg on the page and not urgent. > >> > > > >> > > > >> > > So there are a few things to fix before 5.0 is freely downloadable. > >> > > > >> > > On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller > >> wrote: > >> > > In the 17 months since Squeak 4.5 was released, a huge development > >> > > effort took place to create the next generation virtual-machine for > >> > > the Squeak / Pharo / Newspeak family of programming systems. Squeak > >> > > is the modern incarnation of the Smalltalk-80 programming environment > >> > > originally developed at the Xerox PARC. > >> > > > >> > > "Squeak 5" introduces this new VM and associated new memory model, > >> > > collectively referred to as "Spur". Presented [1] by Eliot Miranda > >> > > and Cl??ment B??ra at the 2015 International Symposium on Memory > >> > > Management, this new VM affords Squeak applications a significant > >> > > boost in performance and memory management. Among other > >> > > optimizations, the #become operation no longer requires a memory scan. > >> > > Object pinning and ephemerons are also now supported. The release > >> > > notes [2] provide more details. > >> > > > >> > > The new memory model requires a new image file format. Although this > >> > > new format results in about a 15% increased memory requirement for the > >> > > same number of 4.x objects, a new segmented heap allows memory to be > >> > > given back to the OS when its no longer needed, a great benefit for > >> > > application servers. > >> > > > >> > > As forward compatibility is as important to the Squeak community as > >> > > backward compatibility, Squeak 5 is delivers an image with identical > >> > > content as the recent 4.6 release. Although this new Squeak 5 VM > >> > > cannot open images saved under the prior 4.x Cog format, objects and > >> > > code can be easily exported from the 4.x image and then imported into > >> > > Squeak 5. Applications whose code runs strictly above the Smalltalk > >> > > meta layer will prove remarkably compatible with the new format, most > >> > > applications will require no changes whatsotever. > >> > > > >> > > Squeak 5 is the result of monumental effort by a tiny group of very > >> > > talented people, but its also just the beginning of yet a new effort; > >> > > Spur is just a stepping stone to a more ambitious goals planned over > >> > > the next five years. > >> > > > >> > > [1] -- A Partial Read Barrier for Efficient Support of Live > >> > > Object-oriented Programming > >> > > > >> http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming > >> > > > >> > > [2] -- Squeak 5 Release Notes > >> > > http://wiki.squeak.org/squeak/6207 > >> > >> > >> > >> > >> > > > > > > -- > > _,,,^..^,,,_ > > best, Eliot > > > > > > -- > _,,,^..^,,,_ > best, Eliot From brasspen at gmail.com Thu Aug 20 01:18:49 2015 From: brasspen at gmail.com (Chris Cunnington) Date: Thu Aug 20 01:18:53 2015 Subject: [Vm-dev] Squeak 5 Image Segment Work [was [squeak-dev] [ANN] Squeak 5] In-Reply-To: <20150820001229.GB68874@shell.msen.com> References: <20150820001229.GB68874@shell.msen.com> Message-ID: <55D52AF9.4090905@gmail.com> As I've never seen (even on the wiki) an even halfway decent demonstration of using an ImageSegment, I'm providing on here. hex := Browser allInstances first. "let's check what we're saving to compare with later" (hex buildWith: ToolBuilder default) openInWorld exporting := (ImageSegment new copyFromRootsForExport: (Array with: hex)). ?let?s put it on disk? exporting writeForExport: 'browser.extSeg'. "Quit your image without saving. Actually, to get the full effect go to http://ftp.squeak.org and get a fresh image of the same kind you exported with. Drag browser.extSeg into the new image directory" ?let?s pull it in from the disk? importing := (FileDirectory default readOnlyFileNamed: 'browser.extSeg') fileInObjectAndCode. "let's check what we imported to see if it's what we saved" ((importing originalRoots first) buildWith: ToolBuilder default) openInWorld Chris On 2015-08-19 8:12 PM, David T. Lewis wrote: > I think that image segments are a worthwhile idea, regardless of whether > we are worried about support project saving and other image conversion > issues. Here is a post by Dan Ingalls from 1999 that summarizes the work > on image segments at that time: > > http://lists.squeakfoundation.org/pipermail/squeak-dev/1999-October/014604.html > > Dan also mentioned it in "the future of Squeak, 1999": > > http://wiki.squeak.org/squeak/393 > > It is quite clear that saving projects was a proof of concept to illustrate > what might be done with image segments, but the overall motivation had more > to do with exploring modularity and mechanisms for delivering minimal images. > > Tim Rowledge added a comment to that effect here: > > http://lists.squeakfoundation.org/pipermail/squeak-dev/1999-October/014604.html > > I will also note that Spur is not the first time we have needed to think > about making image segments work on a new image format. When Dan Ingalls and > Ian Piumarta announced the first 64-bit Squeak image, they said "We may ask for > help from the Squeak community in converting the remaining plugins, and also > image segment code." > > http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-August/081383.html > > Quite a few of the things that Dan and Ian asked for help on have since been > done, but I don't think that image segment support for the 64-bit image was > among them. With the arrival of Spur, and the upcoming Spur 64-bit image, it > would be great if we can put some thought and effort into doing this right. > > $0.02, > > Dave > > > On Wed, Aug 19, 2015 at 02:09:32PM -0700, Eliot Miranda wrote: >> >> Hi All, but especially Tobias, >> >> as we know, ImageSegments are broken in Spur. They work occasionally, >> but when stressed the VM ends up crashing. The fundamental issue is that >> the ImageSegment code makes assumptions about object ordering that Spur >> violates. For example, here's ImageSegment's install: >> >> install >> "This operation retrieves the segment if necessary from file storage, >> installs it in memory, and replaces (using become:) all the root stubs with >> the reconstructed roots of the segment." >> >> | newRoots | >> state = #onFile ifTrue: [self readFromFile]. >> state = #onFileWithSymbols ifTrue: [self readFromFileWithSymbols. >> endMarker := segment nextObject. "for enumeration of objects" >> endMarker == 0 ifTrue: [endMarker := 'End' clone]]. >> (state = #active) | (state = #imported) ifFalse: [self errorWrongState]. >> newRoots := self loadSegmentFrom: segment outPointers: outPointers. >> state = #imported >> ifTrue: ["just came in from exported file" >> arrayOfRoots := newRoots] >> ifFalse: [ >> arrayOfRoots elementsForwardIdentityTo: newRoots]. >> state := #inactive. >> Beeper beepPrimitive >> >> So before the image segment bytes (the segment inst var) is loaded, the >> object after it is assigned to endMarker, and if there isn't an object >> after segment, a new object ('End' clone) is assigned to endMarker. >> >> This makes the assumption that objects are allocated in a strict order, and >> therefore endMarker will always be the object after segment. >> >> Loading the segment via "newRoots := self loadSegmentFrom: segment >> outPointers: outPointers" then turns segment into a zero-length WordArray >> and its contents into the objects loaded by the segment. Therefore, in the >> V3 system, the objects loaded from segment can be enumerated starting at >> segment nextObject and repeating until endMarker is found: >> >> allObjectsDo: aBlock >> "Enumerate all objects that came from this segment. NOTE this assumes that >> the segment was created (and extracted). After the segment has been >> installed (install), this method allows you to enumerate its objects." >> | obj | >> >> endMarker == nil ifTrue: [ >> ^ self error: 'Just extract and install, don''t writeToFile:']. >> segment size ~= 1 ifTrue: [ >> ^ self error: 'Vestigial segment size must be 1 (version word)']. >> >> obj := segment nextObject. "Start with the next object after the vestigial >> header" >> [obj == endMarker] whileFalse: "Stop at the next object after the full >> segment" >> [aBlock value: obj. >> obj := obj nextObject]. "Step through the objects installed from the >> segment." >> >> Now, as written, this just won't work in Spur. >> >> a) the only place where there is any kind of stable order to objects is in >> oldSpace, so segment /has/ to be forced to old space to have any chance of >> its objects being in order when it gets converted from bytes to objects. >> >> b) 'End' clone will be in newSpace and so endMarker isn't reliable unless >> it was obtained by segment nextObject when segment was already in oldSpace. >> >> So it is perhaps possible to fix ImageSegments in Spur by forcing segment >> to oldSpace and being more careful with endMarker. But I think there is a >> better way. >> >> If the set of objects the segment contains can be obtained some how then >> this set can be simply enumerated, not depending on nextObject. The >> primitive has to answer the array of roots, so its result can't be changed >> to be the entire array. But segment could be becomed into an Array of all >> the objects in segment prior to it being loaded, in which case the above >> would become >> >> >> install >> "This operation retrieves the segment if necessary from file storage, >> installs it in memory, and replaces (using become:) all the root stubs with >> the reconstructed roots of the segment." >> >> | newRoots | >> state = #onFile ifTrue: [self readFromFile]. >> state = #onFileWithSymbols ifTrue: >> [self readFromFileWithSymbols]. >> (state = #active) | (state = #imported) ifFalse: [self errorWrongState]. >> newRoots := self loadSegmentFrom: segment outPointers: outPointers. >> state = #imported >> ifTrue: "just came in from exported file" >> [arrayOfRoots := newRoots] >> ifFalse: >> [arrayOfRoots elementsForwardIdentityTo: newRoots]. >> state := #inactive. >> Beeper beepPrimitive >> >> allObjectsDo: aBlock >> "Enumerate all objects that came from this segment. NOTE this assumes that >> the segment was created (and extracted). After the segment has been >> installed (install), this method allows you to enumerate its objects." >> | obj | >> >> segment isArray ifFalse: >> [^ self error: 'Segment hasn''t been loaded?']. >> >> segment do: aBlock >> >> and the endMarker instVar would be deleted. >> >> I am willing and ready to modify the primitive to convert the segment >> correctly. Who will volunteer to rewrite the image-level ImageSegment code >> to use the new primitive? >> >> >> >> On Wed, Aug 12, 2015 at 10:40 PM, Eliot Miranda >> wrote: >> >>> Hi Tobias, >>> >>> On Wed, Aug 12, 2015 at 10:18 PM, Tobias Pape wrote: >>> >>>> Hi all >>>> On 13.08.2015, at 02:15, Eliot Miranda wrote: >>>> >>>>> Hi Tobias, >>>>> >>>>> forget that. I found it. THis right? >>>>> >>>>> Trunk test suite for Spur >>>>> Using existing cogspur r.3410 >>>>> cp -r /var/lib/jenkins/workspace/Trunk/default/target/cogspur.r3410 >>>> /tmp/d20150812-28620-etbikj >>>>> image test suite >>>>> VM: /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak >>>>> /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak >>>> -version >>>>> /var/lib/jenkins/workspace/Trunk/default/tests.st >>>>> spawning command 0 with timeout 1800 seconds: >>>> "/tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak" >>>> "-vm-sound-null" "-vm-display-null" >>>> "/var/lib/jenkins/workspace/Trunk/default/target/SpurPostTestTrunkImage.image" >>>> "../tests.st" >>>>> (Command started with PID 28643) >>>>> 2015-08-12T23:31:48.17+01:00: Loading Hudson build tools... from >>>> /var/lib/jenkins/workspace/Trunk/default/target/HudsonBuildTools.st >>>>> 2015-08-12T23:31:48.388+01:00: Running tests... >>>>> setsockopt: Protocol not available >>>>> setsockopt: Protocol not available >>>>> 28646:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown >>>> protocol:s23_clnt.c:612: >>>>> Recursive not understood error encountered >>>>> >>>>> >>>>> I bet this is ImageSegment related. >>>> It sure is. >>>> >>>> BitmapStreamTests>testMatrixTransform2x3WithImageSegment >>>> sends >>>> BitmapStreamTests>validateImageSegment >>>> >>> Basically the ImageSegment code has been working in Spur on a hope and a >>> prayer. The code assumes objects are allocated in chronological order and >>> that this order is preserved, not so with Spur. So post image segment >>> loading someObject/nextObject is used to enumerate the objects loaded. >>> This can't work reliably in Spur. I *think* (ok I hope) that I've >>> implemented the segment load primitive in Spur to answer an Array of the >>> objects loaded, so that these can be explicitly enumerated. >>> >>> So the job is a) to check that I have indeed implemented the primitive to >>> do this and b) to rewrite the image segment loading code in the light of >>> this. >>> >>> David, this is an example of something that isn't back portable and should >>> not be back-ported. >>> >>> The most strange thing is that I cannot reproduce this on my Mac??? >>>> There the test does not crash the image??? >>>> >>> Well then it may be a signed/unsigned bug in image loading instead. On >>> linux the image typically gets loaded quite high in the address space and >>> so a good portion of the heap ends up above 0x7FFFFFFF, or negative >>> territory if misinterpreted as signed integers. On Mac and Windows the >>> image tends to get loaded quite low and so has to be pretty big to fall >>> foul of signedness issues. >>> >>> >>> Busy right now but will check tomorrow. >>> >>> >>>> Best regards >>>> -Tobias >>>> >>>> >>>>> On Wed, Aug 12, 2015 at 5:11 PM, Eliot Miranda >>>> wrote: >>>>> Hi Tobias, >>>>> >>>>> On Wed, Aug 12, 2015 at 12:49 PM, Tobias Pape wrote: >>>>> >>>>> On 12.08.2015, at 20:55, Eliot Miranda wrote: >>>>> >>>>>> Hi All, >>>>>> >>>>>> >>>>>> Fabio's kindly done most of the changes. But some questions >>>> remain for more general discussion. See below. >>>>>> Fabio, thanks so much for doing this, and so quickly! >>>>>> >>>>>> On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda < >>>> eliot.miranda@gmail.com> wrote: >>>>>> Hi All, >>>>>> >>>>>> who will update http://squeak.org/downloads/ to include the 5.0 >>>> release? >>>>>> a) I suggest that the 5.0 all-in-one have a line in the left-hand >>>> table that includes the 4.6 release and that it precede the 4.6 release in >>>> the list. >>>>>> Done. >>>>>> >>>>>> >>>>>> b) the Trunk link points to TrunkImage.zip which contains a non-Spur >>>> image. >>>>>> So this is the biggie. What should we do? >>>>>> >>>>>> - add a Trunk 5.0 build with a different link? (Noooooo) >>>>>> >>>>>> - change http://build.squeak.org/job/SqueakTrunk to build what it >>>> says (Yessss please, who can do this?) >>>>> Done: build.squeak.org/job/Trunk/ >>>>> But as I said several times, Spur/trunk test just crash for month??? >>>>> >>>>> can you point me to the crash? I'm looking at >>>> http://build.squeak.org/job/Trunk/default/lastBuild/#showFailuresLink >>>> and see 8 test failures but no crash. >>>>> >>>>>> - add a Squeak 4.6 build job? Is that even worth it any more >>>> considering 4.6 is released and stable? If it is then what should it >>>> build? David? >>>>>> >>>>>> c) Spur VMs need to be linked to by an added line in the Virtual >>>> Machines list. >>>>>> Not applicable. the VM links point to the root of my site so they >>>> effectively point to both old and Spur VMs. >>>>>> >>>>>> d) Spur imagers need to be included in the Image and Changes list >>>> under Custom Installation >>>>>> Done. >>>>>> >>>>>> >>>>>> >>>>>> e) The SqueakV50.sources file also needs to be included in the >>>> Current Sources list. >>>>>> Done. >>>>>> >>>>>> >>>>>> f) we could start a History list for the 5.0 line >>>>>> >>>>>> This is probably quite a big reorg on the page and not urgent. >>>>>> >>>>>> >>>>>> So there are a few things to fix before 5.0 is freely downloadable. >>>>>> >>>>>> On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller >>>> wrote: >>>>>> In the 17 months since Squeak 4.5 was released, a huge development >>>>>> effort took place to create the next generation virtual-machine for >>>>>> the Squeak / Pharo / Newspeak family of programming systems. Squeak >>>>>> is the modern incarnation of the Smalltalk-80 programming environment >>>>>> originally developed at the Xerox PARC. >>>>>> >>>>>> "Squeak 5" introduces this new VM and associated new memory model, >>>>>> collectively referred to as "Spur". Presented [1] by Eliot Miranda >>>>>> and Cl??ment B??ra at the 2015 International Symposium on Memory >>>>>> Management, this new VM affords Squeak applications a significant >>>>>> boost in performance and memory management. Among other >>>>>> optimizations, the #become operation no longer requires a memory scan. >>>>>> Object pinning and ephemerons are also now supported. The release >>>>>> notes [2] provide more details. >>>>>> >>>>>> The new memory model requires a new image file format. Although this >>>>>> new format results in about a 15% increased memory requirement for the >>>>>> same number of 4.x objects, a new segmented heap allows memory to be >>>>>> given back to the OS when its no longer needed, a great benefit for >>>>>> application servers. >>>>>> >>>>>> As forward compatibility is as important to the Squeak community as >>>>>> backward compatibility, Squeak 5 is delivers an image with identical >>>>>> content as the recent 4.6 release. Although this new Squeak 5 VM >>>>>> cannot open images saved under the prior 4.x Cog format, objects and >>>>>> code can be easily exported from the 4.x image and then imported into >>>>>> Squeak 5. Applications whose code runs strictly above the Smalltalk >>>>>> meta layer will prove remarkably compatible with the new format, most >>>>>> applications will require no changes whatsotever. >>>>>> >>>>>> Squeak 5 is the result of monumental effort by a tiny group of very >>>>>> talented people, but its also just the beginning of yet a new effort; >>>>>> Spur is just a stepping stone to a more ambitious goals planned over >>>>>> the next five years. >>>>>> >>>>>> [1] -- A Partial Read Barrier for Efficient Support of Live >>>>>> Object-oriented Programming >>>>>> >>>> http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming >>>>>> [2] -- Squeak 5 Release Notes >>>>>> http://wiki.squeak.org/squeak/6207 >>>> >>>> >>>> >>>> >>> >>> -- >>> _,,,^..^,,,_ >>> best, Eliot >>> >> >> >> -- >> _,,,^..^,,,_ >> best, Eliot > From marianopeck at gmail.com Thu Aug 20 01:31:00 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Thu Aug 20 01:31:04 2015 Subject: [Vm-dev] Squeak 5 Image Segment Work [was [squeak-dev] [ANN] Squeak 5] In-Reply-To: <55D52AF9.4090905@gmail.com> References: <20150820001229.GB68874@shell.msen.com> <55D52AF9.4090905@gmail.com> Message-ID: Hi guys, As part of my PhD thesis I did take a deep look to ImageSegment before starting with Fuel. I wrote a journal paper about my experiments with ImageSegment which I thinks provides quite a documentation that is not written anywhere. Hope it helps: http://rmod.lille.inria.fr/archives/papers/Mart11c-COMLAN-ObjectSwapping.pdf Best, On Wed, Aug 19, 2015 at 10:18 PM, Chris Cunnington wrote: > As I've never seen (even on the wiki) an even halfway decent demonstration > of using an ImageSegment, I'm providing on here. > > hex := Browser allInstances first. > > "let's check what we're saving to compare with later" > (hex buildWith: ToolBuilder default) openInWorld > > exporting := (ImageSegment new copyFromRootsForExport: (Array with: > hex)). > > ?let?s put it on disk? > exporting writeForExport: 'browser.extSeg'. > > "Quit your image without saving. Actually, to get the full effect go > to http://ftp.squeak.org and get a fresh image of the same kind you > exported with. Drag browser.extSeg into the new image directory" > > ?let?s pull it in from the disk? > importing := (FileDirectory default readOnlyFileNamed: > 'browser.extSeg') fileInObjectAndCode. > > "let's check what we imported to see if it's what we saved" > ((importing originalRoots first) buildWith: ToolBuilder default) > openInWorld > > Chris > > > > On 2015-08-19 8:12 PM, David T. Lewis wrote: > >> I think that image segments are a worthwhile idea, regardless of whether >> we are worried about support project saving and other image conversion >> issues. Here is a post by Dan Ingalls from 1999 that summarizes the work >> on image segments at that time: >> >> >> http://lists.squeakfoundation.org/pipermail/squeak-dev/1999-October/014604.html >> >> Dan also mentioned it in "the future of Squeak, 1999": >> >> http://wiki.squeak.org/squeak/393 >> >> It is quite clear that saving projects was a proof of concept to >> illustrate >> what might be done with image segments, but the overall motivation had >> more >> to do with exploring modularity and mechanisms for delivering minimal >> images. >> >> Tim Rowledge added a comment to that effect here: >> >> >> http://lists.squeakfoundation.org/pipermail/squeak-dev/1999-October/014604.html >> >> I will also note that Spur is not the first time we have needed to think >> about making image segments work on a new image format. When Dan Ingalls >> and >> Ian Piumarta announced the first 64-bit Squeak image, they said "We may >> ask for >> help from the Squeak community in converting the remaining plugins, and >> also >> image segment code." >> >> >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-August/081383.html >> >> Quite a few of the things that Dan and Ian asked for help on have since >> been >> done, but I don't think that image segment support for the 64-bit image >> was >> among them. With the arrival of Spur, and the upcoming Spur 64-bit image, >> it >> would be great if we can put some thought and effort into doing this >> right. >> >> $0.02, >> >> Dave >> >> >> On Wed, Aug 19, 2015 at 02:09:32PM -0700, Eliot Miranda wrote: >> >>> Hi All, but especially Tobias, >>> >>> as we know, ImageSegments are broken in Spur. They work >>> occasionally, >>> but when stressed the VM ends up crashing. The fundamental issue is that >>> the ImageSegment code makes assumptions about object ordering that Spur >>> violates. For example, here's ImageSegment's install: >>> >>> install >>> "This operation retrieves the segment if necessary from file storage, >>> installs it in memory, and replaces (using become:) all the root stubs >>> with >>> the reconstructed roots of the segment." >>> >>> | newRoots | >>> state = #onFile ifTrue: [self readFromFile]. >>> state = #onFileWithSymbols ifTrue: [self readFromFileWithSymbols. >>> endMarker := segment nextObject. "for enumeration of objects" >>> endMarker == 0 ifTrue: [endMarker := 'End' clone]]. >>> (state = #active) | (state = #imported) ifFalse: [self errorWrongState]. >>> newRoots := self loadSegmentFrom: segment outPointers: outPointers. >>> state = #imported >>> ifTrue: ["just came in from exported file" >>> arrayOfRoots := newRoots] >>> ifFalse: [ >>> arrayOfRoots elementsForwardIdentityTo: newRoots]. >>> state := #inactive. >>> Beeper beepPrimitive >>> >>> So before the image segment bytes (the segment inst var) is loaded, the >>> object after it is assigned to endMarker, and if there isn't an object >>> after segment, a new object ('End' clone) is assigned to endMarker. >>> >>> This makes the assumption that objects are allocated in a strict order, >>> and >>> therefore endMarker will always be the object after segment. >>> >>> Loading the segment via "newRoots := self loadSegmentFrom: segment >>> outPointers: outPointers" then turns segment into a zero-length WordArray >>> and its contents into the objects loaded by the segment. Therefore, in >>> the >>> V3 system, the objects loaded from segment can be enumerated starting at >>> segment nextObject and repeating until endMarker is found: >>> >>> allObjectsDo: aBlock >>> "Enumerate all objects that came from this segment. NOTE this assumes >>> that >>> the segment was created (and extracted). After the segment has been >>> installed (install), this method allows you to enumerate its objects." >>> | obj | >>> >>> endMarker == nil ifTrue: [ >>> ^ self error: 'Just extract and install, don''t writeToFile:']. >>> segment size ~= 1 ifTrue: [ >>> ^ self error: 'Vestigial segment size must be 1 (version word)']. >>> >>> obj := segment nextObject. "Start with the next object after the >>> vestigial >>> header" >>> [obj == endMarker] whileFalse: "Stop at the next object after the full >>> segment" >>> [aBlock value: obj. >>> obj := obj nextObject]. "Step through the objects installed from the >>> segment." >>> >>> Now, as written, this just won't work in Spur. >>> >>> a) the only place where there is any kind of stable order to objects is >>> in >>> oldSpace, so segment /has/ to be forced to old space to have any chance >>> of >>> its objects being in order when it gets converted from bytes to objects. >>> >>> b) 'End' clone will be in newSpace and so endMarker isn't reliable unless >>> it was obtained by segment nextObject when segment was already in >>> oldSpace. >>> >>> So it is perhaps possible to fix ImageSegments in Spur by forcing segment >>> to oldSpace and being more careful with endMarker. But I think there is >>> a >>> better way. >>> >>> If the set of objects the segment contains can be obtained some how then >>> this set can be simply enumerated, not depending on nextObject. The >>> primitive has to answer the array of roots, so its result can't be >>> changed >>> to be the entire array. But segment could be becomed into an Array of >>> all >>> the objects in segment prior to it being loaded, in which case the above >>> would become >>> >>> >>> install >>> "This operation retrieves the segment if necessary from file storage, >>> installs it in memory, and replaces (using become:) all the root stubs >>> with >>> the reconstructed roots of the segment." >>> >>> | newRoots | >>> state = #onFile ifTrue: [self readFromFile]. >>> state = #onFileWithSymbols ifTrue: >>> [self readFromFileWithSymbols]. >>> (state = #active) | (state = #imported) ifFalse: [self errorWrongState]. >>> newRoots := self loadSegmentFrom: segment outPointers: outPointers. >>> state = #imported >>> ifTrue: "just came in from exported file" >>> [arrayOfRoots := newRoots] >>> ifFalse: >>> [arrayOfRoots elementsForwardIdentityTo: newRoots]. >>> state := #inactive. >>> Beeper beepPrimitive >>> >>> allObjectsDo: aBlock >>> "Enumerate all objects that came from this segment. NOTE this assumes >>> that >>> the segment was created (and extracted). After the segment has been >>> installed (install), this method allows you to enumerate its objects." >>> | obj | >>> >>> segment isArray ifFalse: >>> [^ self error: 'Segment hasn''t been loaded?']. >>> >>> segment do: aBlock >>> >>> and the endMarker instVar would be deleted. >>> >>> I am willing and ready to modify the primitive to convert the segment >>> correctly. Who will volunteer to rewrite the image-level ImageSegment >>> code >>> to use the new primitive? >>> >>> >>> >>> On Wed, Aug 12, 2015 at 10:40 PM, Eliot Miranda >> > >>> wrote: >>> >>> Hi Tobias, >>>> >>>> On Wed, Aug 12, 2015 at 10:18 PM, Tobias Pape wrote: >>>> >>>> Hi all >>>>> On 13.08.2015, at 02:15, Eliot Miranda >>>>> wrote: >>>>> >>>>> Hi Tobias, >>>>>> >>>>>> forget that. I found it. THis right? >>>>>> >>>>>> Trunk test suite for Spur >>>>>> Using existing cogspur r.3410 >>>>>> cp -r /var/lib/jenkins/workspace/Trunk/default/target/cogspur.r3410 >>>>>> >>>>> /tmp/d20150812-28620-etbikj >>>>> >>>>>> image test suite >>>>>> VM: >>>>>> /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak >>>>>> /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak >>>>>> >>>>> -version >>>>> >>>>>> /var/lib/jenkins/workspace/Trunk/default/tests.st >>>>>> spawning command 0 with timeout 1800 seconds: >>>>>> >>>>> "/tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak" >>>>> "-vm-sound-null" "-vm-display-null" >>>>> >>>>> "/var/lib/jenkins/workspace/Trunk/default/target/SpurPostTestTrunkImage.image" >>>>> "../tests.st" >>>>> >>>>>> (Command started with PID 28643) >>>>>> 2015-08-12T23:31:48.17+01:00: Loading Hudson build tools... from >>>>>> >>>>> /var/lib/jenkins/workspace/Trunk/default/target/HudsonBuildTools.st >>>>> >>>>>> 2015-08-12T23:31:48.388+01:00: Running tests... >>>>>> setsockopt: Protocol not available >>>>>> setsockopt: Protocol not available >>>>>> 28646:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown >>>>>> >>>>> protocol:s23_clnt.c:612: >>>>> >>>>>> Recursive not understood error encountered >>>>>> >>>>>> >>>>>> I bet this is ImageSegment related. >>>>>> >>>>> It sure is. >>>>> >>>>> BitmapStreamTests>testMatrixTransform2x3WithImageSegment >>>>> sends >>>>> BitmapStreamTests>validateImageSegment >>>>> >>>>> Basically the ImageSegment code has been working in Spur on a hope >>>> and a >>>> prayer. The code assumes objects are allocated in chronological order >>>> and >>>> that this order is preserved, not so with Spur. So post image segment >>>> loading someObject/nextObject is used to enumerate the objects loaded. >>>> This can't work reliably in Spur. I *think* (ok I hope) that I've >>>> implemented the segment load primitive in Spur to answer an Array of the >>>> objects loaded, so that these can be explicitly enumerated. >>>> >>>> So the job is a) to check that I have indeed implemented the primitive >>>> to >>>> do this and b) to rewrite the image segment loading code in the light of >>>> this. >>>> >>>> David, this is an example of something that isn't back portable and >>>> should >>>> not be back-ported. >>>> >>>> The most strange thing is that I cannot reproduce this on my Mac??? >>>> >>>>> There the test does not crash the image??? >>>>> >>>>> Well then it may be a signed/unsigned bug in image loading instead. On >>>> linux the image typically gets loaded quite high in the address space >>>> and >>>> so a good portion of the heap ends up above 0x7FFFFFFF, or negative >>>> territory if misinterpreted as signed integers. On Mac and Windows the >>>> image tends to get loaded quite low and so has to be pretty big to fall >>>> foul of signedness issues. >>>> >>>> >>>> Busy right now but will check tomorrow. >>>> >>>> >>>> Best regards >>>>> -Tobias >>>>> >>>>> >>>>> On Wed, Aug 12, 2015 at 5:11 PM, Eliot Miranda < >>>>>> eliot.miranda@gmail.com> >>>>>> >>>>> wrote: >>>>> >>>>>> Hi Tobias, >>>>>> >>>>>> On Wed, Aug 12, 2015 at 12:49 PM, Tobias Pape >>>>>> wrote: >>>>>> >>>>>> On 12.08.2015, at 20:55, Eliot Miranda >>>>>> wrote: >>>>>> >>>>>> Hi All, >>>>>>> >>>>>>> >>>>>>> Fabio's kindly done most of the changes. But some questions >>>>>>> >>>>>> remain for more general discussion. See below. >>>>> >>>>>> Fabio, thanks so much for doing this, and so quickly! >>>>>>> >>>>>>> On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda < >>>>>>> >>>>>> eliot.miranda@gmail.com> wrote: >>>>> >>>>>> Hi All, >>>>>>> >>>>>>> who will update http://squeak.org/downloads/ to include the 5.0 >>>>>>> >>>>>> release? >>>>> >>>>>> a) I suggest that the 5.0 all-in-one have a line in the left-hand >>>>>>> >>>>>> table that includes the 4.6 release and that it precede the 4.6 >>>>> release in >>>>> the list. >>>>> >>>>>> Done. >>>>>>> >>>>>>> >>>>>>> b) the Trunk link points to TrunkImage.zip which contains a non-Spur >>>>>>> >>>>>> image. >>>>> >>>>>> So this is the biggie. What should we do? >>>>>>> >>>>>>> - add a Trunk 5.0 build with a different link? (Noooooo) >>>>>>> >>>>>>> - change http://build.squeak.org/job/SqueakTrunk to build what it >>>>>>> >>>>>> says (Yessss please, who can do this?) >>>>> >>>>>> Done: build.squeak.org/job/Trunk/ >>>>>> But as I said several times, Spur/trunk test just crash for month??? >>>>>> >>>>>> can you point me to the crash? I'm looking at >>>>>> >>>>> http://build.squeak.org/job/Trunk/default/lastBuild/#showFailuresLink >>>>> and see 8 test failures but no crash. >>>>> >>>>>> >>>>>> - add a Squeak 4.6 build job? Is that even worth it any more >>>>>>> >>>>>> considering 4.6 is released and stable? If it is then what should it >>>>> build? David? >>>>> >>>>>> >>>>>>> c) Spur VMs need to be linked to by an added line in the Virtual >>>>>>> >>>>>> Machines list. >>>>> >>>>>> Not applicable. the VM links point to the root of my site so they >>>>>>> >>>>>> effectively point to both old and Spur VMs. >>>>> >>>>>> >>>>>>> d) Spur imagers need to be included in the Image and Changes list >>>>>>> >>>>>> under Custom Installation >>>>> >>>>>> Done. >>>>>>> >>>>>>> >>>>>>> >>>>>>> e) The SqueakV50.sources file also needs to be included in the >>>>>>> >>>>>> Current Sources list. >>>>> >>>>>> Done. >>>>>>> >>>>>>> >>>>>>> f) we could start a History list for the 5.0 line >>>>>>> >>>>>>> This is probably quite a big reorg on the page and not urgent. >>>>>>> >>>>>>> >>>>>>> So there are a few things to fix before 5.0 is freely downloadable. >>>>>>> >>>>>>> On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller >>>>>>> >>>>>> wrote: >>>>> >>>>>> In the 17 months since Squeak 4.5 was released, a huge development >>>>>>> effort took place to create the next generation virtual-machine for >>>>>>> the Squeak / Pharo / Newspeak family of programming systems. Squeak >>>>>>> is the modern incarnation of the Smalltalk-80 programming environment >>>>>>> originally developed at the Xerox PARC. >>>>>>> >>>>>>> "Squeak 5" introduces this new VM and associated new memory model, >>>>>>> collectively referred to as "Spur". Presented [1] by Eliot Miranda >>>>>>> and Cl??ment B??ra at the 2015 International Symposium on Memory >>>>>>> Management, this new VM affords Squeak applications a significant >>>>>>> boost in performance and memory management. Among other >>>>>>> optimizations, the #become operation no longer requires a memory >>>>>>> scan. >>>>>>> Object pinning and ephemerons are also now supported. The release >>>>>>> notes [2] provide more details. >>>>>>> >>>>>>> The new memory model requires a new image file format. Although this >>>>>>> new format results in about a 15% increased memory requirement for >>>>>>> the >>>>>>> same number of 4.x objects, a new segmented heap allows memory to be >>>>>>> given back to the OS when its no longer needed, a great benefit for >>>>>>> application servers. >>>>>>> >>>>>>> As forward compatibility is as important to the Squeak community as >>>>>>> backward compatibility, Squeak 5 is delivers an image with identical >>>>>>> content as the recent 4.6 release. Although this new Squeak 5 VM >>>>>>> cannot open images saved under the prior 4.x Cog format, objects and >>>>>>> code can be easily exported from the 4.x image and then imported into >>>>>>> Squeak 5. Applications whose code runs strictly above the Smalltalk >>>>>>> meta layer will prove remarkably compatible with the new format, most >>>>>>> applications will require no changes whatsotever. >>>>>>> >>>>>>> Squeak 5 is the result of monumental effort by a tiny group of very >>>>>>> talented people, but its also just the beginning of yet a new effort; >>>>>>> Spur is just a stepping stone to a more ambitious goals planned over >>>>>>> the next five years. >>>>>>> >>>>>>> [1] -- A Partial Read Barrier for Efficient Support of Live >>>>>>> Object-oriented Programming >>>>>>> >>>>>>> >>>>> http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming >>>>> >>>>>> [2] -- Squeak 5 Release Notes >>>>>>> http://wiki.squeak.org/squeak/6207 >>>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> >>>> -- >>>> _,,,^..^,,,_ >>>> best, Eliot >>>> >>>> >>> >>> -- >>> _,,,^..^,,,_ >>> best, Eliot >>> >> >> > > -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150819/2f603c0f/attachment-0001.htm From brasspen at gmail.com Thu Aug 20 01:33:37 2015 From: brasspen at gmail.com (Chris Cunnington) Date: Thu Aug 20 01:33:44 2015 Subject: [Vm-dev] Squeak 5 Image Segment Work [was [squeak-dev] [ANN] Squeak 5] In-Reply-To: References: <20150820001229.GB68874@shell.msen.com> <55D52AF9.4090905@gmail.com> Message-ID: <55D52E71.4030405@gmail.com> Sweet. Chris On 2015-08-19 9:31 PM, Mariano Martinez Peck wrote: > Hi guys, > > As part of my PhD thesis I did take a deep look to ImageSegment before > starting with Fuel. I wrote a journal paper about my experiments with > ImageSegment which I thinks provides quite a documentation that is not > written anywhere. Hope it helps: > http://rmod.lille.inria.fr/archives/papers/Mart11c-COMLAN-ObjectSwapping.pdf > > Best, > > > > On Wed, Aug 19, 2015 at 10:18 PM, Chris Cunnington > wrote: > > As I've never seen (even on the wiki) an even halfway decent > demonstration of using an ImageSegment, I'm providing on here. > > hex := Browser allInstances first. > > "let's check what we're saving to compare with later" > (hex buildWith: ToolBuilder default) openInWorld > > exporting := (ImageSegment new copyFromRootsForExport: (Array > with: hex)). > > ?let?s put it on disk? > exporting writeForExport: 'browser.extSeg'. > > "Quit your image without saving. Actually, to get the full > effect go to http://ftp.squeak.org and get a fresh image of the > same kind you exported with. Drag browser.extSeg into the new > image directory" > > ?let?s pull it in from the disk? > importing := (FileDirectory default readOnlyFileNamed: > 'browser.extSeg') fileInObjectAndCode. > > "let's check what we imported to see if it's what we saved" > ((importing originalRoots first) buildWith: ToolBuilder > default) openInWorld > > Chris > > > > On 2015-08-19 8:12 PM, David T. Lewis wrote: > > I think that image segments are a worthwhile idea, regardless > of whether > we are worried about support project saving and other image > conversion > issues. Here is a post by Dan Ingalls from 1999 that > summarizes the work > on image segments at that time: > > http://lists.squeakfoundation.org/pipermail/squeak-dev/1999-October/014604.html > > Dan also mentioned it in "the future of Squeak, 1999": > > http://wiki.squeak.org/squeak/393 > > It is quite clear that saving projects was a proof of concept > to illustrate > what might be done with image segments, but the overall > motivation had more > to do with exploring modularity and mechanisms for delivering > minimal images. > > Tim Rowledge added a comment to that effect here: > > http://lists.squeakfoundation.org/pipermail/squeak-dev/1999-October/014604.html > > I will also note that Spur is not the first time we have > needed to think > about making image segments work on a new image format. When > Dan Ingalls and > Ian Piumarta announced the first 64-bit Squeak image, they > said "We may ask for > help from the Squeak community in converting the remaining > plugins, and also > image segment code." > > http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-August/081383.html > > Quite a few of the things that Dan and Ian asked for help on > have since been > done, but I don't think that image segment support for the > 64-bit image was > among them. With the arrival of Spur, and the upcoming Spur > 64-bit image, it > would be great if we can put some thought and effort into > doing this right. > > $0.02, > > Dave > > > On Wed, Aug 19, 2015 at 02:09:32PM -0700, Eliot Miranda wrote: > > Hi All, but especially Tobias, > > as we know, ImageSegments are broken in Spur. They > work occasionally, > but when stressed the VM ends up crashing. The > fundamental issue is that > the ImageSegment code makes assumptions about object > ordering that Spur > violates. For example, here's ImageSegment's install: > > install > "This operation retrieves the segment if necessary from > file storage, > installs it in memory, and replaces (using become:) all > the root stubs with > the reconstructed roots of the segment." > > | newRoots | > state = #onFile ifTrue: [self readFromFile]. > state = #onFileWithSymbols ifTrue: [self > readFromFileWithSymbols. > endMarker := segment nextObject. "for enumeration of objects" > endMarker == 0 ifTrue: [endMarker := 'End' clone]]. > (state = #active) | (state = #imported) ifFalse: [self > errorWrongState]. > newRoots := self loadSegmentFrom: segment outPointers: > outPointers. > state = #imported > ifTrue: ["just came in from exported file" > arrayOfRoots := newRoots] > ifFalse: [ > arrayOfRoots elementsForwardIdentityTo: newRoots]. > state := #inactive. > Beeper beepPrimitive > > So before the image segment bytes (the segment inst var) > is loaded, the > object after it is assigned to endMarker, and if there > isn't an object > after segment, a new object ('End' clone) is assigned to > endMarker. > > This makes the assumption that objects are allocated in a > strict order, and > therefore endMarker will always be the object after segment. > > Loading the segment via "newRoots := self loadSegmentFrom: > segment > outPointers: outPointers" then turns segment into a > zero-length WordArray > and its contents into the objects loaded by the segment. > Therefore, in the > V3 system, the objects loaded from segment can be > enumerated starting at > segment nextObject and repeating until endMarker is found: > > allObjectsDo: aBlock > "Enumerate all objects that came from this segment. NOTE > this assumes that > the segment was created (and extracted). After the > segment has been > installed (install), this method allows you to enumerate > its objects." > | obj | > > endMarker == nil ifTrue: [ > ^ self error: 'Just extract and install, don''t > writeToFile:']. > segment size ~= 1 ifTrue: [ > ^ self error: 'Vestigial segment size must be 1 (version > word)']. > > obj := segment nextObject. "Start with the next object > after the vestigial > header" > [obj == endMarker] whileFalse: "Stop at the next object > after the full > segment" > [aBlock value: obj. > obj := obj nextObject]. "Step through the objects > installed from the > segment." > > Now, as written, this just won't work in Spur. > > a) the only place where there is any kind of stable order > to objects is in > oldSpace, so segment /has/ to be forced to old space to > have any chance of > its objects being in order when it gets converted from > bytes to objects. > > b) 'End' clone will be in newSpace and so endMarker isn't > reliable unless > it was obtained by segment nextObject when segment was > already in oldSpace. > > So it is perhaps possible to fix ImageSegments in Spur by > forcing segment > to oldSpace and being more careful with endMarker. But I > think there is a > better way. > > If the set of objects the segment contains can be obtained > some how then > this set can be simply enumerated, not depending on > nextObject. The > primitive has to answer the array of roots, so its result > can't be changed > to be the entire array. But segment could be becomed into > an Array of all > the objects in segment prior to it being loaded, in which > case the above > would become > > > install > "This operation retrieves the segment if necessary from > file storage, > installs it in memory, and replaces (using become:) all > the root stubs with > the reconstructed roots of the segment." > > | newRoots | > state = #onFile ifTrue: [self readFromFile]. > state = #onFileWithSymbols ifTrue: > [self readFromFileWithSymbols]. > (state = #active) | (state = #imported) ifFalse: [self > errorWrongState]. > newRoots := self loadSegmentFrom: segment outPointers: > outPointers. > state = #imported > ifTrue: "just came in from exported file" > [arrayOfRoots := newRoots] > ifFalse: > [arrayOfRoots elementsForwardIdentityTo: newRoots]. > state := #inactive. > Beeper beepPrimitive > > allObjectsDo: aBlock > "Enumerate all objects that came from this segment. NOTE > this assumes that > the segment was created (and extracted). After the > segment has been > installed (install), this method allows you to enumerate > its objects." > | obj | > > segment isArray ifFalse: > [^ self error: 'Segment hasn''t been loaded?']. > > segment do: aBlock > > and the endMarker instVar would be deleted. > > I am willing and ready to modify the primitive to convert > the segment > correctly. Who will volunteer to rewrite the image-level > ImageSegment code > to use the new primitive? > > > > On Wed, Aug 12, 2015 at 10:40 PM, Eliot Miranda > > > wrote: > > Hi Tobias, > > On Wed, Aug 12, 2015 at 10:18 PM, Tobias Pape > > wrote: > > Hi all > On 13.08.2015, at 02:15, Eliot Miranda > > wrote: > > Hi Tobias, > > forget that. I found it. THis right? > > Trunk test suite for Spur > Using existing cogspur r.3410 > cp -r > /var/lib/jenkins/workspace/Trunk/default/target/cogspur.r3410 > > /tmp/d20150812-28620-etbikj > > image test suite > VM: > /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak > /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak > > -version > > /var/lib/jenkins/workspace/Trunk/default/tests.st > > spawning command 0 with timeout 1800 seconds: > > "/tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak" > "-vm-sound-null" "-vm-display-null" > "/var/lib/jenkins/workspace/Trunk/default/target/SpurPostTestTrunkImage.image" > "../tests.st " > > (Command started with PID 28643) > 2015-08-12T23:31:48.17+01:00: Loading Hudson > build tools... from > > /var/lib/jenkins/workspace/Trunk/default/target/HudsonBuildTools.st > > 2015-08-12T23:31:48.388+01:00: Running tests... > setsockopt: Protocol not available > setsockopt: Protocol not available > 28646:error:140770FC:SSL > routines:SSL23_GET_SERVER_HELLO:unknown > > protocol:s23_clnt.c:612: > > Recursive not understood error encountered > > > I bet this is ImageSegment related. > > It sure is. > > BitmapStreamTests>testMatrixTransform2x3WithImageSegment > sends > BitmapStreamTests>validateImageSegment > > Basically the ImageSegment code has been working in > Spur on a hope and a > prayer. The code assumes objects are allocated in > chronological order and > that this order is preserved, not so with Spur. So > post image segment > loading someObject/nextObject is used to enumerate the > objects loaded. > This can't work reliably in Spur. I *think* (ok I > hope) that I've > implemented the segment load primitive in Spur to > answer an Array of the > objects loaded, so that these can be explicitly > enumerated. > > So the job is a) to check that I have indeed > implemented the primitive to > do this and b) to rewrite the image segment loading > code in the light of > this. > > David, this is an example of something that isn't back > portable and should > not be back-ported. > > The most strange thing is that I cannot reproduce this > on my Mac??? > > There the test does not crash the image??? > > Well then it may be a signed/unsigned bug in image > loading instead. On > linux the image typically gets loaded quite high in > the address space and > so a good portion of the heap ends up above > 0x7FFFFFFF, or negative > territory if misinterpreted as signed integers. On Mac > and Windows the > image tends to get loaded quite low and so has to be > pretty big to fall > foul of signedness issues. > > > Busy right now but will check tomorrow. > > > Best regards > -Tobias > > > On Wed, Aug 12, 2015 at 5:11 PM, Eliot Miranda > > > > wrote: > > Hi Tobias, > > On Wed, Aug 12, 2015 at 12:49 PM, Tobias Pape > > > wrote: > > On 12.08.2015, at 20:55, Eliot Miranda > > wrote: > > Hi All, > > > Fabio's kindly done most of the > changes. But some questions > > remain for more general discussion. See below. > > Fabio, thanks so much for doing this, and > so quickly! > > On Tue, Aug 11, 2015 at 8:51 PM, Eliot > Miranda < > > eliot.miranda@gmail.com > > wrote: > > Hi All, > > who will update > http://squeak.org/downloads/ to include > the 5.0 > > release? > > a) I suggest that the 5.0 all-in-one have > a line in the left-hand > > table that includes the 4.6 release and that it > precede the 4.6 release in > the list. > > Done. > > > b) the Trunk link points to TrunkImage.zip > which contains a non-Spur > > image. > > So this is the biggie. What should we do? > > - add a Trunk 5.0 build with a different > link? (Noooooo) > > - change > http://build.squeak.org/job/SqueakTrunk to > build what it > > says (Yessss please, who can do this?) > > Done: build.squeak.org/job/Trunk/ > > But as I said several times, Spur/trunk test > just crash for month??? > > can you point me to the crash? I'm looking at > > http://build.squeak.org/job/Trunk/default/lastBuild/#showFailuresLink > and see 8 test failures but no crash. > > > - add a Squeak 4.6 build job? Is that > even worth it any more > > considering 4.6 is released and stable? If it is > then what should it > build? David? > > > c) Spur VMs need to be linked to by an > added line in the Virtual > > Machines list. > > Not applicable. the VM links point to the > root of my site so they > > effectively point to both old and Spur VMs. > > > d) Spur imagers need to be included in the > Image and Changes list > > under Custom Installation > > Done. > > > > e) The SqueakV50.sources file also needs > to be included in the > > Current Sources list. > > Done. > > > f) we could start a History list for the > 5.0 line > > This is probably quite a big reorg on the > page and not urgent. > > > So there are a few things to fix before > 5.0 is freely downloadable. > > On Tue, Aug 11, 2015 at 8:23 PM, Chris > Muller > > > wrote: > > In the 17 months since Squeak 4.5 was > released, a huge development > effort took place to create the next > generation virtual-machine for > the Squeak / Pharo / Newspeak family of > programming systems. Squeak > is the modern incarnation of the > Smalltalk-80 programming environment > originally developed at the Xerox PARC. > > "Squeak 5" introduces this new VM and > associated new memory model, > collectively referred to as "Spur". > Presented [1] by Eliot Miranda > and Cl??ment B??ra at the 2015 > International Symposium on Memory > Management, this new VM affords Squeak > applications a significant > boost in performance and memory > management. Among other > optimizations, the #become operation no > longer requires a memory scan. > Object pinning and ephemerons are also now > supported. The release > notes [2] provide more details. > > The new memory model requires a new image > file format. Although this > new format results in about a 15% > increased memory requirement for the > same number of 4.x objects, a new > segmented heap allows memory to be > given back to the OS when its no longer > needed, a great benefit for > application servers. > > As forward compatibility is as important > to the Squeak community as > backward compatibility, Squeak 5 is > delivers an image with identical > content as the recent 4.6 release. > Although this new Squeak 5 VM > cannot open images saved under the prior > 4.x Cog format, objects and > code can be easily exported from the 4.x > image and then imported into > Squeak 5. Applications whose code runs > strictly above the Smalltalk > meta layer will prove remarkably > compatible with the new format, most > applications will require no changes > whatsotever. > > Squeak 5 is the result of monumental > effort by a tiny group of very > talented people, but its also just the > beginning of yet a new effort; > Spur is just a stepping stone to a more > ambitious goals planned over > the next five years. > > [1] -- A Partial Read Barrier for > Efficient Support of Live > Object-oriented Programming > > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming > > [2] -- Squeak 5 Release Notes > http://wiki.squeak.org/squeak/6207 > > > > > > > -- > _,,,^..^,,,_ > best, Eliot > > > > -- > _,,,^..^,,,_ > best, Eliot > > > > > > > > -- > Mariano > http://marianopeck.wordpress.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150819/41db2a7d/attachment.htm From lewis at mail.msen.com Thu Aug 20 04:00:33 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Aug 20 04:00:37 2015 Subject: [Vm-dev] Squeak 5 Image Segment Work [was [squeak-dev] [ANN] Squeak 5] In-Reply-To: References: <20150820001229.GB68874@shell.msen.com> <55D52AF9.4090905@gmail.com> Message-ID: <20150820040033.GA1129@shell.msen.com> On Wed, Aug 19, 2015 at 10:31:00PM -0300, Mariano Martinez Peck wrote: > > Hi guys, > > As part of my PhD thesis I did take a deep look to ImageSegment before > starting with Fuel. I wrote a journal paper about my experiments with > ImageSegment which I thinks provides quite a documentation that is not > written anywhere. Hope it helps: > http://rmod.lille.inria.fr/archives/papers/Mart11c-COMLAN-ObjectSwapping.pdf Hi Mariano, Thanks for the reference to your ObjectSwapping.pdf paper. I think that it provides a very helpful overview. As an aside, we hold regular meetings of the Squeak oversight board, which as you might expect sometimes diverge into discussion of technical issues of one sort or another. In discussion earlier today, Eliot referred to your Fuel implementation as "Parcels done right" and I agreed that I think it may help with implementing image segments on new image formats (Spur, 32/64 bit images). Personally, I like Fuel because it is easy to read and understand. I would encourage folks to read the ObjectSwapping paper and also to consider helping with implementation of image segments on Spur images. Mariano's paper provides good documentation on the topic. Dave From Das.Linux at gmx.de Thu Aug 20 13:38:03 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Aug 20 13:38:07 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: References: <1439679369.9270.2@mglap> <161882DC-F291-4B33-9DD7-D59965C1E1D8@gmx.de> Message-ID: <21A4269A-4424-4A39-8B6C-8043391E12FC@gmx.de> Hey On 19.08.2015, at 17:34, Levente Uzonyi wrote: > I see the following issues here (latest Trunk image): > > 1. Glyphs for non-ascii (asciiValue >= 256) characters are shown as a black rectangle. I see. and I don't know why :( > > 2. FontImporterTool doesn't see fonts in the subdirectories of the base font directory. Because of this, there's only one font on the list for me. No, that's not the reason for only one font. The importer tries to group families of typefaces into one font and displays them as a group. > > 3. FontImporterTool doesn't use the selected font in the preview panel. It surely does; but if you have a group selected, it will only display one of its faces. Best -Tobias Can you give a screenshot? > > Levente > > On Wed, 19 Aug 2015, Tobias Pape wrote: > >> Hi Mateusz >> >> On 16.08.2015, at 00:56, Mateusz Grotek wrote: >> >>> Hi, >>> First of all thank you for the new version of Squeak. It's really great. >>> >>> Special thanks for Tobias and Marcel for the font import tool! It works perfectly. >>> >>> Nevertheless I have noticed that there is a regression in Squeak 4.6/5.0 in the font handling. It's not possible anymore to use non-english characters even after loading a font that contains them (I've changed the code font and tried to use the characters in a workspace). Can anyone verify? >> >> It is somewhat strange, >> I imported Arial Unicode (the whole stuff) and, yes some characters did not show up, >> but others (such as ?) did. I don't know yet _where_ the problem is. Although >> I've written the importer, I still lack some knowledge to debug this behavior. >> >> Best regards >> -Tobias From Das.Linux at gmx.de Thu Aug 20 13:59:24 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Aug 20 13:59:29 2015 Subject: [squeak-dev] Seaside 64-bit In-Reply-To: References: Message-ID: <2EAA52D3-C1DC-4794-AC22-D46BCDB954E9@gmx.de> Hi Chris Sorry that this is a rather late email. On 07.08.2015, at 17:14, Chris Cunnington wrote: > Hi Tobias, > > It's none of my business what is or is not on squeak.org. But you're statement is kind of confusing to me, so for the sake of my own clarity of mind, I've deduced the following. Here are the two side by side: > > "squeak.org/projects page" > > Installer squeaksource project: 'MetacelloRepository'; install: 'ConfigurationOfSeaside3'. > (Smalltalk at: #ConfigurationOfSeaside3) load. > This is correct and maintained. > "Menu>>Extending The System" > > (Installer ss project: 'MetacelloRepository') install: 'ConfigurationOfSeaside30'. > (Smalltalk at: #ConfigurationOfSeaside30) load. > (Smalltalk at: #WAPharoServerAdaptorBrowser) open. This is outdated. > > You will notice that in MetacelloRepository there is both ConfigurationOfSeaside30 and ConfigurationOfSeaside3. The former has its last entry on 10 Sept. 2013. The later has its first entry at 25 Sept. 2013. It's first entry message from Esteban Lorenzano is instructive: > > "- 3.1 was not loading any adaptor. Added Seaside-Adaptor (not tested outside Pharo)" > > It looks to me like ConfigurationOfSeaside3 is better suited for Pharo and ConfigurationOfSeaside30 is better suited to Squeak. This is supported by the inclusion of ConfigurationOfSeaside30 in Menu>>ExtendingTheSystem which is already proven to work. No no no. ConfigurationOfSeaside30 is unmaintained as of now. By default, ConfigurationOfSeaside3 has _no_ adaptor, as the installation cannot know, whether you want, FastCGI, Comanche, Comet, or WebServer. That's why it has to be explicit. Also, by default it does not load the dev tools, which is ok, as the Config is used for automated testing and deployment. There is, however, a 'OneClick' group that loads a lot of interesting stuff: #('Development' 'Welcome' 'RSS-Examples' 'Seaside-Email' 'Seaside-Examples' 'Seaside-Tools-Web' 'WebClient') (where WebClient would load a usable adaptor!) That's how I built the 4.4-Seaside-3.0.8 AllInOne (http://ftp.squeak.org/4.4/seaside/) That's why the correct version for Squeak 4.5/5.0 is ==== (Installer repository: 'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main') install: 'ConfigurationOfSeaside3'. ((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) load. "Or ((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) load: 'OneClick' for the jumpstart experience " ==== and for the website it's ==== Metacello new configuration: 'Seaside3'; repository: 'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main'; version: #stable; load: 'OneClick'. "Make sure you have Metacello installed." ==== Best regards -Tobias PS: If I find time after my vacation, I'll probably build a 5.0-Seaside-3.2 AIO? From Das.Linux at gmx.de Thu Aug 20 14:18:31 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Aug 20 14:18:36 2015 Subject: [Vm-dev] [squeak-dev] SqueakSSL + SAN certificates In-Reply-To: References: <20150601235713.GA68046@shell.msen.com> Message-ID: <5D97A777-231F-4047-9A58-CC6D47BAFB96@gmx.de> Hi again (hi sven) On 02.06.2015, at 05:56, Levente Uzonyi wrote: > Hi David, > > There's a debate about how SAN certificates - and server name verification in general - should be handled[1][2]. > I tend to agree with Tobias on verifying the server name in the plugin, but getting there will require further efforts - especially on the unix platform. > > While this version solves a particular case, and is backwards compatible on the image side, I think we should look for a better, more general solution. I have sketched an Idea how to handle verification in SqueakSSL in general (and briefly presented to Bert), I'm not yet sure, however, and I'm on vacation the next two weeks. But after that I'd like to spark a discussion (hoepfully including Sven, for Zodiac) that will involve: a) no manual verification. Period. b) fail on non-verification. c) optional 'unverified' mode that has to be requested explicitly d) Moving the Unix platform code to libtls (easier to understand) That's my 2ct for now, more in September. Best regards -Tobias > > Levente > > [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2015-May/184613.html > [2] http://lists.squeakfoundation.org/pipermail/squeak-dev/2015-May/184631.html > > On Mon, 1 Jun 2015, David T. Lewis wrote: > >> >> Hi Levente, >> >> Regarding your VM changes for SqueakSSL, shall I commit these to the SVN >> trunk repository? Ian delegated access to platforms/unix so that I can do >> that for you if you like. >> >> We have several Mantis entries to track your SqueakSSL work: >> >> http://bugs.squeak.org/view.php?id=7751 (Add SSL plugin) >> http://bugs.squeak.org/view.php?id=7793 (Memory leak in the SqueakSSL plugin on unix) >> http://bugs.squeak.org/view.php?id=7824 (Add TLS SNI Server Name Indication support to SqueakSSL plugin) >> >> Your latest version http://leves.web.elte.hu/squeak/SqueakSSL/ adds >> the SAN certificates support, so I think we should commit your latest >> version and close the Mantis issues. >> >> If you agree I will update the SVN files. >> >> Thanks, >> Dave >> >> p.s. There are still issues in SqueakSSL when sizeof(sqInt) is 8 >> (64 bit images) but that is a separate discussion. >> >> >> >> On Tue, May 26, 2015 at 11:55:42PM +0200, Levente Uzonyi wrote: >>> Hi All, >>> >>> I've implemented support for reading the domain names from the >>> certificate's SAN extension[1] in SqueakSSL. >>> The image side code is in the Inbox[2]. It is backwards compatible -- >>> everything works as before without the VM changes. >>> I've also uploaded the modified files[3][4] for the unix platform, and a >>> diff[5] (which somehow doesn't include the changes of the .h file). >>> >>> The VM support code for other platforms are to be done. >>> >>> These changes fix the failing SqueakSSL test in the Trunk, so I suggest >>> including the .mcz file in the 4.6 release. >>> >>> Levente >>> >>> [1] https://en.wikipedia.org/wiki/SubjectAltName >>> [2] >>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2015-May/184581.html >>> [3] http://leves.web.elte.hu/squeak/SqueakSSL/SqueakSSL.h >>> [4] http://leves.web.elte.hu/squeak/SqueakSSL/sqUnixOpenSSL.c >>> [5] http://leves.web.elte.hu/squeak/SqueakSSL/diff.txt From brasspen at gmail.com Thu Aug 20 14:20:54 2015 From: brasspen at gmail.com (Chris Cunnington) Date: Thu Aug 20 14:20:57 2015 Subject: [squeak-dev] Seaside 64-bit In-Reply-To: <2EAA52D3-C1DC-4794-AC22-D46BCDB954E9@gmx.de> References: <2EAA52D3-C1DC-4794-AC22-D46BCDB954E9@gmx.de> Message-ID: <9B9CD094-D3B7-445C-98C1-C76F5E0982E5@gmail.com> > On Aug 20, 2015, at 9:59 AM, Tobias Pape wrote: > > PS: If I find time after my vacation, I'll probably build a 5.0-Seaside-3.2 AIO? These scripts look great. Thanks. If you could find the time to build an image, I?m sure that would be popular. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150820/c5e7b42b/attachment.htm From Das.Linux at gmx.de Thu Aug 20 14:37:40 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Aug 20 14:37:45 2015 Subject: ImageSegments and some OT (was: Re: Squeak 5 Image Segment Work [was [squeak-dev] [ANN] Squeak 5]) In-Reply-To: References: Message-ID: <5D38AA88-F353-4198-AEF2-213BC285FF33@gmx.de> Hi all, On 19.08.2015, at 23:09, Eliot Miranda wrote: > Hi All, but especially Tobias, just for reference, I only had time to skim this mail. I'll work through it more in-depth in September (vacation upcoming, sorry). Also, I like Fuel as a way forward. I'd also like to deprecate DataStreams in favor of Fuel[1], I also had a prototype of Fuel-based Monticello packages which loaded much faster for large packages? Best regards -Tobias [1]: PS: Hi Pharo folks, MCDataStream will break with Spur, Have a look at System-topa.741 unil System-topa.473 in the Squeak trunk or the attached change set, YMMV tho. -------------- next part -------------- A non-text attachment was scrubbed... Name: SpurDataStreamChanges.1.cs Type: application/octet-stream Size: 5725 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150820/74e652b3/SpurDataStreamChanges.1-0001.obj -------------- next part -------------- > > as we know, ImageSegments are broken in Spur. They work occasionally, but when stressed the VM ends up crashing. The fundamental issue is that the ImageSegment code makes assumptions about object ordering that Spur violates. For example, here's ImageSegment's install: > > install > "This operation retrieves the segment if necessary from file storage, installs it in memory, and replaces (using become:) all the root stubs with the reconstructed roots of the segment." > > | newRoots | > state = #onFile ifTrue: [self readFromFile]. > state = #onFileWithSymbols ifTrue: [self readFromFileWithSymbols. > endMarker := segment nextObject. "for enumeration of objects" > endMarker == 0 ifTrue: [endMarker := 'End' clone]]. > (state = #active) | (state = #imported) ifFalse: [self errorWrongState]. > newRoots := self loadSegmentFrom: segment outPointers: outPointers. > state = #imported > ifTrue: ["just came in from exported file" > arrayOfRoots := newRoots] > ifFalse: [ > arrayOfRoots elementsForwardIdentityTo: newRoots]. > state := #inactive. > Beeper beepPrimitive > > So before the image segment bytes (the segment inst var) is loaded, the object after it is assigned to endMarker, and if there isn't an object after segment, a new object ('End' clone) is assigned to endMarker. > > This makes the assumption that objects are allocated in a strict order, and therefore endMarker will always be the object after segment. > > Loading the segment via "newRoots := self loadSegmentFrom: segment outPointers: outPointers" then turns segment into a zero-length WordArray and its contents into the objects loaded by the segment. Therefore, in the V3 system, the objects loaded from segment can be enumerated starting at segment nextObject and repeating until endMarker is found: > > allObjectsDo: aBlock > "Enumerate all objects that came from this segment. NOTE this assumes that the segment was created (and extracted). After the segment has been installed (install), this method allows you to enumerate its objects." > | obj | > > endMarker == nil ifTrue: [ > ^ self error: 'Just extract and install, don''t writeToFile:']. > segment size ~= 1 ifTrue: [ > ^ self error: 'Vestigial segment size must be 1 (version word)']. > > obj := segment nextObject. "Start with the next object after the vestigial header" > [obj == endMarker] whileFalse: "Stop at the next object after the full segment" > [aBlock value: obj. > obj := obj nextObject]. "Step through the objects installed from the segment." > > Now, as written, this just won't work in Spur. > > a) the only place where there is any kind of stable order to objects is in oldSpace, so segment /has/ to be forced to old space to have any chance of its objects being in order when it gets converted from bytes to objects. > > b) 'End' clone will be in newSpace and so endMarker isn't reliable unless it was obtained by segment nextObject when segment was already in oldSpace. > > So it is perhaps possible to fix ImageSegments in Spur by forcing segment to oldSpace and being more careful with endMarker. But I think there is a better way. > > If the set of objects the segment contains can be obtained some how then this set can be simply enumerated, not depending on nextObject. The primitive has to answer the array of roots, so its result can't be changed to be the entire array. But segment could be becomed into an Array of all the objects in segment prior to it being loaded, in which case the above would become > > > install > "This operation retrieves the segment if necessary from file storage, installs it in memory, and replaces (using become:) all the root stubs with the reconstructed roots of the segment." > > | newRoots | > state = #onFile ifTrue: [self readFromFile]. > state = #onFileWithSymbols ifTrue: > [self readFromFileWithSymbols]. > (state = #active) | (state = #imported) ifFalse: [self errorWrongState]. > newRoots := self loadSegmentFrom: segment outPointers: outPointers. > state = #imported > ifTrue: "just came in from exported file" > [arrayOfRoots := newRoots] > ifFalse: > [arrayOfRoots elementsForwardIdentityTo: newRoots]. > state := #inactive. > Beeper beepPrimitive > > allObjectsDo: aBlock > "Enumerate all objects that came from this segment. NOTE this assumes that the segment was created (and extracted). After the segment has been installed (install), this method allows you to enumerate its objects." > | obj | > > segment isArray ifFalse: > [^ self error: 'Segment hasn''t been loaded?']. > > segment do: aBlock > > and the endMarker instVar would be deleted. > > I am willing and ready to modify the primitive to convert the segment correctly. Who will volunteer to rewrite the image-level ImageSegment code to use the new primitive? > > > > On Wed, Aug 12, 2015 at 10:40 PM, Eliot Miranda wrote: > Hi Tobias, > > On Wed, Aug 12, 2015 at 10:18 PM, Tobias Pape wrote: > Hi all > On 13.08.2015, at 02:15, Eliot Miranda wrote: > > > Hi Tobias, > > > > forget that. I found it. THis right? > > > > Trunk test suite for Spur > > Using existing cogspur r.3410 > > cp -r /var/lib/jenkins/workspace/Trunk/default/target/cogspur.r3410 /tmp/d20150812-28620-etbikj > > image test suite > > VM: /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak > > /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak -version > > /var/lib/jenkins/workspace/Trunk/default/tests.st > > spawning command 0 with timeout 1800 seconds: "/tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak" "-vm-sound-null" "-vm-display-null" "/var/lib/jenkins/workspace/Trunk/default/target/SpurPostTestTrunkImage.image" "../tests.st" > > (Command started with PID 28643) > > 2015-08-12T23:31:48.17+01:00: Loading Hudson build tools... from /var/lib/jenkins/workspace/Trunk/default/target/HudsonBuildTools.st > > 2015-08-12T23:31:48.388+01:00: Running tests... > > setsockopt: Protocol not available > > setsockopt: Protocol not available > > 28646:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:612: > > > > Recursive not understood error encountered > > > > > > I bet this is ImageSegment related. > > It sure is. > > BitmapStreamTests>testMatrixTransform2x3WithImageSegment > sends > BitmapStreamTests>validateImageSegment > > Basically the ImageSegment code has been working in Spur on a hope and a prayer. The code assumes objects are allocated in chronological order and that this order is preserved, not so with Spur. So post image segment loading someObject/nextObject is used to enumerate the objects loaded. This can't work reliably in Spur. I *think* (ok I hope) that I've implemented the segment load primitive in Spur to answer an Array of the objects loaded, so that these can be explicitly enumerated. > > So the job is a) to check that I have indeed implemented the primitive to do this and b) to rewrite the image segment loading code in the light of this. > > David, this is an example of something that isn't back portable and should not be back-ported. > > The most strange thing is that I cannot reproduce this on my Mac? > There the test does not crash the image? > > Well then it may be a signed/unsigned bug in image loading instead. On linux the image typically gets loaded quite high in the address space and so a good portion of the heap ends up above 0x7FFFFFFF, or negative territory if misinterpreted as signed integers. On Mac and Windows the image tends to get loaded quite low and so has to be pretty big to fall foul of signedness issues. > > > Busy right now but will check tomorrow. > > > Best regards > -Tobias > > > > > > On Wed, Aug 12, 2015 at 5:11 PM, Eliot Miranda wrote: > > Hi Tobias, > > > > On Wed, Aug 12, 2015 at 12:49 PM, Tobias Pape wrote: > > > > On 12.08.2015, at 20:55, Eliot Miranda wrote: > > > > > Hi All, > > > > > > > > > Fabio's kindly done most of the changes. But some questions remain for more general discussion. See below. > > > > > > Fabio, thanks so much for doing this, and so quickly! > > > > > > On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda wrote: > > > Hi All, > > > > > > who will update http://squeak.org/downloads/ to include the 5.0 release? > > > > > > a) I suggest that the 5.0 all-in-one have a line in the left-hand table that includes the 4.6 release and that it precede the 4.6 release in the list. > > > > > > Done. > > > > > > > > > b) the Trunk link points to TrunkImage.zip which contains a non-Spur image. > > > > > > So this is the biggie. What should we do? > > > > > > - add a Trunk 5.0 build with a different link? (Noooooo) > > > > > > - change http://build.squeak.org/job/SqueakTrunk to build what it says (Yessss please, who can do this?) > > > > Done: build.squeak.org/job/Trunk/ > > But as I said several times, Spur/trunk test just crash for month? > > > > can you point me to the crash? I'm looking at http://build.squeak.org/job/Trunk/default/lastBuild/#showFailuresLink and see 8 test failures but no crash. > > > > > > > > > > - add a Squeak 4.6 build job? Is that even worth it any more considering 4.6 is released and stable? If it is then what should it build? David? > > > > > > > > > c) Spur VMs need to be linked to by an added line in the Virtual Machines list. > > > > > > Not applicable. the VM links point to the root of my site so they effectively point to both old and Spur VMs. > > > > > > > > > d) Spur imagers need to be included in the Image and Changes list under Custom Installation > > > > > > Done. > > > > > > > > > > > > e) The SqueakV50.sources file also needs to be included in the Current Sources list. > > > > > > Done. > > > > > > > > > f) we could start a History list for the 5.0 line > > > > > > This is probably quite a big reorg on the page and not urgent. > > > > > > > > > So there are a few things to fix before 5.0 is freely downloadable. > > > > > > On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller wrote: > > > In the 17 months since Squeak 4.5 was released, a huge development > > > effort took place to create the next generation virtual-machine for > > > the Squeak / Pharo / Newspeak family of programming systems. Squeak > > > is the modern incarnation of the Smalltalk-80 programming environment > > > originally developed at the Xerox PARC. > > > > > > "Squeak 5" introduces this new VM and associated new memory model, > > > collectively referred to as "Spur". Presented [1] by Eliot Miranda > > > and Cl?ment B?ra at the 2015 International Symposium on Memory > > > Management, this new VM affords Squeak applications a significant > > > boost in performance and memory management. Among other > > > optimizations, the #become operation no longer requires a memory scan. > > > Object pinning and ephemerons are also now supported. The release > > > notes [2] provide more details. > > > > > > The new memory model requires a new image file format. Although this > > > new format results in about a 15% increased memory requirement for the > > > same number of 4.x objects, a new segmented heap allows memory to be > > > given back to the OS when its no longer needed, a great benefit for > > > application servers. > > > > > > As forward compatibility is as important to the Squeak community as > > > backward compatibility, Squeak 5 is delivers an image with identical > > > content as the recent 4.6 release. Although this new Squeak 5 VM > > > cannot open images saved under the prior 4.x Cog format, objects and > > > code can be easily exported from the 4.x image and then imported into > > > Squeak 5. Applications whose code runs strictly above the Smalltalk > > > meta layer will prove remarkably compatible with the new format, most > > > applications will require no changes whatsotever. > > > > > > Squeak 5 is the result of monumental effort by a tiny group of very > > > talented people, but its also just the beginning of yet a new effort; > > > Spur is just a stepping stone to a more ambitious goals planned over > > > the next five years. > > > > > > [1] -- A Partial Read Barrier for Efficient Support of Live > > > Object-oriented Programming > > > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming > > > > > > [2] -- Squeak 5 Release Notes > > > http://wiki.squeak.org/squeak/6207 From marianopeck at gmail.com Thu Aug 20 14:41:57 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Thu Aug 20 14:42:01 2015 Subject: [Vm-dev] ImageSegments and some OT (was: Re: Squeak 5 Image Segment Work [was [squeak-dev] [ANN] Squeak 5]) In-Reply-To: <5D38AA88-F353-4198-AEF2-213BC285FF33@gmx.de> References: <5D38AA88-F353-4198-AEF2-213BC285FF33@gmx.de> Message-ID: On Thu, Aug 20, 2015 at 11:37 AM, Tobias Pape wrote: > > Hi all, > > On 19.08.2015, at 23:09, Eliot Miranda wrote: > > > Hi All, but especially Tobias, > > just for reference, I only had time to skim this mail. > I'll work through it more in-depth in September (vacation upcoming, sorry). > > Also, I like Fuel as a way forward. I'd also like to deprecate DataStreams > in > favor of Fuel[1], I also had a prototype of Fuel-based Monticello packages > which loaded much faster for large packages? > > Is this similar to Tanker in the way that classes and methods are binary serialized with Fuel? (no compiling) Or you just used Fuel instead of the current usage of MCDataStream? If this is the case, then you would still be compiling at load time etc. We already did this experiment long ago and we didn't find a significant speedup. What were your findings? > Best regards > -Tobias > > > [1]: PS: Hi Pharo folks, MCDataStream will break with Spur, > Have a look at System-topa.741 unil System-topa.473 in the > Squeak trunk or the attached change set, YMMV tho. > > Thanks, > > > > > > > > as we know, ImageSegments are broken in Spur. They work > occasionally, but when stressed the VM ends up crashing. The fundamental > issue is that the ImageSegment code makes assumptions about object ordering > that Spur violates. For example, here's ImageSegment's install: > > > > install > > "This operation retrieves the segment if necessary from file > storage, installs it in memory, and replaces (using become:) all the root > stubs with the reconstructed roots of the segment." > > > > | newRoots | > > state = #onFile ifTrue: [self readFromFile]. > > state = #onFileWithSymbols ifTrue: [self readFromFileWithSymbols. > > endMarker := segment nextObject. "for enumeration > of objects" > > endMarker == 0 ifTrue: [endMarker := 'End' clone]]. > > (state = #active) | (state = #imported) ifFalse: [self > errorWrongState]. > > newRoots := self loadSegmentFrom: segment outPointers: outPointers. > > state = #imported > > ifTrue: ["just came in from exported file" > > arrayOfRoots := newRoots] > > ifFalse: [ > > arrayOfRoots elementsForwardIdentityTo: newRoots]. > > state := #inactive. > > Beeper beepPrimitive > > > > So before the image segment bytes (the segment inst var) is loaded, the > object after it is assigned to endMarker, and if there isn't an object > after segment, a new object ('End' clone) is assigned to endMarker. > > > > This makes the assumption that objects are allocated in a strict order, > and therefore endMarker will always be the object after segment. > > > > Loading the segment via "newRoots := self loadSegmentFrom: segment > outPointers: outPointers" then turns segment into a zero-length WordArray > and its contents into the objects loaded by the segment. Therefore, in the > V3 system, the objects loaded from segment can be enumerated starting at > segment nextObject and repeating until endMarker is found: > > > > allObjectsDo: aBlock > > "Enumerate all objects that came from this segment. NOTE this > assumes that the segment was created (and extracted). After the segment > has been installed (install), this method allows you to enumerate its > objects." > > | obj | > > > > endMarker == nil ifTrue: [ > > ^ self error: 'Just extract and install, don''t > writeToFile:']. > > segment size ~= 1 ifTrue: [ > > ^ self error: 'Vestigial segment size must be 1 (version > word)']. > > > > obj := segment nextObject. "Start with the next object after the > vestigial header" > > [obj == endMarker] whileFalse: "Stop at the next object after the > full segment" > > [aBlock value: obj. > > obj := obj nextObject]. "Step through the objects > installed from the segment." > > > > Now, as written, this just won't work in Spur. > > > > a) the only place where there is any kind of stable order to objects is > in oldSpace, so segment /has/ to be forced to old space to have any chance > of its objects being in order when it gets converted from bytes to objects. > > > > b) 'End' clone will be in newSpace and so endMarker isn't reliable > unless it was obtained by segment nextObject when segment was already in > oldSpace. > > > > So it is perhaps possible to fix ImageSegments in Spur by forcing > segment to oldSpace and being more careful with endMarker. But I think > there is a better way. > > > > If the set of objects the segment contains can be obtained some how then > this set can be simply enumerated, not depending on nextObject. The > primitive has to answer the array of roots, so its result can't be changed > to be the entire array. But segment could be becomed into an Array of all > the objects in segment prior to it being loaded, in which case the above > would become > > > > > > install > > "This operation retrieves the segment if necessary from file > storage, installs it in memory, and replaces (using become:) all the root > stubs with the reconstructed roots of the segment." > > > > | newRoots | > > state = #onFile ifTrue: [self readFromFile]. > > state = #onFileWithSymbols ifTrue: > > [self readFromFileWithSymbols]. > > (state = #active) | (state = #imported) ifFalse: [self > errorWrongState]. > > newRoots := self loadSegmentFrom: segment outPointers: outPointers. > > state = #imported > > ifTrue: "just came in from exported file" > > [arrayOfRoots := newRoots] > > ifFalse: > > [arrayOfRoots elementsForwardIdentityTo: newRoots]. > > state := #inactive. > > Beeper beepPrimitive > > > > allObjectsDo: aBlock > > "Enumerate all objects that came from this segment. NOTE this > assumes that the segment was created (and extracted). After the segment > has been installed (install), this method allows you to enumerate its > objects." > > | obj | > > > > segment isArray ifFalse: > > [^ self error: 'Segment hasn''t been loaded?']. > > > > segment do: aBlock > > > > and the endMarker instVar would be deleted. > > > > I am willing and ready to modify the primitive to convert the segment > correctly. Who will volunteer to rewrite the image-level ImageSegment code > to use the new primitive? > > > > > > > > On Wed, Aug 12, 2015 at 10:40 PM, Eliot Miranda > wrote: > > Hi Tobias, > > > > On Wed, Aug 12, 2015 at 10:18 PM, Tobias Pape wrote: > > Hi all > > On 13.08.2015, at 02:15, Eliot Miranda wrote: > > > > > Hi Tobias, > > > > > > forget that. I found it. THis right? > > > > > > Trunk test suite for Spur > > > Using existing cogspur r.3410 > > > cp -r /var/lib/jenkins/workspace/Trunk/default/target/cogspur.r3410 > /tmp/d20150812-28620-etbikj > > > image test suite > > > VM: /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak > > > /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak > -version > > > /var/lib/jenkins/workspace/Trunk/default/tests.st > > > spawning command 0 with timeout 1800 seconds: > "/tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak" > "-vm-sound-null" "-vm-display-null" > "/var/lib/jenkins/workspace/Trunk/default/target/SpurPostTestTrunkImage.image" > "../tests.st" > > > (Command started with PID 28643) > > > 2015-08-12T23:31:48.17+01:00: Loading Hudson build tools... from > /var/lib/jenkins/workspace/Trunk/default/target/HudsonBuildTools.st > > > 2015-08-12T23:31:48.388+01:00: Running tests... > > > setsockopt: Protocol not available > > > setsockopt: Protocol not available > > > 28646:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown > protocol:s23_clnt.c:612: > > > > > > Recursive not understood error encountered > > > > > > > > > I bet this is ImageSegment related. > > > > It sure is. > > > > BitmapStreamTests>testMatrixTransform2x3WithImageSegment > > sends > > BitmapStreamTests>validateImageSegment > > > > Basically the ImageSegment code has been working in Spur on a hope and > a prayer. The code assumes objects are allocated in chronological order > and that this order is preserved, not so with Spur. So post image segment > loading someObject/nextObject is used to enumerate the objects loaded. > This can't work reliably in Spur. I *think* (ok I hope) that I've > implemented the segment load primitive in Spur to answer an Array of the > objects loaded, so that these can be explicitly enumerated. > > > > So the job is a) to check that I have indeed implemented the primitive > to do this and b) to rewrite the image segment loading code in the light of > this. > > > > David, this is an example of something that isn't back portable and > should not be back-ported. > > > > The most strange thing is that I cannot reproduce this on my Mac? > > There the test does not crash the image? > > > > Well then it may be a signed/unsigned bug in image loading instead. On > linux the image typically gets loaded quite high in the address space and > so a good portion of the heap ends up above 0x7FFFFFFF, or negative > territory if misinterpreted as signed integers. On Mac and Windows the > image tends to get loaded quite low and so has to be pretty big to fall > foul of signedness issues. > > > > > > Busy right now but will check tomorrow. > > > > > > Best regards > > -Tobias > > > > > > > > > > On Wed, Aug 12, 2015 at 5:11 PM, Eliot Miranda < > eliot.miranda@gmail.com> wrote: > > > Hi Tobias, > > > > > > On Wed, Aug 12, 2015 at 12:49 PM, Tobias Pape > wrote: > > > > > > On 12.08.2015, at 20:55, Eliot Miranda > wrote: > > > > > > > Hi All, > > > > > > > > > > > > Fabio's kindly done most of the changes. But some questions > remain for more general discussion. See below. > > > > > > > > Fabio, thanks so much for doing this, and so quickly! > > > > > > > > On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda < > eliot.miranda@gmail.com> wrote: > > > > Hi All, > > > > > > > > who will update http://squeak.org/downloads/ to include the 5.0 > release? > > > > > > > > a) I suggest that the 5.0 all-in-one have a line in the left-hand > table that includes the 4.6 release and that it precede the 4.6 release in > the list. > > > > > > > > Done. > > > > > > > > > > > > b) the Trunk link points to TrunkImage.zip which contains a non-Spur > image. > > > > > > > > So this is the biggie. What should we do? > > > > > > > > - add a Trunk 5.0 build with a different link? (Noooooo) > > > > > > > > - change http://build.squeak.org/job/SqueakTrunk to build what it > says (Yessss please, who can do this?) > > > > > > Done: build.squeak.org/job/Trunk/ > > > But as I said several times, Spur/trunk test just crash for month? > > > > > > can you point me to the crash? I'm looking at > http://build.squeak.org/job/Trunk/default/lastBuild/#showFailuresLink and > see 8 test failures but no crash. > > > > > > > > > > > > > > - add a Squeak 4.6 build job? Is that even worth it any more > considering 4.6 is released and stable? If it is then what should it > build? David? > > > > > > > > > > > > c) Spur VMs need to be linked to by an added line in the Virtual > Machines list. > > > > > > > > Not applicable. the VM links point to the root of my site so they > effectively point to both old and Spur VMs. > > > > > > > > > > > > d) Spur imagers need to be included in the Image and Changes list > under Custom Installation > > > > > > > > Done. > > > > > > > > > > > > > > > > e) The SqueakV50.sources file also needs to be included in the > Current Sources list. > > > > > > > > Done. > > > > > > > > > > > > f) we could start a History list for the 5.0 line > > > > > > > > This is probably quite a big reorg on the page and not urgent. > > > > > > > > > > > > So there are a few things to fix before 5.0 is freely downloadable. > > > > > > > > On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller > wrote: > > > > In the 17 months since Squeak 4.5 was released, a huge development > > > > effort took place to create the next generation virtual-machine for > > > > the Squeak / Pharo / Newspeak family of programming systems. Squeak > > > > is the modern incarnation of the Smalltalk-80 programming environment > > > > originally developed at the Xerox PARC. > > > > > > > > "Squeak 5" introduces this new VM and associated new memory model, > > > > collectively referred to as "Spur". Presented [1] by Eliot Miranda > > > > and Cl?ment B?ra at the 2015 International Symposium on Memory > > > > Management, this new VM affords Squeak applications a significant > > > > boost in performance and memory management. Among other > > > > optimizations, the #become operation no longer requires a memory > scan. > > > > Object pinning and ephemerons are also now supported. The release > > > > notes [2] provide more details. > > > > > > > > The new memory model requires a new image file format. Although this > > > > new format results in about a 15% increased memory requirement for > the > > > > same number of 4.x objects, a new segmented heap allows memory to be > > > > given back to the OS when its no longer needed, a great benefit for > > > > application servers. > > > > > > > > As forward compatibility is as important to the Squeak community as > > > > backward compatibility, Squeak 5 is delivers an image with identical > > > > content as the recent 4.6 release. Although this new Squeak 5 VM > > > > cannot open images saved under the prior 4.x Cog format, objects and > > > > code can be easily exported from the 4.x image and then imported into > > > > Squeak 5. Applications whose code runs strictly above the Smalltalk > > > > meta layer will prove remarkably compatible with the new format, most > > > > applications will require no changes whatsotever. > > > > > > > > Squeak 5 is the result of monumental effort by a tiny group of very > > > > talented people, but its also just the beginning of yet a new effort; > > > > Spur is just a stepping stone to a more ambitious goals planned over > > > > the next five years. > > > > > > > > [1] -- A Partial Read Barrier for Efficient Support of Live > > > > Object-oriented Programming > > > > > http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming > > > > > > > > [2] -- Squeak 5 Release Notes > > > > http://wiki.squeak.org/squeak/6207 > > > > > -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150820/77d82276/attachment.htm From Das.Linux at gmx.de Thu Aug 20 14:47:42 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Aug 20 14:47:53 2015 Subject: [Pharo-dev] [Vm-dev] ImageSegments and some OT (was: Re: Squeak 5 Image Segment Work [was [squeak-dev] [ANN] Squeak 5]) In-Reply-To: References: <5D38AA88-F353-4198-AEF2-213BC285FF33@gmx.de> Message-ID: <0426B5D3-137F-45B3-B3BA-B0EDCFE043F6@gmx.de> Hi Mariano, On 20.08.2015, at 16:41, Mariano Martinez Peck wrote: > [?] > Is this similar to Tanker in the way that classes and methods are binary serialized with Fuel? (no compiling) > Or you just used Fuel instead of the current usage of MCDataStream? If this is the case, then you would still be compiling at load time etc. We already did this experiment long ago and we didn't find a significant speedup. > > What were your findings? [?] Well that was 4 years ago: http://forum.world.st/Monticello-enhancing-td4179277.html And I don't remember too well, just my feeling that it was a lot faster by replacing the DataStream blob with a fuel blob (so, no, not like Tanker). (No actual numbers written down, tho, sorry) Best regards -Tobia From marianopeck at gmail.com Thu Aug 20 14:53:26 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Thu Aug 20 14:53:29 2015 Subject: [Pharo-dev] [Vm-dev] ImageSegments and some OT (was: Re: Squeak 5 Image Segment Work [was [squeak-dev] [ANN] Squeak 5]) In-Reply-To: <0426B5D3-137F-45B3-B3BA-B0EDCFE043F6@gmx.de> References: <5D38AA88-F353-4198-AEF2-213BC285FF33@gmx.de> <0426B5D3-137F-45B3-B3BA-B0EDCFE043F6@gmx.de> Message-ID: On Thu, Aug 20, 2015 at 11:47 AM, Tobias Pape wrote: > Hi Mariano, > > On 20.08.2015, at 16:41, Mariano Martinez Peck > wrote: > > [?] > > Is this similar to Tanker in the way that classes and methods are binary > serialized with Fuel? (no compiling) > > Or you just used Fuel instead of the current usage of MCDataStream? If > this is the case, then you would still be compiling at load time etc. We > already did this experiment long ago and we didn't find a significant > speedup. > > > > What were your findings? > [?] > Well that was 4 years ago: > http://forum.world.st/Monticello-enhancing-td4179277.html > And I don't remember too well, just my feeling that it was a lot faster by > replacing > the DataStream blob with a fuel blob (so, no, not like Tanker). > (No actual numbers written down, tho, sorry) > > OK, that's what I imagined. Yes, we did the same experiment too. As said, we haven't seen an speed up there because even if Fuel would be 100x faster writing that blob, the writing of that blob was insignificant in a Monticello load. Most of the time when loading with Monticello goes into the parsing/compiling, the class building thingies (may involve became: to update instances), the notifications, etc.. In fact, one of the things we found is that: - just having a bulk notification (and update all the observers) would speed up things (have you ever tried loading with Monticello with TestRunner opened???? takes a lifetime!) - Spur would help us with the lazy become when updating instances So probably maybe with those 2 things we already see an speedup even if we still compile from source... -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150820/45bba066/attachment.htm From pdebruic at gmail.com Thu Aug 20 17:45:20 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Thu Aug 20 17:49:42 2015 Subject: [squeak-dev] Re: Seaside 64-bit In-Reply-To: <2EAA52D3-C1DC-4794-AC22-D46BCDB954E9@gmx.de> References: <2EAA52D3-C1DC-4794-AC22-D46BCDB954E9@gmx.de> Message-ID: <1440092720146-4844609.post@n4.nabble.com> We've got to get the default platform attributes on Squeak updated for 4.6 and 5.0 before Seaside will load properly. I've started a thread on the Metacello list: http://forum.world.st/MetacelloSqueakPlatform-gt-gt-defaultPlatformAttributes-needs-an-update-td4844596.html Tobias Pape wrote > Hi Chris > > Sorry that this is a rather late email. > > On 07.08.2015, at 17:14, Chris Cunnington < > brasspen@ > > wrote: > >> Hi Tobias, >> > >> It's none of my business what is or is not on squeak.org. But you're >> statement is kind of confusing to me, so for the sake of my own clarity >> of mind, I've deduced the following. Here are the two side by side: >> >> "squeak.org/projects page" >> >> Installer squeaksource project: 'MetacelloRepository'; install: >> 'ConfigurationOfSeaside3'. >> (Smalltalk at: #ConfigurationOfSeaside3) load. >> > > This is correct and maintained. > >> "Menu>>Extending The System" >> >> (Installer ss project: 'MetacelloRepository') install: >> 'ConfigurationOfSeaside30'. >> (Smalltalk at: #ConfigurationOfSeaside30) load. >> (Smalltalk at: #WAPharoServerAdaptorBrowser) open. > > This is outdated. > >> >> You will notice that in MetacelloRepository there is both >> ConfigurationOfSeaside30 and ConfigurationOfSeaside3. The former has its >> last entry on 10 Sept. 2013. The later has its first entry at 25 Sept. >> 2013. It's first entry message from Esteban Lorenzano is instructive: >> >> "- 3.1 was not loading any adaptor. Added Seaside-Adaptor (not tested >> outside Pharo)" >> >> It looks to me like ConfigurationOfSeaside3 is better suited for Pharo >> and ConfigurationOfSeaside30 is better suited to Squeak. This is >> supported by the inclusion of ConfigurationOfSeaside30 in >> Menu>>ExtendingTheSystem which is already proven to work. > > No no no. ConfigurationOfSeaside30 is unmaintained as of now. > By default, ConfigurationOfSeaside3 has _no_ adaptor, as the installation > cannot know, > whether you want, FastCGI, Comanche, Comet, or WebServer. That's why it > has to be explicit. > > Also, by default it does not load the dev tools, which is ok, as the > Config is used for > automated testing and deployment. > > There is, however, a 'OneClick' group that loads a lot of interesting > stuff: > > #('Development' 'Welcome' 'RSS-Examples' 'Seaside-Email' > 'Seaside-Examples' 'Seaside-Tools-Web' 'WebClient') > > (where WebClient would load a usable adaptor!) > That's how I built the 4.4-Seaside-3.0.8 AllInOne > (http://ftp.squeak.org/4.4/seaside/) > > > That's why the correct version for Squeak 4.5/5.0 is > > ==== > (Installer repository: > 'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main') > install: 'ConfigurationOfSeaside3'. > ((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) load. > "Or > ((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) > load: 'OneClick' > for the jumpstart experience > " > ==== > > and for the website it's > > ==== > Metacello new > configuration: 'Seaside3'; > repository: > 'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main'; > version: #stable; > load: 'OneClick'. > "Make sure you have Metacello installed." > ==== > > Best regards > -Tobias > > PS: If I find time after my vacation, I'll probably build a > 5.0-Seaside-3.2 AIO? -- View this message in context: http://forum.world.st/Seaside-64-bit-tp4841507p4844609.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From dale.henrichs at gemtalksystems.com Thu Aug 20 18:58:38 2015 From: dale.henrichs at gemtalksystems.com (Dale Henrichs) Date: Thu Aug 20 18:58:42 2015 Subject: [squeak-dev] Re: Seaside 64-bit In-Reply-To: <1440092720146-4844609.post@n4.nabble.com> References: <2EAA52D3-C1DC-4794-AC22-D46BCDB954E9@gmx.de> <1440092720146-4844609.post@n4.nabble.com> Message-ID: <55D6235E.800@gemtalksystems.com> Chris and Paul ... Since both of you will be at the PDX Camp Smalltalk, we could take a crack at that this weekend ... if you want:) Dale On 08/20/2015 10:45 AM, Paul DeBruicker wrote: > We've got to get the default platform attributes on Squeak updated for 4.6 > and 5.0 before Seaside will load properly. I've started a thread on the > Metacello list: > http://forum.world.st/MetacelloSqueakPlatform-gt-gt-defaultPlatformAttributes-needs-an-update-td4844596.html > > > > > > Tobias Pape wrote >> Hi Chris >> >> Sorry that this is a rather late email. >> >> On 07.08.2015, at 17:14, Chris Cunnington < >> brasspen@ >> > wrote: >> >>> Hi Tobias, >>> >>> It's none of my business what is or is not on squeak.org. But you're >>> statement is kind of confusing to me, so for the sake of my own clarity >>> of mind, I've deduced the following. Here are the two side by side: >>> >>> "squeak.org/projects page" >>> >>> Installer squeaksource project: 'MetacelloRepository'; install: >>> 'ConfigurationOfSeaside3'. >>> (Smalltalk at: #ConfigurationOfSeaside3) load. >>> >> This is correct and maintained. >> >>> "Menu>>Extending The System" >>> >>> (Installer ss project: 'MetacelloRepository') install: >>> 'ConfigurationOfSeaside30'. >>> (Smalltalk at: #ConfigurationOfSeaside30) load. >>> (Smalltalk at: #WAPharoServerAdaptorBrowser) open. >> This is outdated. >> >>> You will notice that in MetacelloRepository there is both >>> ConfigurationOfSeaside30 and ConfigurationOfSeaside3. The former has its >>> last entry on 10 Sept. 2013. The later has its first entry at 25 Sept. >>> 2013. It's first entry message from Esteban Lorenzano is instructive: >>> >>> "- 3.1 was not loading any adaptor. Added Seaside-Adaptor (not tested >>> outside Pharo)" >>> >>> It looks to me like ConfigurationOfSeaside3 is better suited for Pharo >>> and ConfigurationOfSeaside30 is better suited to Squeak. This is >>> supported by the inclusion of ConfigurationOfSeaside30 in >>> Menu>>ExtendingTheSystem which is already proven to work. >> No no no. ConfigurationOfSeaside30 is unmaintained as of now. >> By default, ConfigurationOfSeaside3 has _no_ adaptor, as the installation >> cannot know, >> whether you want, FastCGI, Comanche, Comet, or WebServer. That's why it >> has to be explicit. >> >> Also, by default it does not load the dev tools, which is ok, as the >> Config is used for >> automated testing and deployment. >> >> There is, however, a 'OneClick' group that loads a lot of interesting >> stuff: >> >> #('Development' 'Welcome' 'RSS-Examples' 'Seaside-Email' >> 'Seaside-Examples' 'Seaside-Tools-Web' 'WebClient') >> >> (where WebClient would load a usable adaptor!) >> That's how I built the 4.4-Seaside-3.0.8 AllInOne >> (http://ftp.squeak.org/4.4/seaside/) >> >> >> That's why the correct version for Squeak 4.5/5.0 is >> >> ==== >> (Installer repository: >> 'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main') >> install: 'ConfigurationOfSeaside3'. >> ((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) load. >> "Or >> ((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) >> load: 'OneClick' >> for the jumpstart experience >> " >> ==== >> >> and for the website it's >> >> ==== >> Metacello new >> configuration: 'Seaside3'; >> repository: >> 'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main'; >> version: #stable; >> load: 'OneClick'. >> "Make sure you have Metacello installed." >> ==== >> >> Best regards >> -Tobias >> >> PS: If I find time after my vacation, I'll probably build a >> 5.0-Seaside-3.2 AIO? > > > > > -- > View this message in context: http://forum.world.st/Seaside-64-bit-tp4841507p4844609.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From brasspen at gmail.com Thu Aug 20 20:04:36 2015 From: brasspen at gmail.com (Chris Cunnington) Date: Thu Aug 20 20:04:47 2015 Subject: [squeak-dev] Re: Seaside 64-bit In-Reply-To: <55D6235E.800@gemtalksystems.com> References: <2EAA52D3-C1DC-4794-AC22-D46BCDB954E9@gmx.de> <1440092720146-4844609.post@n4.nabble.com> <55D6235E.800@gemtalksystems.com> Message-ID: <4E0A53D6-31E2-4BB5-92D0-F11EA569FC0D@gmail.com> Great. Let?s do that. I?m in Dallas at the moment. En route. People here wearing cowboy hats like the mean it. Chris > On Aug 20, 2015, at 1:58 PM, Dale Henrichs wrote: > > Chris and Paul ... Since both of you will be at the PDX Camp Smalltalk, we could take a crack at that this weekend ... if you want:) > > Dale > > On 08/20/2015 10:45 AM, Paul DeBruicker wrote: >> We've got to get the default platform attributes on Squeak updated for 4.6 >> and 5.0 before Seaside will load properly. I've started a thread on the >> Metacello list: >> http://forum.world.st/MetacelloSqueakPlatform-gt-gt-defaultPlatformAttributes-needs-an-update-td4844596.html >> >> >> >> >> >> Tobias Pape wrote >>> Hi Chris >>> >>> Sorry that this is a rather late email. >>> >>> On 07.08.2015, at 17:14, Chris Cunnington < >>> brasspen@ >>> > wrote: >>> >>>> Hi Tobias, >>>> >>>> It's none of my business what is or is not on squeak.org. But you're >>>> statement is kind of confusing to me, so for the sake of my own clarity >>>> of mind, I've deduced the following. Here are the two side by side: >>>> >>>> "squeak.org/projects page" >>>> >>>> Installer squeaksource project: 'MetacelloRepository'; install: >>>> 'ConfigurationOfSeaside3'. >>>> (Smalltalk at: #ConfigurationOfSeaside3) load. >>>> >>> This is correct and maintained. >>> >>>> "Menu>>Extending The System" >>>> >>>> (Installer ss project: 'MetacelloRepository') install: >>>> 'ConfigurationOfSeaside30'. >>>> (Smalltalk at: #ConfigurationOfSeaside30) load. >>>> (Smalltalk at: #WAPharoServerAdaptorBrowser) open. >>> This is outdated. >>> >>>> You will notice that in MetacelloRepository there is both >>>> ConfigurationOfSeaside30 and ConfigurationOfSeaside3. The former has its >>>> last entry on 10 Sept. 2013. The later has its first entry at 25 Sept. >>>> 2013. It's first entry message from Esteban Lorenzano is instructive: >>>> >>>> "- 3.1 was not loading any adaptor. Added Seaside-Adaptor (not tested >>>> outside Pharo)" >>>> >>>> It looks to me like ConfigurationOfSeaside3 is better suited for Pharo >>>> and ConfigurationOfSeaside30 is better suited to Squeak. This is >>>> supported by the inclusion of ConfigurationOfSeaside30 in >>>> Menu>>ExtendingTheSystem which is already proven to work. >>> No no no. ConfigurationOfSeaside30 is unmaintained as of now. >>> By default, ConfigurationOfSeaside3 has _no_ adaptor, as the installation >>> cannot know, >>> whether you want, FastCGI, Comanche, Comet, or WebServer. That's why it >>> has to be explicit. >>> >>> Also, by default it does not load the dev tools, which is ok, as the >>> Config is used for >>> automated testing and deployment. >>> >>> There is, however, a 'OneClick' group that loads a lot of interesting >>> stuff: >>> >>> #('Development' 'Welcome' 'RSS-Examples' 'Seaside-Email' >>> 'Seaside-Examples' 'Seaside-Tools-Web' 'WebClient') >>> >>> (where WebClient would load a usable adaptor!) >>> That's how I built the 4.4-Seaside-3.0.8 AllInOne >>> (http://ftp.squeak.org/4.4/seaside/) >>> >>> >>> That's why the correct version for Squeak 4.5/5.0 is >>> >>> ==== >>> (Installer repository: >>> 'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main') >>> install: 'ConfigurationOfSeaside3'. >>> ((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) load. >>> "Or >>> ((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) >>> load: 'OneClick' >>> for the jumpstart experience >>> " >>> ==== >>> >>> and for the website it's >>> >>> ==== >>> Metacello new >>> configuration: 'Seaside3'; >>> repository: >>> 'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main'; >>> version: #stable; >>> load: 'OneClick'. >>> "Make sure you have Metacello installed." >>> ==== >>> >>> Best regards >>> -Tobias >>> >>> PS: If I find time after my vacation, I'll probably build a >>> 5.0-Seaside-3.2 AIO? >> >> >> >> >> -- >> View this message in context: http://forum.world.st/Seaside-64-bit-tp4841507p4844609.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> > > From commits at source.squeak.org Thu Aug 20 23:17:52 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 20 23:17:53 2015 Subject: [squeak-dev] The Trunk: Collections-ul.643.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.643.mcz ==================== Summary ==================== Name: Collections-ul.643 Author: ul Time: 20 August 2015, 9:08:27.692 pm UUID: 12dbac56-4a90-45c3-8987-3ceb621a1c58 Ancestors: Collections-ul.642 String: - reuse the code of #indexOf:startingAt: from #indexOf: and #indexOf:startingAt:ifAbsent: ByteArray: - use the fast primitive for #indexOf:* the same way it is done in String =============== Diff against Collections-ul.642 =============== Item was added: + ----- Method: ByteArray>>indexOf: (in category 'accessing') ----- + indexOf: anInteger + + ^self indexOf: anInteger startingAt: 1! Item was changed: ----- Method: ByteArray>>indexOf:startingAt: (in category 'accessing') ----- indexOf: anInteger startingAt: start + anInteger isInteger ifFalse: [ ^0 ]. + 0 <= anInteger ifFalse: [ ^0 ]. + anInteger <= 255 ifFalse: [ ^0 ]. - (anInteger isInteger and: [ - anInteger >= 0 and: [ - anInteger <= 255 ] ]) ifFalse: [ ^0 ]. ^ByteString indexOfAscii: anInteger inString: self startingAt: start! Item was added: + ----- Method: ByteArray>>indexOf:startingAt:ifAbsent: (in category 'accessing') ----- + indexOf: anInteger startingAt: start ifAbsent: aBlock + + | index | + (index := self indexOf: anInteger startingAt: start) = 0 ifTrue: [ ^aBlock value ]. + ^index! Item was changed: ----- Method: String>>indexOf: (in category 'accessing') ----- indexOf: aCharacter + ^self indexOf: aCharacter startingAt: 1 - aCharacter isCharacter ifFalse: [^ 0]. - ^ self class - indexOfAscii: aCharacter asciiValue - inString: self - startingAt: 1. ! Item was changed: ----- Method: String>>indexOf:startingAt:ifAbsent: (in category 'accessing') ----- indexOf: aCharacter startingAt: start ifAbsent: aBlock + + | index | + (index := self indexOf: aCharacter startingAt: start) = 0 ifTrue: [ ^aBlock value ]. + ^index! - | ans | - (aCharacter isCharacter) ifFalse: [ ^ aBlock value ]. - ans := self class indexOfAscii: aCharacter asciiValue inString: self startingAt: start. - ans = 0 - ifTrue: [ ^ aBlock value ] - ifFalse: [ ^ ans ]! From commits at source.squeak.org Thu Aug 20 23:18:20 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 20 23:18:22 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.943.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.943.mcz ==================== Summary ==================== Name: Kernel-ul.943 Author: ul Time: 20 August 2015, 9:09:05.27 pm UUID: 4d28b73f-2520-4b9a-80f5-6fc7fbbad549 Ancestors: Kernel-ul.942 - expose Integer's LowBitPerByteTable =============== Diff against Kernel-ul.942 =============== Item was added: + ----- Method: Integer class>>lowBitPerByteTable (in category 'class initialization') ----- + lowBitPerByteTable + + ^LowBitPerByteTable! From leves at elte.hu Thu Aug 20 23:53:47 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Aug 20 23:53:51 2015 Subject: ImageSegmentTest crashes (was: Re: Jenkins/Trunk/Spur (was: Re: [squeak-dev] The Trunk: SMLoader-ul.83.mcz)) In-Reply-To: <9FC5435F-FEFF-4F2F-8DFF-32B64AA9B359@gmx.de> References: <48A6619A-0CCF-4BCB-9AF1-EEC6E7341345@gmx.de> <9FC5435F-FEFF-4F2F-8DFF-32B64AA9B359@gmx.de> Message-ID: Hi All, Today I learned that ImageSegmentTest unloads and reloads the "non-active" UIManagers from the image. Since ImageSegments are broken in Spur, the reload will (may?) be partial. In my image this results in "half-loaded" methods: the methods don't get reinstalled into the MethodDictionary, but their selectors are loaded. It usually happens to MVCUIManager >> #dialogStringFromQuery:withTitle:, and sometimes happens to DummyUIManager's methods as well. The result is a broken MethodDictionary, which can easily be the cause of the VM crashes, and a broken Symbol table, because the selector's name is a non-interned Symbol. I think we should disable ImageSegmentTest >> #testImageSegmentsShouldBeWritableToaFile until ImageSegments get fixed in Spur, and/or modify the test to unload/reload transient classes instead of ones which may be used in the future. Levente On Sat, 15 Aug 2015, Tobias Pape wrote: > Hi Levente, > > On 15.08.2015, at 11:16, Levente Uzonyi wrote: > >> Hi Tobias, >> >> Thanks for pointing it out. I thought Bert made some changes which ensure that such dependencies don't require a separate update map. I tested the update process on my machine, and it worked for me. >> Anyway, I've modified the last update map to load Collections-ul.641 before other packages related to this change. >> Btw, am I right that Jenkins is still using a non-Spur image to run the tests? > > The traditional Job is non-Spur: > > http://build.squeak.org/job/SqueakTrunk/ > > The 'old' Spur job > > ~~http://build.squeak.org/job/SqueakTrunkOnSpur/~~ > > is gone (it didn't work most of the time). > > There's a new Trunk job that is Spur-based: > > http://build.squeak.org/job/Trunk/ > > But it still crashes the VM in some image segment code. See > related messages with Eliot. > > Best regards > -Tobias > >> >> On Sat, 15 Aug 2015, Tobias Pape wrote: >> >>> >>> On 14.08.2015, at 20:33, commits@source.squeak.org wrote: >>> >>>> Levente Uzonyi uploaded a new version of SMLoader to project The Trunk: >>>> http://source.squeak.org/trunk/SMLoader-ul.83.mcz >>>> >>>> ==================== Summary ==================== >>>> >>>> Name: SMLoader-ul.83 >>>> Author: ul >>>> Time: 14 August 2015, 7:02:58.782 pm >>>> UUID: 4898c13c-15f3-4ed8-867a-df8d79905124 >>>> Ancestors: SMLoader-mt.82 >>>> >>>> #includesSubString: -> #includesSubstring: >>>> >>>> =============== Diff against SMLoader-mt.82 =============== >>>> >>>> Item was changed: >>> >>> Hi. The Trunk says: >>> >>> http://build.squeak.org/job/Trunk/default/10/ >>> >>> 2015-08-14T22:46:37.575+01:00: Installing Tools-ul.630 >>> 2015-08-14T22:46:37.645+01:00: Installing Protocols-ul.49 >>> 2015-08-14T22:46:37.71+01:00: Installing SMLoader-ul.83 >>> vvvvvvvvvvvvvvvvvv MessageNotUnderstood: ByteString>>includesSubstring: vvvvvvvvvvvvvvvvvv >>> The time is 2015-08-14T22:46:37.743+01:00 >>> ByteString(Object)>>doesNotUnderstand: #includesSubstring: >>> [] in [] in SMLoaderPlus class>>initialize >>> OrderedCollection>>select: >>> >>> >>> That's Strange? >>> >>> >>> Best regards >>> -Tobias > > > > From unoduetre at poczta.onet.pl Fri Aug 21 00:51:37 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Fri Aug 21 00:50:44 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: <21A4269A-4424-4A39-8B6C-8043391E12FC@gmx.de> (from Das.Linux@gmx.de on Thu Aug 20 14:38:03 2015) References: <1439679369.9270.2@mglap> <161882DC-F291-4B33-9DD7-D59965C1E1D8@gmx.de> <21A4269A-4424-4A39-8B6C-8043391E12FC@gmx.de> Message-ID: <1440118297.13037.6@mglap> Screenshot 1 -------------- next part -------------- A non-text attachment was scrubbed... Name: codepage.png Type: image/png Size: 16940 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150821/484e9958/codepage-0001.png From unoduetre at poczta.onet.pl Fri Aug 21 00:51:37 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Fri Aug 21 00:51:43 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: <21A4269A-4424-4A39-8B6C-8043391E12FC@gmx.de> (from Das.Linux@gmx.de on Thu Aug 20 14:38:03 2015) References: <1439679369.9270.2@mglap> <161882DC-F291-4B33-9DD7-D59965C1E1D8@gmx.de> <21A4269A-4424-4A39-8B6C-8043391E12FC@gmx.de> Message-ID: <1440118297.13037.6@mglap> Screenshot 1 -------------- next part -------------- A non-text attachment was scrubbed... Name: codepage.png Type: image/png Size: 16940 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150821/484e9958/codepage-0002.png From unoduetre at poczta.onet.pl Fri Aug 21 00:51:37 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Fri Aug 21 00:52:03 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: <21A4269A-4424-4A39-8B6C-8043391E12FC@gmx.de> (from Das.Linux@gmx.de on Thu Aug 20 14:38:03 2015) References: <1439679369.9270.2@mglap> <161882DC-F291-4B33-9DD7-D59965C1E1D8@gmx.de> <21A4269A-4424-4A39-8B6C-8043391E12FC@gmx.de> Message-ID: <1440118297.13037.6@mglap> Screenshot 1 -------------- next part -------------- A non-text attachment was scrubbed... Name: codepage.png Type: image/png Size: 16940 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150821/484e9958/codepage-0003.png From unoduetre at poczta.onet.pl Fri Aug 21 00:51:55 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Fri Aug 21 00:52:08 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: <21A4269A-4424-4A39-8B6C-8043391E12FC@gmx.de> (from Das.Linux@gmx.de on Thu Aug 20 14:38:03 2015) References: <1439679369.9270.2@mglap> <161882DC-F291-4B33-9DD7-D59965C1E1D8@gmx.de> <21A4269A-4424-4A39-8B6C-8043391E12FC@gmx.de> Message-ID: <1440118315.13037.7@mglap> Screenshot 2 -------------- next part -------------- A non-text attachment was scrubbed... Name: fontimporter.png Type: image/png Size: 54397 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150821/7cd59a66/fontimporter-0001.png From unoduetre at poczta.onet.pl Fri Aug 21 00:51:37 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Fri Aug 21 00:52:46 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: <21A4269A-4424-4A39-8B6C-8043391E12FC@gmx.de> (from Das.Linux@gmx.de on Thu Aug 20 14:38:03 2015) References: <1439679369.9270.2@mglap> <161882DC-F291-4B33-9DD7-D59965C1E1D8@gmx.de> <21A4269A-4424-4A39-8B6C-8043391E12FC@gmx.de> Message-ID: <1440118297.13037.6@mglap> Screenshot 1 -------------- next part -------------- A non-text attachment was scrubbed... Name: codepage.png Type: image/png Size: 16940 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150821/484e9958/codepage-0006.png From unoduetre at poczta.onet.pl Fri Aug 21 01:07:32 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Fri Aug 21 01:05:00 2015 Subject: [squeak-dev] Sorry for spamming Message-ID: <1440119252.13037.8@mglap> Hi, Sorry for spamming the list. :-( It wasn't on purpose. Mateusz From eliot.miranda at gmail.com Fri Aug 21 04:25:20 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Aug 21 04:25:23 2015 Subject: [squeak-dev] Questionable comment In-Reply-To: References: Message-ID: Hi Chris, On Wed, Aug 19, 2015 at 1:06 PM, Chris Cunningham wrote: > well, not questionable - bad. > > (in ByteArray) > > long64At: index > "Answer a 64-bit integer in Smalltalk order (little-endian)." > | n1 n2 | > n1 := self unsignedLongAt: index bigEndian: true. > n2 := self unsignedLongAt: index+4 bigEndian: true. > > These are obviously bigEndian now, nto litte-endian. > > Does this mean Smalltalk order (or now Squeak order) has changed? > This is not for general purpose. The method is part of VMMaker. Let's take it to vm-dev. It's a simple mistake. If you look at long64At:put: you'll see the comment is correct: long64At: index put: val "I store 64-bit integers in Smalltalk (little-endian) order." self unsignedLongAt: index put: (val bitAnd: 16rFFFFFFFF) bigEndian: false. self unsignedLongAt: index+4 put: (val bitShift: -32) bigEndian: false. ^val Thanks for finding this! > -cbc > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150820/11017423/attachment.htm From marcus.denker at inria.fr Fri Aug 21 05:46:26 2015 From: marcus.denker at inria.fr (Marcus Denker) Date: Fri Aug 21 05:46:31 2015 Subject: [Pharo-dev] ImageSegments and some OT (was: Re: Squeak 5 Image Segment Work [was [squeak-dev] [ANN] Squeak 5]) In-Reply-To: <5D38AA88-F353-4198-AEF2-213BC285FF33@gmx.de> References: <5D38AA88-F353-4198-AEF2-213BC285FF33@gmx.de> Message-ID: <7EFF127D-D3E4-4BCC-8084-634C45624F58@inria.fr> > On 20 Aug 2015, at 16:37, Tobias Pape wrote: > > Hi all, > > On 19.08.2015, at 23:09, Eliot Miranda wrote: > >> Hi All, but especially Tobias, > > just for reference, I only had time to skim this mail. > I'll work through it more in-depth in September (vacation upcoming, sorry). > > Also, I like Fuel as a way forward. I'd also like to deprecate DataStreams in > favor of Fuel[1], I also had a prototype of Fuel-based Monticello packages > which loaded much faster for large packages? > > Best regards > -Tobias > > > [1]: PS: Hi Pharo folks, MCDataStream will break with Spur, > Have a look at System-topa.741 unil System-topa.473 in the > Squeak trunk or the attached change set, YMMV tho. > Very nice! yes, back when we cleanup the 4+ different serialisers we decided to not go Fuel for Monticello for staying compatible. We therefore just took a simplified DataStream and added it as MCDataStream to Monticello itself. It would be nice to retire that once and for all! Marcus From Das.Linux at gmx.de Fri Aug 21 06:25:51 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Aug 21 06:25:56 2015 Subject: ImageSegmentTest crashes (was: Re: Jenkins/Trunk/Spur (was: Re: [squeak-dev] The Trunk: SMLoader-ul.83.mcz)) In-Reply-To: References: <48A6619A-0CCF-4BCB-9AF1-EEC6E7341345@gmx.de> <9FC5435F-FEFF-4F2F-8DFF-32B64AA9B359@gmx.de> Message-ID: Hi, On 21.08.2015, at 01:53, Levente Uzonyi wrote: > Hi All, > > Today I learned that ImageSegmentTest unloads and reloads the "non-active" UIManagers from the image. Since ImageSegments are broken in Spur, the reload will (may?) be partial. In my image this results in "half-loaded" methods: the methods don't get reinstalled into the MethodDictionary, but their selectors are loaded. It usually happens to MVCUIManager >> #dialogStringFromQuery:withTitle:, and sometimes happens to DummyUIManager's methods as well. > > The result is a broken MethodDictionary, which can easily be the cause of the VM crashes, and a broken Symbol table, because the selector's name is a non-interned Symbol. > > I think we should disable ImageSegmentTest >> #testImageSegmentsShouldBeWritableToaFile until ImageSegments get fixed in Spur, and/or modify the test to unload/reload transient classes instead of ones which may be used in the future. Thank you for tracking this down! I really wondered why the methods disappeared. Best regards -Tobias > > Levente > > On Sat, 15 Aug 2015, Tobias Pape wrote: > >> Hi Levente, >> >> On 15.08.2015, at 11:16, Levente Uzonyi wrote: >> >>> Hi Tobias, >>> >>> Thanks for pointing it out. I thought Bert made some changes which ensure that such dependencies don't require a separate update map. I tested the update process on my machine, and it worked for me. >>> Anyway, I've modified the last update map to load Collections-ul.641 before other packages related to this change. >>> Btw, am I right that Jenkins is still using a non-Spur image to run the tests? >> >> The traditional Job is non-Spur: >> >> http://build.squeak.org/job/SqueakTrunk/ >> >> The 'old' Spur job >> >> ~~http://build.squeak.org/job/SqueakTrunkOnSpur/~~ >> >> is gone (it didn't work most of the time). >> >> There's a new Trunk job that is Spur-based: >> >> http://build.squeak.org/job/Trunk/ >> >> But it still crashes the VM in some image segment code. See >> related messages with Eliot. >> >> Best regards >> -Tobias >> >>> >>> On Sat, 15 Aug 2015, Tobias Pape wrote: >>> >>>> >>>> On 14.08.2015, at 20:33, commits@source.squeak.org wrote: >>>> >>>>> Levente Uzonyi uploaded a new version of SMLoader to project The Trunk: >>>>> http://source.squeak.org/trunk/SMLoader-ul.83.mcz >>>>> >>>>> ==================== Summary ==================== >>>>> >>>>> Name: SMLoader-ul.83 >>>>> Author: ul >>>>> Time: 14 August 2015, 7:02:58.782 pm >>>>> UUID: 4898c13c-15f3-4ed8-867a-df8d79905124 >>>>> Ancestors: SMLoader-mt.82 >>>>> >>>>> #includesSubString: -> #includesSubstring: >>>>> >>>>> =============== Diff against SMLoader-mt.82 =============== >>>>> >>>>> Item was changed: >>>> >>>> Hi. The Trunk says: >>>> >>>> http://build.squeak.org/job/Trunk/default/10/ >>>> >>>> 2015-08-14T22:46:37.575+01:00: Installing Tools-ul.630 >>>> 2015-08-14T22:46:37.645+01:00: Installing Protocols-ul.49 >>>> 2015-08-14T22:46:37.71+01:00: Installing SMLoader-ul.83 >>>> vvvvvvvvvvvvvvvvvv MessageNotUnderstood: ByteString>>includesSubstring: vvvvvvvvvvvvvvvvvv >>>> The time is 2015-08-14T22:46:37.743+01:00 >>>> ByteString(Object)>>doesNotUnderstand: #includesSubstring: >>>> [] in [] in SMLoaderPlus class>>initialize >>>> OrderedCollection>>select: >>>> >>>> >>>> That's Strange? >>>> >>>> >>>> Best regards >>>> -Tobias From commits at source.squeak.org Fri Aug 21 07:48:35 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 21 07:48:36 2015 Subject: [squeak-dev] The Trunk: Tests-topa.323.mcz Message-ID: Tobias Pape uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-topa.323.mcz ==================== Summary ==================== Name: Tests-topa.323 Author: topa Time: 21 August 2015, 9:48:23.161 am UUID: 9af92c13-5958-47d9-b187-343ee211b1cc Ancestors: Tests-topa.322 Disable ImageSegment tests on Spur for now, they are expected to not run currently. =============== Diff against Tests-topa.322 =============== Item was added: + ----- Method: ImageSegmentTest class>>testSelectors (in category 'Accessing') ----- + testSelectors + + Smalltalk isRunningSpur ifTrue: [ + "The ImageSegment Test is known to not work on SPUR VMs + with the prospect of crashing. #expectedFailure does not cut it here, + don't even try to run them" + ^ #()]. + ^ super testSelectors! Item was changed: + ----- Method: ImageSegmentTest>>testImageSegmentsShouldBeWritableToaFile (in category 'testing') ----- - ----- Method: ImageSegmentTest>>testImageSegmentsShouldBeWritableToaFile (in category 'as yet unclassified') ----- testImageSegmentsShouldBeWritableToaFile "This should not throw an exception" | classes | classes := UIManager subclasses reject: [:sc| sc isActiveManager]. ImageSegment new copyFromRoots: classes asArray sizeHint: 100; extract; writeToFile: 'InactiveUIManagers'; yourself. "TODO: write assertions showing that something meaningful actually happened." "now bring them back in again" classes do: [:ea| ea new]! From commits at source.squeak.org Fri Aug 21 08:01:50 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 21 08:01:51 2015 Subject: [squeak-dev] The Trunk: SqueakSSL-Tests-topa.19.mcz Message-ID: Tobias Pape uploaded a new version of SqueakSSL-Tests to project The Trunk: http://source.squeak.org/trunk/SqueakSSL-Tests-topa.19.mcz ==================== Summary ==================== Name: SqueakSSL-Tests-topa.19 Author: topa Time: 21 August 2015, 10:01:44.036 am UUID: 1263e0c7-7c4c-40e7-ba8f-796a374c9cc8 Ancestors: SqueakSSL-Tests-ul.18 Remove Yahoo OpenID test. Endpoint is gone with no replacement. =============== Diff against SqueakSSL-Tests-ul.18 =============== Item was removed: - ----- Method: SqueakSSLTest>>testYahooOpenID (in category 'tests') ----- - testYahooOpenID - "Yahoo sends an SSL shutdown sequence which we didn't handle in the past. - Also, there were some issues with SecureSocketStream that were unearthed - by using it via WebClient's chunking method (not easy to reproduce without WC)." - - Smalltalk at: #WebClient ifPresent:[:webClient| - self shouldnt:[ - [webClient httpGet: 'https://open.login.yahoo.com/openid/op/auth'] - "Allow certificate errors on the Mac since cert validation isn't - implemented yet." - on: SqueakSSLCertificateError do:[:ex| - SqueakSSL platformName = 'Mac OS' - ifTrue:[ex resume] - ifFalse:[ex pass]]. - ] raise: Error. - ].. - ! From commits at source.squeak.org Fri Aug 21 08:45:53 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 21 08:45:55 2015 Subject: [squeak-dev] The Trunk: Tests-topa.324.mcz Message-ID: Tobias Pape uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-topa.324.mcz ==================== Summary ==================== Name: Tests-topa.324 Author: topa Time: 21 August 2015, 10:45:39.512 am UUID: 89d84ad2-fa6c-45a0-83b2-82c9b72396ac Ancestors: Tests-topa.323 As with the ImageSegmentTest so with the ImageSegment-based BitmapTest =============== Diff against Tests-topa.323 =============== Item was added: + ----- Method: BitmapStreamTests class>>testSelectors (in category 'Accessing') ----- + testSelectors + "The ImageSegment-based Bitmap Test is known to not work on SPUR VMs + with the prospect of crashing. #expectedFailure does not cut it here, + don't even try to run them" + ^ super testSelectors copyWithout: #testMatrixTransform2x3WithImageSegment! From Das.Linux at gmx.de Fri Aug 21 08:51:33 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Aug 21 08:51:38 2015 Subject: [squeak-dev] Trunk Job Jenkins is working now Message-ID: <3AD896C4-A6F5-4D8D-B774-8B31591CF9F3@gmx.de> Hi all, our jenkins is 'back to normal' and can test and archive our trunk. The basis for trunk now is the image http://ftp.squeak.org/5.1alpha/Squeak5.1-15113.zip Which is release 5.0 but as trunk image. Find the latest result at http://build.squeak.org/job/Trunk/ (I made a matrix build, but for now, there's only the 'default' configuration: http://build.squeak.org/job/Trunk/default/ ) We already have a downloadable and running Trunk image, that resides at http://build.squeak.org/job/Trunk/default/lastSuccessfulBuild/artifact/target/TrunkImage.zip and is updated with every build that does not error. yay! Best regards -Tobias From karlramberg at gmail.com Fri Aug 21 10:16:04 2015 From: karlramberg at gmail.com (karl ramberg) Date: Fri Aug 21 10:16:07 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: References: <1439679369.9270.2@mglap> <161882DC-F291-4B33-9DD7-D59965C1E1D8@gmx.de> Message-ID: On Wed, Aug 19, 2015 at 5:34 PM, Levente Uzonyi wrote: > I see the following issues here (latest Trunk image): > > 1. Glyphs for non-ascii (asciiValue >= 256) characters are shown as a > black rectangle. > > 2. FontImporterTool doesn't see fonts in the subdirectories of the base > font directory. Because of this, there's only one font on the list for me. > > 3. FontImporterTool doesn't use the selected font in the preview panel. This fixes the preview of the font: FontImporterTool>>currentSelection: anObject anObject = currentSelection ifTrue: [^ self]. currentSelection := anObject. self changed: #currentSelection. self changed: #contents. self changed: #filename. self changed: #copyright. self changed: #previewText. Karl Levente > > > On Wed, 19 Aug 2015, Tobias Pape wrote: > > Hi Mateusz >> >> On 16.08.2015, at 00:56, Mateusz Grotek wrote: >> >> Hi, >>> First of all thank you for the new version of Squeak. It's really great. >>> >>> Special thanks for Tobias and Marcel for the font import tool! It works >>> perfectly. >>> >>> Nevertheless I have noticed that there is a regression in Squeak 4.6/5.0 >>> in the font handling. It's not possible anymore to use non-english >>> characters even after loading a font that contains them (I've changed the >>> code font and tried to use the characters in a workspace). Can anyone >>> verify? >>> >> >> It is somewhat strange, >> I imported Arial Unicode (the whole stuff) and, yes some characters did >> not show up, >> but others (such as ?) did. I don't know yet _where_ the problem is. >> Although >> I've written the importer, I still lack some knowledge to debug this >> behavior. >> >> Best regards >> -Tobias >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150821/4067d3e0/attachment.htm From karlramberg at gmail.com Fri Aug 21 10:16:54 2015 From: karlramberg at gmail.com (karl ramberg) Date: Fri Aug 21 10:16:56 2015 Subject: [squeak-dev] Sorry for spamming In-Reply-To: <1440119252.13037.8@mglap> References: <1440119252.13037.8@mglap> Message-ID: No problem for me :-) Karl On Fri, Aug 21, 2015 at 3:07 AM, Mateusz Grotek wrote: > Hi, > Sorry for spamming the list. :-( It wasn't on purpose. > Mateusz > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150821/8848fe14/attachment.htm From edgardec2005 at gmail.com Fri Aug 21 11:38:00 2015 From: edgardec2005 at gmail.com (Edgar De Cleene) Date: Fri Aug 21 11:38:17 2015 Subject: Fwd: [Vm-dev] Squeak 5 Image Segment Work [was [squeak-dev] [ANN] Squeak 5] References: <20150820040033.GA1129@shell.msen.com> Message-ID: <57D55DDE-7A00-4AAE-ABCE-AAD123F76DCB@gmail.com> I forward this as I think Fuel deserves be part of Squeak 5.0. And is time to move forward of some old code not needed now. Edgar @morplenauta > De: "David T. Lewis" > Asunto: Re: [Vm-dev] Squeak 5 Image Segment Work [was [squeak-dev] [ANN] Squeak 5] > Fecha: 20 de agosto de 2015 1:00:33 GMT-03:00 > Para: Squeak Virtual Machine Development Discussion > Cc: The general-purpose Squeak developers list > Responder a: Squeak Virtual Machine Development Discussion > > > On Wed, Aug 19, 2015 at 10:31:00PM -0300, Mariano Martinez Peck wrote: >> >> Hi guys, >> >> As part of my PhD thesis I did take a deep look to ImageSegment before >> starting with Fuel. I wrote a journal paper about my experiments with >> ImageSegment which I thinks provides quite a documentation that is not >> written anywhere. Hope it helps: >> http://rmod.lille.inria.fr/archives/papers/Mart11c-COMLAN-ObjectSwapping.pdf > > Hi Mariano, > > Thanks for the reference to your ObjectSwapping.pdf paper. I think that it > provides a very helpful overview. > > As an aside, we hold regular meetings of the Squeak oversight board, which > as you might expect sometimes diverge into discussion of technical issues of > one sort or another. In discussion earlier today, Eliot referred to your Fuel > implementation as "Parcels done right" and I agreed that I think it may help > with implementing image segments on new image formats (Spur, 32/64 bit images). > Personally, I like Fuel because it is easy to read and understand. > > I would encourage folks to read the ObjectSwapping paper and also to consider > helping with implementation of image segments on Spur images. Mariano's paper > provides good documentation on the topic. > > Dave > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150821/af8521a2/attachment.htm From Das.Linux at gmx.de Fri Aug 21 12:11:33 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Aug 21 12:11:38 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: References: <1439679369.9270.2@mglap> <161882DC-F291-4B33-9DD7-D59965C1E1D8@gmx.de> Message-ID: <3EC2373D-D2F4-4904-9480-74F71FDD08D3@gmx.de> Hi, On 21.08.2015, at 12:16, karl ramberg wrote: > > > On Wed, Aug 19, 2015 at 5:34 PM, Levente Uzonyi wrote: > I see the following issues here (latest Trunk image): > > 1. Glyphs for non-ascii (asciiValue >= 256) characters are shown as a black rectangle. > > 2. FontImporterTool doesn't see fonts in the subdirectories of the base font directory. Because of this, there's only one font on the list for me. > > 3. FontImporterTool doesn't use the selected font in the preview panel. > > This fixes the preview of the font: > > FontImporterTool>>currentSelection: anObject > anObject = currentSelection ifTrue: [^ self]. > currentSelection := anObject. > self changed: #currentSelection. > self changed: #contents. > self changed: #filename. > self changed: #copyright. > self changed: #previewText. > Ah I see. In Morphic-mt.951 FontImporterTool became a Subclass of Model and not StringHolder. I'll change accortingly (in trunk) Best regards -Tobias > Karl > > > Levente > > > On Wed, 19 Aug 2015, Tobias Pape wrote: > > Hi Mateusz > > On 16.08.2015, at 00:56, Mateusz Grotek wrote: > > Hi, > First of all thank you for the new version of Squeak. It's really great. > > Special thanks for Tobias and Marcel for the font import tool! It works perfectly. > > Nevertheless I have noticed that there is a regression in Squeak 4.6/5.0 in the font handling. It's not possible anymore to use non-english characters even after loading a font that contains them (I've changed the code font and tried to use the characters in a workspace). Can anyone verify? > > It is somewhat strange, > I imported Arial Unicode (the whole stuff) and, yes some characters did not show up, > but others (such as ?) did. I don't know yet _where_ the problem is. Although > I've written the importer, I still lack some knowledge to debug this behavior. > > Best regards > -Tobias From commits at source.squeak.org Fri Aug 21 12:19:20 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 21 12:19:22 2015 Subject: [squeak-dev] The Trunk: Morphic-topa.996.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.996.mcz ==================== Summary ==================== Name: Morphic-topa.996 Author: topa Time: 21 August 2015, 2:17:54.277 pm UUID: e222eed7-c8c8-40c9-81ea-e7a1518dfe7a Ancestors: Morphic-cmm.995 FontImporter tool is no StringHolder, so its #previewText now and not #contents. Fixes front preview. =============== Diff against Morphic-cmm.995 =============== Item was changed: ----- Method: FontImporterTool>>currentSelection: (in category 'accessing') ----- currentSelection: anObject anObject = currentSelection ifTrue: [^ self]. currentSelection := anObject. self changed: #currentSelection. + self changed: #previewText. - self changed: #contents. self changed: #filename. self changed: #copyright.! From Das.Linux at gmx.de Fri Aug 21 12:32:31 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Aug 21 12:32:34 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: <1440118297.13037.6@mglap> References: <1439679369.9270.2@mglap> <161882DC-F291-4B33-9DD7-D59965C1E1D8@gmx.de> <21A4269A-4424-4A39-8B6C-8043391E12FC@gmx.de> <1440118297.13037.6@mglap> Message-ID: <071661F3-6623-4AEC-B01A-4949BEF36BA6@gmx.de> Well, I don't know yet what to do about that. I probably have to dig deeper. For example, when I import Arial Unicode, I end up with only 191 glyphs, which is way to few. I'll look at that in the future. Thanks for noticing. Best regards -Tobias On 21.08.2015, at 02:51, Mateusz Grotek wrote: > Screenshot 1 From karlramberg at gmail.com Fri Aug 21 12:42:51 2015 From: karlramberg at gmail.com (karl ramberg) Date: Fri Aug 21 12:42:55 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: <3EC2373D-D2F4-4904-9480-74F71FDD08D3@gmx.de> References: <1439679369.9270.2@mglap> <161882DC-F291-4B33-9DD7-D59965C1E1D8@gmx.de> <3EC2373D-D2F4-4904-9480-74F71FDD08D3@gmx.de> Message-ID: On Fri, Aug 21, 2015 at 2:11 PM, Tobias Pape wrote: > Hi, > > On 21.08.2015, at 12:16, karl ramberg wrote: > > > > > > > On Wed, Aug 19, 2015 at 5:34 PM, Levente Uzonyi wrote: > > I see the following issues here (latest Trunk image): > > > > 1. Glyphs for non-ascii (asciiValue >= 256) characters are shown as a > black rectangle. > > > > 2. FontImporterTool doesn't see fonts in the subdirectories of the base > font directory. Because of this, there's only one font on the list for me. > > > > 3. FontImporterTool doesn't use the selected font in the preview panel. > > > > This fixes the preview of the font: > > > > FontImporterTool>>currentSelection: anObject > > anObject = currentSelection ifTrue: [^ self]. > > currentSelection := anObject. > > self changed: #currentSelection. > > self changed: #contents. > > self changed: #filename. > > self changed: #copyright. > > self changed: #previewText. > > > > Ah I see. In Morphic-mt.951 FontImporterTool became a Subclass of Model > and not StringHolder. > I'll change accortingly (in trunk) > > Best regards > -Tobias > Oh, that explains it. I did not notice that the contents send did nothing. What does contents do for model ? Karl > > > > Karl > > > > > > Levente > > > > > > On Wed, 19 Aug 2015, Tobias Pape wrote: > > > > Hi Mateusz > > > > On 16.08.2015, at 00:56, Mateusz Grotek > wrote: > > > > Hi, > > First of all thank you for the new version of Squeak. It's really great. > > > > Special thanks for Tobias and Marcel for the font import tool! It works > perfectly. > > > > Nevertheless I have noticed that there is a regression in Squeak 4.6/5.0 > in the font handling. It's not possible anymore to use non-english > characters even after loading a font that contains them (I've changed the > code font and tried to use the characters in a workspace). Can anyone > verify? > > > > It is somewhat strange, > > I imported Arial Unicode (the whole stuff) and, yes some characters did > not show up, > > but others (such as ?) did. I don't know yet _where_ the problem is. > Although > > I've written the importer, I still lack some knowledge to debug this > behavior. > > > > Best regards > > -Tobias > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150821/3d896341/attachment.htm From Das.Linux at gmx.de Fri Aug 21 12:49:04 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Aug 21 12:49:08 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: References: <1439679369.9270.2@mglap> <161882DC-F291-4B33-9DD7-D59965C1E1D8@gmx.de> <3EC2373D-D2F4-4904-9480-74F71FDD08D3@gmx.de> Message-ID: <54F68F89-D1D9-443D-9291-5B686E03C7E5@gmx.de> On 21.08.2015, at 14:42, karl ramberg wrote: > > > On Fri, Aug 21, 2015 at 2:11 PM, Tobias Pape wrote: > Hi, > > On 21.08.2015, at 12:16, karl ramberg wrote: > > > > > > > On Wed, Aug 19, 2015 at 5:34 PM, Levente Uzonyi wrote: > > I see the following issues here (latest Trunk image): > > > > 1. Glyphs for non-ascii (asciiValue >= 256) characters are shown as a black rectangle. > > > > 2. FontImporterTool doesn't see fonts in the subdirectories of the base font directory. Because of this, there's only one font on the list for me. > > > > 3. FontImporterTool doesn't use the selected font in the preview panel. > > > > This fixes the preview of the font: > > > > FontImporterTool>>currentSelection: anObject > > anObject = currentSelection ifTrue: [^ self]. > > currentSelection := anObject. > > self changed: #currentSelection. > > self changed: #contents. > > self changed: #filename. > > self changed: #copyright. > > self changed: #previewText. > > > > Ah I see. In Morphic-mt.951 FontImporterTool became a Subclass of Model and not StringHolder. > I'll change accortingly (in trunk) > > Best regards > -Tobias > Oh, that explains it. I did not notice that the contents send did nothing. > What does contents do for model ? Nothing. But it did things for StringHolder. The #contents area of the StringHolder was where now the #previewText is. :) Best regards -Tobias > > Karl > > > > Karl > > > > > > Levente > > > > > > On Wed, 19 Aug 2015, Tobias Pape wrote: > > > > Hi Mateusz > > > > On 16.08.2015, at 00:56, Mateusz Grotek wrote: > > > > Hi, > > First of all thank you for the new version of Squeak. It's really great. > > > > Special thanks for Tobias and Marcel for the font import tool! It works perfectly. > > > > Nevertheless I have noticed that there is a regression in Squeak 4.6/5.0 in the font handling. It's not possible anymore to use non-english characters even after loading a font that contains them (I've changed the code font and tried to use the characters in a workspace). Can anyone verify? > > > > It is somewhat strange, > > I imported Arial Unicode (the whole stuff) and, yes some characters did not show up, > > but others (such as ?) did. I don't know yet _where_ the problem is. Although > > I've written the importer, I still lack some knowledge to debug this behavior. > > > > Best regards > > -Tobias From maxleske at gmail.com Fri Aug 21 15:57:53 2015 From: maxleske at gmail.com (Max Leske) Date: Fri Aug 21 15:57:58 2015 Subject: [squeak-dev] #instSize in Squeak 5 seems to be broken for Traits Message-ID: <5DFA10FA-2A89-4898-94DB-156C4DD25AF0@gmail.com> Hi folks I?ve been trying to load Fuel into Squeak 5 but can?t because I get errors when loading Traits (they have not instance variables). The reason for this error seems to be that #instSize answers 2 for Traits when it should answer 0. The current implementation is: ^format bitAnd: 16rFFFF The comment in the 4.6 version says: " NOTE: This code supports the backward-compatible extension to 8 bits of instSize. When we revise the image format, it should become... ^ ((format bitShift: -1) bitAnd: 16rFF) - 1 Note also that every other method in this category will require 2 bits more of right shift after the change. ? When I use that version in TraitBehaviour>>instSize in Squeak 5 I get 0 as expected and I can load Fuel without problems. Cheers, Max From leves at elte.hu Fri Aug 21 16:10:44 2015 From: leves at elte.hu (Levente Uzonyi) Date: Fri Aug 21 16:10:47 2015 Subject: [Vm-dev] [squeak-dev] SqueakSSL + SAN certificates In-Reply-To: <5D97A777-231F-4047-9A58-CC6D47BAFB96@gmx.de> References: <20150601235713.GA68046@shell.msen.com> <5D97A777-231F-4047-9A58-CC6D47BAFB96@gmx.de> Message-ID: Hi Tobias, That sounds like a good plan. To sum it up, the only difference to the current version is that the plugin will verify server names as well (this is something OpenSSL doesn't support out of box, but it has all the tools necessary to do). So a), b) and c) are all image-side changes. I'm not sure if we need c) at all, because we can simply signal a resumable error when the certificate chain fails to be verified by the plugin, and let you, the user, handle that error when necessary. Levente On Thu, 20 Aug 2015, Tobias Pape wrote: > Hi again > (hi sven) > > On 02.06.2015, at 05:56, Levente Uzonyi wrote: > >> Hi David, >> >> There's a debate about how SAN certificates - and server name verification in general - should be handled[1][2]. >> I tend to agree with Tobias on verifying the server name in the plugin, but getting there will require further efforts - especially on the unix platform. >> >> While this version solves a particular case, and is backwards compatible on the image side, I think we should look for a better, more general solution. > > I have sketched an Idea how to handle verification in SqueakSSL in general (and briefly presented to Bert), > I'm not yet sure, however, and I'm on vacation the next two weeks. But after > that I'd like to spark a discussion (hoepfully including Sven, for Zodiac) that will involve: > > a) no manual verification. Period. > b) fail on non-verification. > c) optional 'unverified' mode that has to be requested explicitly > d) Moving the Unix platform code to libtls (easier to understand) > > That's my 2ct for now, more in September. > > Best regards > -Tobias > > > >> >> Levente >> >> [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2015-May/184613.html >> [2] http://lists.squeakfoundation.org/pipermail/squeak-dev/2015-May/184631.html >> >> On Mon, 1 Jun 2015, David T. Lewis wrote: >> >>> >>> Hi Levente, >>> >>> Regarding your VM changes for SqueakSSL, shall I commit these to the SVN >>> trunk repository? Ian delegated access to platforms/unix so that I can do >>> that for you if you like. >>> >>> We have several Mantis entries to track your SqueakSSL work: >>> >>> http://bugs.squeak.org/view.php?id=7751 (Add SSL plugin) >>> http://bugs.squeak.org/view.php?id=7793 (Memory leak in the SqueakSSL plugin on unix) >>> http://bugs.squeak.org/view.php?id=7824 (Add TLS SNI Server Name Indication support to SqueakSSL plugin) >>> >>> Your latest version http://leves.web.elte.hu/squeak/SqueakSSL/ adds >>> the SAN certificates support, so I think we should commit your latest >>> version and close the Mantis issues. >>> >>> If you agree I will update the SVN files. >>> >>> Thanks, >>> Dave >>> >>> p.s. There are still issues in SqueakSSL when sizeof(sqInt) is 8 >>> (64 bit images) but that is a separate discussion. >>> >>> >>> >>> On Tue, May 26, 2015 at 11:55:42PM +0200, Levente Uzonyi wrote: >>>> Hi All, >>>> >>>> I've implemented support for reading the domain names from the >>>> certificate's SAN extension[1] in SqueakSSL. >>>> The image side code is in the Inbox[2]. It is backwards compatible -- >>>> everything works as before without the VM changes. >>>> I've also uploaded the modified files[3][4] for the unix platform, and a >>>> diff[5] (which somehow doesn't include the changes of the .h file). >>>> >>>> The VM support code for other platforms are to be done. >>>> >>>> These changes fix the failing SqueakSSL test in the Trunk, so I suggest >>>> including the .mcz file in the 4.6 release. >>>> >>>> Levente >>>> >>>> [1] https://en.wikipedia.org/wiki/SubjectAltName >>>> [2] >>>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2015-May/184581.html >>>> [3] http://leves.web.elte.hu/squeak/SqueakSSL/SqueakSSL.h >>>> [4] http://leves.web.elte.hu/squeak/SqueakSSL/sqUnixOpenSSL.c >>>> [5] http://leves.web.elte.hu/squeak/SqueakSSL/diff.txt > > > > From leves at elte.hu Fri Aug 21 17:03:23 2015 From: leves at elte.hu (Levente Uzonyi) Date: Fri Aug 21 17:03:28 2015 Subject: [squeak-dev] Trunk Job Jenkins is working now In-Reply-To: <3AD896C4-A6F5-4D8D-B774-8B31591CF9F3@gmx.de> References: <3AD896C4-A6F5-4D8D-B774-8B31591CF9F3@gmx.de> Message-ID: That's great news, thanks Tobias! Levente On Fri, 21 Aug 2015, Tobias Pape wrote: > Hi all, > > our jenkins is 'back to normal' and can test and archive our trunk. > The basis for trunk now is the image > http://ftp.squeak.org/5.1alpha/Squeak5.1-15113.zip > Which is release 5.0 but as trunk image. > > Find the latest result at > http://build.squeak.org/job/Trunk/ > (I made a matrix build, but for now, there's only the > 'default' configuration: > http://build.squeak.org/job/Trunk/default/ > ) > > We already have a downloadable and running Trunk image, > that resides at > > http://build.squeak.org/job/Trunk/default/lastSuccessfulBuild/artifact/target/TrunkImage.zip > > and is updated with every build that does not error. > > yay! > > Best regards > -Tobias > > > From eliot.miranda at gmail.com Fri Aug 21 17:31:51 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Aug 21 17:31:54 2015 Subject: [squeak-dev] #instSize in Squeak 5 seems to be broken for Traits In-Reply-To: <5DFA10FA-2A89-4898-94DB-156C4DD25AF0@gmail.com> References: <5DFA10FA-2A89-4898-94DB-156C4DD25AF0@gmail.com> Message-ID: Hi Max, On Fri, Aug 21, 2015 at 8:57 AM, Max Leske wrote: > Hi folks > > I?ve been trying to load Fuel into Squeak 5 but can?t because I get errors > when loading Traits (they have not instance variables). The reason for this > error seems to be that #instSize answers 2 for Traits when it should answer > 0. > > The current implementation is: > > ^format bitAnd: 16rFFFF > > The comment in the 4.6 version says: > > " > NOTE: This code supports the backward-compatible extension to 8 > bits of instSize. > When we revise the image format, it should become... > ^ ((format bitShift: -1) bitAnd: 16rFF) - 1 > Note also that every other method in this category will require > 2 bits more of right shift after the change. > ? > > When I use that version in TraitBehaviour>>instSize in Squeak 5 I get 0 as > expected and I can load Fuel without problems. > So Spur has a different layout for format than V3. The above implementation (format bitAnd: 16rFFFF) is correct for Spur. In loading classes or traits via Fuel from 4.6 to 5.0 you're going to have to convert the format inst var to reflect its usage in Spur. So we need to be clear here. Is the issue that you're trying to load classes and/or traits from a Fuel file written by 4.6 or is it that as part of the Fuel load a new Trait gets created which has a format of 2? > Cheers, > Max > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150821/c4bcf8ae/attachment.htm From commits at source.squeak.org Fri Aug 21 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 21 21:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150821215502.7406.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-August/008865.html Name: Collections-ul.643 Ancestors: Collections-ul.642 String: - reuse the code of #indexOf:startingAt: from #indexOf: and #indexOf:startingAt:ifAbsent: ByteArray: - use the fast primitive for #indexOf:* the same way it is done in String ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008866.html Name: Kernel-ul.943 Ancestors: Kernel-ul.942 - expose Integer's LowBitPerByteTable ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008867.html Name: Tests-topa.323 Ancestors: Tests-topa.322 Disable ImageSegment tests on Spur for now, they are expected to not run currently. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008868.html Name: SqueakSSL-Tests-topa.19 Ancestors: SqueakSSL-Tests-ul.18 Remove Yahoo OpenID test. Endpoint is gone with no replacement. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008869.html Name: Tests-topa.324 Ancestors: Tests-topa.323 As with the ImageSegmentTest so with the ImageSegment-based BitmapTest ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008870.html Name: Morphic-topa.996 Ancestors: Morphic-cmm.995 FontImporter tool is no StringHolder, so its #previewText now and not #contents. Fixes front preview. ============================================= From commits at source.squeak.org Fri Aug 21 22:33:53 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 21 22:33:54 2015 Subject: [squeak-dev] The Trunk: Tests-ul.325.mcz Message-ID: Levente Uzonyi uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-ul.325.mcz ==================== Summary ==================== Name: Tests-ul.325 Author: ul Time: 21 August 2015, 6:54:49.29 pm UUID: 6f7b12eb-731b-47d2-b193-2af9cb085864 Ancestors: Tests-topa.324 Increased maxLiterals in CompilerTest's #testMaxLiterals and #testMaxLiteralsWithClassReferenceInClosure to make them pass again. In theory Spur supports literals up to 65535, but I think the compiler will have to be changed to be able to use that many. =============== Diff against Tests-topa.324 =============== Item was changed: ----- Method: CompilerTest>>testMaxLiterals (in category 'limits') ----- testMaxLiterals "Document the maximum number of literals in a compiled method" | maxLiterals stringThatCanBeCompiled stringWithOneTooManyLiterals | + maxLiterals := 250. - maxLiterals := 249. stringThatCanBeCompiled := '{ ', (String streamContents: [:strm | 1 to: maxLiterals do: [:e | strm nextPutAll: '''', e asString, '''', ' . ']]), '}'. stringWithOneTooManyLiterals := '{ ', (String streamContents: [:strm | 1 to: maxLiterals + 1 do: [:e | strm nextPutAll: '''', e asString, '''', ' . ']]), '}'. self assert: ((1 to: maxLiterals) collect: #printString) equals: (Compiler evaluate: stringThatCanBeCompiled). "If the following test fails, it means that the limit has been raised or eliminated, and this test should be updated to reflect the improvement." self should: [Compiler evaluate: stringWithOneTooManyLiterals] raise: Error. ! Item was changed: ----- Method: CompilerTest>>testMaxLiteralsWithClassReferenceInClosure (in category 'limits') ----- testMaxLiteralsWithClassReferenceInClosure "Document the maximum number of literals in a compiled method. A class reference in a closure reduces the maximum literals." | maxLiterals stringThatCanBeCompiled stringWithOneTooManyLiterals | + maxLiterals := 245. - maxLiterals := 244. stringThatCanBeCompiled := '[ DateAndTime now. Date today. Time ]. { ', (String streamContents: [:strm | 1 to: maxLiterals do: [:e | strm nextPutAll: '''', e asString, '''', ' . ']]), '}'. stringWithOneTooManyLiterals := '[ DateAndTime now. Date today. Time ]. { ', (String streamContents: [:strm | 1 to: maxLiterals + 1 do: [:e | strm nextPutAll: '''', e asString, '''', ' . ']]), '}'. self assert: maxLiterals equals: (Compiler evaluate: stringThatCanBeCompiled) size. "If the following test fails, it means that the limit has been raised or eliminated, and this test should be updated to reflect the improvement." self should: [Compiler evaluate: stringWithOneTooManyLiterals] raise: Error. ! From commits at source.squeak.org Fri Aug 21 22:33:56 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 21 22:33:58 2015 Subject: [squeak-dev] The Trunk: Tests-ul.326.mcz Message-ID: Levente Uzonyi uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-ul.326.mcz ==================== Summary ==================== Name: Tests-ul.326 Author: ul Time: 21 August 2015, 7:46:28.06 pm UUID: cc62b8fd-b2f2-4361-b6ee-b298a4cce671 Ancestors: Tests-ul.325 PointTest's #testNormal and #testTheta seem to get decompiled correctly. =============== Diff against Tests-ul.325 =============== Item was changed: ----- Method: DecompilerTests>>decompilerFailures (in category 'utilities') ----- decompilerFailures "Here is the list of failures: either a syntax error, a hard error or some failure to decompile correctly. Collected via DecompilerTestFailuresCollector new computeFailures." "class name, selector, error class name or nil" ^#( (Behavior toolIconSelector: TestFailure) (BrowserCommentTextMorph showPane SyntaxErrorNotification) (ClassDescription replaceSilently:to: SyntaxErrorNotification) (CodeHolder getSelectorAndSendQuery:to:with: SyntaxErrorNotification) (Date printOn: TestFailure) (DecompilerTests testDecompileUnreachableParameter Error) (FontImporterTool fontFromFamily: SyntaxErrorNotification) "same-name block-local temps in optimized blocks" (HttpUrl checkAuthorization:retry: TestFailure) (LargeNegativeIntegerTest testReplaceFromToWithStartingAt SyntaxErrorNotification) "same-name block-local temps in optimized blocks" (LargePositiveIntegerTest testReplaceFromToWithStartingAt SyntaxErrorNotification) "same-name block-local temps in optimized blocks" (MailComposition breakLinesInMessage: SyntaxErrorNotification) (MCConfigurationBrowser post SyntaxErrorNotification) (MVCToolBuilder setLayout:in: SyntaxErrorNotification) "same-name block-local temps in optimized blocks" (ParagraphEditor inOutdent:delta: SyntaxErrorNotification) (PNGReadWriter copyPixelsGray: SyntaxErrorNotification) - (PointTest testNormal TestFailure) "fraction printing??" - (PointTest testTheta TestFailure) "fraction printing??" (ScaledDecimalTest testConvertFromFraction SyntaxErrorNotification) "local/non-local temps" (SHMCClassDefinition withAllSuperclassesDo: SyntaxErrorNotification) "same-name block-local temps in optimized blocks" (StandardScriptingSystem holderWithAlphabet SyntaxErrorNotification) "same-name block-local temps in optimized blocks" (SystemWindow convertAlignment SyntaxErrorNotification) (TextEditor inOutdent:delta: SyntaxErrorNotification) (TextURL actOnClickFor: TestFailure) (TTContourConstruction segmentsDo: SyntaxErrorNotification) "Worth fixing; these two are mistaken conversion from a whileTrue: to a to:do: but the index is used outside the whileTrue:" (TTFontReader processHorizontalMetricsTable:length: SyntaxErrorNotification))! From pdebruic at gmail.com Fri Aug 21 22:37:13 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Fri Aug 21 22:41:43 2015 Subject: [squeak-dev] Re: #instSize in Squeak 5 seems to be broken for Traits In-Reply-To: References: <5DFA10FA-2A89-4898-94DB-156C4DD25AF0@gmail.com> Message-ID: <1440196633225-4844914.post@n4.nabble.com> Hi Eliot, I'm looking at this too. The error arises when loading the Fuel package through with the Metacello configuration here: MCHttpRepository location: 'http://smalltalkhub.com/mc/Pharo/Fuel/main' user: '' password: '' Not when loading classes from a .fuel file. The compiler is compiling 'fuelAccept: aGeneralMapper ^self explicitRequirement.' in the class TApplyingOnClassSide Does that help with diagnosis? Paul Eliot Miranda-2 wrote > Hi Max, > > On Fri, Aug 21, 2015 at 8:57 AM, Max Leske < > maxleske@ > > wrote: > >> Hi folks >> >> I?ve been trying to load Fuel into Squeak 5 but can?t because I get >> errors >> when loading Traits (they have not instance variables). The reason for >> this >> error seems to be that #instSize answers 2 for Traits when it should >> answer >> 0. >> >> The current implementation is: >> >> ^format bitAnd: 16rFFFF >> >> The comment in the 4.6 version says: >> >> " >> NOTE: This code supports the backward-compatible extension to 8 >> bits of instSize. >> When we revise the image format, it should become... >> ^ ((format bitShift: -1) bitAnd: 16rFF) - 1 >> Note also that every other method in this category will require >> 2 bits more of right shift after the change. >> ? >> >> When I use that version in TraitBehaviour>>instSize in Squeak 5 I get 0 >> as >> expected and I can load Fuel without problems. >> > > So Spur has a different layout for format than V3. The above > implementation (format bitAnd: 16rFFFF) is correct for Spur. In loading > classes or traits via Fuel from 4.6 to 5.0 you're going to have to convert > the format inst var to reflect its usage in Spur. So we need to be clear > here. > > Is the issue that you're trying to load classes and/or traits from a Fuel > file written by 4.6 or is it that as part of the Fuel load a new Trait > gets > created which has a format of 2? > > >> Cheers, >> Max >> > > > > -- > _,,,^..^,,,_ > best, Eliot -- View this message in context: http://forum.world.st/instSize-in-Squeak-5-seems-to-be-broken-for-Traits-tp4844835p4844914.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From pdebruic at gmail.com Fri Aug 21 22:37:45 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Fri Aug 21 22:42:16 2015 Subject: [squeak-dev] Re: #instSize in Squeak 5 seems to be broken for Traits In-Reply-To: <1440196633225-4844914.post@n4.nabble.com> References: <5DFA10FA-2A89-4898-94DB-156C4DD25AF0@gmail.com> <1440196633225-4844914.post@n4.nabble.com> Message-ID: <1440196665705-4844915.post@n4.nabble.com> Paul DeBruicker wrote > > Not when loading classes from a .fuel file. or objects...... -- View this message in context: http://forum.world.st/instSize-in-Squeak-5-seems-to-be-broken-for-Traits-tp4844835p4844915.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From cunningham.cb at gmail.com Fri Aug 21 23:16:52 2015 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Fri Aug 21 23:16:55 2015 Subject: [squeak-dev] Questionable comment In-Reply-To: References: Message-ID: Hi Eliot, On Thu, Aug 20, 2015 at 9:25 PM, Eliot Miranda wrote: > Hi Chris, > > On Wed, Aug 19, 2015 at 1:06 PM, Chris Cunningham > wrote: > >> well, not questionable - bad. >> >> (in ByteArray) >> >> long64At: index >> "Answer a 64-bit integer in Smalltalk order (little-endian)." >> | n1 n2 | >> n1 := self unsignedLongAt: index bigEndian: true. >> n2 := self unsignedLongAt: index+4 bigEndian: true. >> >> These are obviously bigEndian now, nto litte-endian. >> >> Does this mean Smalltalk order (or now Squeak order) has changed? >> > > This is not for general purpose. The method is part of VMMaker. Let's > take it to vm-dev. > It's a simple mistake. If you look at long64At:put: you'll see the > comment is correct: > Yes. I had loaded the VMMaker to look at the ARM jit code (I'm working on an ARM simulator - fun project), and then forgot I had it loaded. then later, I needed to pull 64-bit integers out of a structure (while writing a KAFKA interface) and stumbled on this. I think a generalized 64 bit put/access would be useful, and maybe even a general 128 bit too (although I have no need for it at this time). > long64At: index put: val > "I store 64-bit integers in Smalltalk (little-endian) order." > self unsignedLongAt: index put: (val bitAnd: 16rFFFFFFFF) bigEndian: false. > self unsignedLongAt: index+4 put: (val bitShift: -32) bigEndian: false. > ^val > > I'm now confused. Not only is the comment wrong, but it looks like the code is wrong. The get (#long64At:) is actually getting the 64-bit integer in big-endian order (as witnessed by the two sub-calls, too), while the put it truly doing it in little-endian format. Or am I missing something? -cbc > Thanks for finding this! > > > >> -cbc >> >> >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150821/2c2a4aea/attachment.htm From lewis at mail.msen.com Sat Aug 22 01:06:06 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Aug 22 01:06:08 2015 Subject: [squeak-dev] Corrupt MCZ files in the squeak46 repo Message-ID: <20150822010606.GA81384@shell.msen.com> We apparently have some corrupt MCZ files in the squeak46 archive. I think we have seen this problem before, so before I try to "fix" it, does anyone recognize this or know the source of the problem? The corrupt archives that I see so far are in category System. The files are good in trunk, but empty in squeak46. On the server, it looks like this: davidlewis@squeak-box4:/srv/box2/home/squeaksource/ss$ find . -name System-\*.75[13].mcz | xargs ls -ltd -rw-r--r-- 1 davidlewis davidlewis 79468 Jul 6 17:59 ./squeak46/System-topa.753.mcz -rw-r--r-- 1 davidlewis davidlewis 926999 Jul 6 16:52 ./trunk/System-topa.753.mcz -rw-r--r-- 1 davidlewis davidlewis 79870 Jul 2 20:27 ./squeak46/System-cmm.751.mcz -rw-r--r-- 1 davidlewis davidlewis 926651 Jul 2 18:24 ./trunk/System-cmm.751.mcz Presumably we can copy the good MCZ files from trunk to squeak46, but before I do that does anyone recognize what the problem might be? Dave From leves at elte.hu Sat Aug 22 01:10:58 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sat Aug 22 01:11:03 2015 Subject: [squeak-dev] Corrupt MCZ files in the squeak46 repo In-Reply-To: <20150822010606.GA81384@shell.msen.com> References: <20150822010606.GA81384@shell.msen.com> Message-ID: I think the squeak50 repository is also affected by this. I had to manually delete the empty version, and download the version of System from the trunk repository to be able to save a new version of the package. Levente On Fri, 21 Aug 2015, David T. Lewis wrote: > We apparently have some corrupt MCZ files in the squeak46 archive. I think we have > seen this problem before, so before I try to "fix" it, does anyone recognize this > or know the source of the problem? > > The corrupt archives that I see so far are in category System. The files are good > in trunk, but empty in squeak46. On the server, it looks like this: > > > davidlewis@squeak-box4:/srv/box2/home/squeaksource/ss$ find . -name System-\*.75[13].mcz | xargs ls -ltd > -rw-r--r-- 1 davidlewis davidlewis 79468 Jul 6 17:59 ./squeak46/System-topa.753.mcz > -rw-r--r-- 1 davidlewis davidlewis 926999 Jul 6 16:52 ./trunk/System-topa.753.mcz > -rw-r--r-- 1 davidlewis davidlewis 79870 Jul 2 20:27 ./squeak46/System-cmm.751.mcz > -rw-r--r-- 1 davidlewis davidlewis 926651 Jul 2 18:24 ./trunk/System-cmm.751.mcz > > > Presumably we can copy the good MCZ files from trunk to squeak46, but before > I do that does anyone recognize what the problem might be? > > Dave > > > From commits at source.squeak.org Sat Aug 22 12:11:22 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 22 12:11:23 2015 Subject: [squeak-dev] The Trunk: Collections-ul.644.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.644.mcz ==================== Summary ==================== Name: Collections-ul.644 Author: ul Time: 22 August 2015, 2:50:48.28 am UUID: 55f3957f-2ae4-4899-b3db-62dd7723d0f2 Ancestors: Collections-ul.643 Extracted and enhanced Bitset from WideCharacterSet. =============== Diff against Collections-ul.643 =============== Item was added: + Collection subclass: #Bitset + instanceVariableNames: 'bytes tally' + classVariableNames: '' + poolDictionaries: '' + category: 'Collections-Support'! + + !Bitset commentStamp: 'ul 8/22/2015 00:52' prior: 0! + I implement Bitsets, which are dictionary-like data structures mapping 0-1 values to integers between 0 and capacity-1, or in another way they are set-like data structures which can include values between 0 and capacity-1. + I implement three different kind of APIs, each corresponding to a way of thinking about this data structure: + - A Set-like API with #add:, #remove: and #includes: + - A Dictionary-like API with #at:, #at:put: + - And a bit-manipulation API with #bitAt:, #clearBitAt: and #setBitAt:. + + Instance Variables + bytes: + tally: + + bytes + - a ByteArray which holds the values for each integer key. Each byte holds 8 values. + + tally + - the number of objects in this set, or the number or 1 values in this dictionary. + ! Item was added: + ----- Method: Bitset class>>new (in category 'instance creation') ----- + new + + self error: 'Use #new: instead.'! Item was added: + ----- Method: Bitset class>>new: (in category 'instance creation') ----- + new: capacity + + ^self basicNew initialize: capacity! Item was added: + ----- Method: Bitset>>= (in category 'comparing') ----- + = anObject + + self species == anObject species ifFalse: [ ^false ]. + anObject size = tally ifFalse: [ ^false ]. + ^anObject bytes = bytes! Item was added: + ----- Method: Bitset>>add: (in category 'adding') ----- + add: anInteger + "Add anInteger to this set. Return anInteger." + + self setBitAt: anInteger. + ^anInteger! Item was added: + ----- Method: Bitset>>at: (in category 'accessing') ----- + at: anInteger + + ^self bitAt: anInteger + ! Item was added: + ----- Method: Bitset>>at:put: (in category 'accessing') ----- + at: anInteger put: aBit + + ^self bitAt: anInteger put: aBit + ! Item was added: + ----- Method: Bitset>>bitAt: (in category 'bit manipulation') ----- + bitAt: anInteger + "Return the bit corresponding to anInteger." + + ^((bytes at: (anInteger bitShift: -3) + 1) bitShift: 0 - (anInteger bitAnd: 7)) bitAnd: 1 + ! Item was added: + ----- Method: Bitset>>bitAt:put: (in category 'bit manipulation') ----- + bitAt: anInteger put: aBit + "Set the value corresponding to anInteger to aBit. Return the new value." + + aBit caseOf: { + [ 0 ] -> [ self clearBitAt: anInteger ]. + [ 1 ] -> [ self setBitAt: anInteger ] }. + ^aBit + + ! Item was added: + ----- Method: Bitset>>bytes (in category 'private') ----- + bytes + + ^bytes! Item was added: + ----- Method: Bitset>>capacity (in category 'accessing') ----- + capacity + "Return the highest integer this collection can store plus one." + + ^bytes size * 8! Item was added: + ----- Method: Bitset>>clearBitAt: (in category 'bit manipulation') ----- + clearBitAt: anInteger + "Set the value corresponding to anInteger to 0. Return true if the value wasn't 0." + + | index value mask newValue | + index := (anInteger bitShift: -3) + 1. + value := bytes at: index. + mask := 1 bitShift: (anInteger bitAnd: 7). + (newValue := (value bitOr: mask) - mask) = value ifTrue: [ ^false ]. + bytes at: index put: newValue. + tally := tally - 1. + ^true + ! Item was added: + ----- Method: Bitset>>do: (in category 'enumerating') ----- + do: aBlock + "Evaluate aBlock with each integer which has its bit set to 1." + + | byte byteOffset lowBits remainingBits | + remainingBits := tally. + lowBits := Integer lowBitPerByteTable. + 1 to: bytes size do: [ :index | + 1 <= remainingBits ifFalse: [ ^self ]. + (byte := bytes at: index) = 0 ifFalse: [ + byteOffset := (index bitShift: 3) - 9. "- 8 - 1 to make it -1 based." + [ + aBlock value: (lowBits at: byte) + byteOffset. "byteOffset is -1 based, lowBits is 1-based." + remainingBits := remainingBits - 1. + "Eliminate the low bit and loop if there're any remaning bits set." + (byte := byte bitAnd: byte - 1) = 0 ] whileFalse ] ]! Item was added: + ----- Method: Bitset>>hash (in category 'comparing') ----- + hash + "#hash is implemented, because #= is implemented." + + ^(self species hash bitXor: tally hashMultiply) bitXor: bytes hash! Item was added: + ----- Method: Bitset>>includes: (in category 'testing') ----- + includes: anInteger + + anInteger isInteger ifFalse: [ ^false ]. + -1 < anInteger ifFalse: [ ^false ]. + anInteger < self capacity ifFalse: [ ^false ]. + ^(self bitAt: anInteger) = 1! Item was added: + ----- Method: Bitset>>initialize: (in category 'private') ----- + initialize: capacity + "Capacity is expected to be a non-negative, multiple-of-eight integer." + + bytes := ByteArray new: capacity // 8. + tally := 0! Item was added: + ----- Method: Bitset>>postCopy (in category 'copying') ----- + postCopy + "Copy bytes as well." + + bytes := bytes copy! Item was added: + ----- Method: Bitset>>remove:ifAbsent: (in category 'removing') ----- + remove: anInteger ifAbsent: absentBlock + + (self clearBitAt: anInteger) ifTrue: [ ^anInteger ]. + ^absentBlock value! Item was added: + ----- Method: Bitset>>removeAll (in category 'removing') ----- + removeAll + + tally = 0 ifTrue: [ ^self ]. + bytes atAllPut: 0. "Unlike most #removeAll implementations, we don't allocate a new ByteArray here, because this is a bit more efficient. The VM would have to fill the new array with zeroes anyway." + tally := 0! Item was added: + ----- Method: Bitset>>setBitAt: (in category 'bit manipulation') ----- + setBitAt: anInteger + "Set the value corresponding to anInteger to 1. Return true if the value wasn't 1." + + | index value newValue | + index := (anInteger bitShift: -3) + 1. + value := bytes at: index. + (newValue := (1 bitShift: (anInteger bitAnd: 7)) bitOr: value) = value ifTrue: [ ^false ]. + bytes at: index put: newValue. + tally := tally + 1. + ^true! Item was added: + ----- Method: Bitset>>size (in category 'accessing') ----- + size + "Return the number of 1 values in this collection." + + ^tally! From commits at source.squeak.org Sat Aug 22 12:11:30 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 22 12:11:32 2015 Subject: [squeak-dev] The Trunk: CollectionsTests-ul.247.mcz Message-ID: Levente Uzonyi uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-ul.247.mcz ==================== Summary ==================== Name: CollectionsTests-ul.247 Author: ul Time: 22 August 2015, 2:49:53.204 am UUID: 94ef14e4-f6f6-4edb-812d-12a88105b552 Ancestors: CollectionsTests-ul.246 Added BitSetTest. =============== Diff against CollectionsTests-ul.246 =============== Item was added: + TestCase subclass: #BitSetTest + instanceVariableNames: 'bitset' + classVariableNames: '' + poolDictionaries: '' + category: 'CollectionsTests-Support'! Item was added: + ----- Method: BitSetTest>>assertBitsetIsEmpty (in category 'helpers') ----- + assertBitsetIsEmpty + + self assert: 0 equals: bitset size. + self assert: (bitset bytes allSatisfy: [ :each | each = 0 ]). + self assert: #() equals: self bitsetElements + ! Item was added: + ----- Method: BitSetTest>>bitsetElements (in category 'helpers') ----- + bitsetElements + + ^Array new: bitset size streamContents: [ :stream | + bitset do: [ :each | stream nextPut: each ] ]! Item was added: + ----- Method: BitSetTest>>initializeBitset: (in category 'helpers') ----- + initializeBitset: anInteger + + self assert: anInteger equals: anInteger // 8 * 8. + bitset := Bitset new: anInteger. + self assertBitsetIsEmpty. + self assert: anInteger equals: bitset capacity! Item was added: + ----- Method: BitSetTest>>testBitManipulationAPI (in category 'testing') ----- + testBitManipulationAPI + + #(0 8 16 24 32) do: [ :each | + self testBitManipulationAPI: each ]! Item was added: + ----- Method: BitSetTest>>testBitManipulationAPI: (in category 'testing') ----- + testBitManipulationAPI: capacity + + self initializeBitset: capacity. + 0 to: capacity - 1 do: [ :index | + self assert: 0 equals: (bitset bitAt: index). + self assert: #() equals: self bitsetElements. + self assert: false equals: (bitset clearBitAt: index). + self assert: 0 equals: bitset size. + self assert: #() equals: self bitsetElements. + self assert: false equals: (bitset clearBitAt: index). + + self assert: true equals: (bitset setBitAt: index). + self assert: 1 equals: (bitset bitAt: index). + self assert: 1 equals: bitset size. + self assert: { index } equals: self bitsetElements. + + self assert: false equals: (bitset setBitAt: index). + self assert: 1 equals: (bitset bitAt: index). + self assert: 1 equals: bitset size. + self assert: { index } equals: self bitsetElements. + + self assert: true equals: (bitset clearBitAt: index). + self assert: 0 equals: bitset size. + self assert: #() equals: self bitsetElements. + self assert: 0 equals: (bitset bitAt: index). + + self assert: false equals: (bitset clearBitAt: index). + self assert: 0 equals: bitset size. + self assert: #() equals: self bitsetElements. + self assert: 0 equals: (bitset bitAt: index). + + self assert: capacity equals: bitset capacity ]. + + self + should: [ bitset bitAt: -1 ] raise: Error; + should: [ bitset bitAt: capacity ] raise: Error. + + self + should: [ bitset setBitAt: -1 ] raise: Error; + should: [ bitset setBitAt: capacity ] raise: Error. + + self + should: [ bitset clearBitAt: -1 ] raise: Error; + should: [ bitset clearBitAt: capacity ] raise: Error! Item was added: + ----- Method: BitSetTest>>testCopy (in category 'testing') ----- + testCopy + + #(0 8 16 24 32) do: [ :each | + self testCopy: each ]! Item was added: + ----- Method: BitSetTest>>testCopy: (in category 'testing') ----- + testCopy: n + + | copy | + self initializeBitset: n. + copy := bitset copy. + self assert: copy equals: bitset. + self assert: copy hash equals: bitset hash. + self deny: bitset == copy. + self deny: bitset bytes == copy bytes! Item was added: + ----- Method: BitSetTest>>testDictionaryAPI (in category 'testing') ----- + testDictionaryAPI + + #(0 8 16 24 32) do: [ :each | + self testDictionaryAPI: each ]! Item was added: + ----- Method: BitSetTest>>testDictionaryAPI: (in category 'testing') ----- + testDictionaryAPI: capacity + + self initializeBitset: capacity. + 0 to: capacity - 1 do: [ :index | + self assert: 0 equals: (bitset at: index). + self assert: #() equals: self bitsetElements. + self assert: 0 equals: (bitset at: index put: 0). + self assert: 0 equals: bitset size. + self assert: #() equals: self bitsetElements. + self assert: 0 equals: (bitset at: index put: 0). + + self assert: 1 equals: (bitset at: index put: 1). + self assert: 1 equals: (bitset at: index). + self assert: 1 equals: bitset size. + self assert: { index } equals: self bitsetElements. + + self assert: 1 equals: (bitset at: index put: 1). + self assert: 1 equals: (bitset at: index). + self assert: 1 equals: bitset size. + self assert: { index } equals: self bitsetElements. + + self assert: 0 equals: (bitset at: index put: 0). + self assert: 0 equals: bitset size. + self assert: #() equals: self bitsetElements. + self assert: 0 equals: (bitset at: index). + + self assert: 0 equals: (bitset at: index put: 0). + self assert: 0 equals: bitset size. + self assert: #() equals: self bitsetElements. + self assert: 0 equals: (bitset at: index). + + self assert: capacity equals: bitset capacity ]. + + self + should: [ bitset at: capacity ] raise: Error; + should: [ bitset at: capacity put: 0 ] raise: Error; + should: [ bitset at: capacity put: 1 ] raise: Error. + self + should: [ bitset at: -1 ] raise: Error; + should: [ bitset at: -1 put: 0 ] raise: Error; + should: [ bitset at: -1 put: 1 ] raise: Error. + + self + should: [ bitset at: 0 put: -1 ] raise: Error; + should: [ bitset at: 0 put: 2 ] raise: Error; + should: [ bitset at: 0 put: nil ] raise: Error! Item was added: + ----- Method: BitSetTest>>testNew (in category 'testing') ----- + testNew + + self should: [ Bitset new ] raise: Error! Item was added: + ----- Method: BitSetTest>>testRemoveAll (in category 'testing') ----- + testRemoveAll + + #(0 8 16 24 32) do: [ :each | + self testRemoveAll: each ]! Item was added: + ----- Method: BitSetTest>>testRemoveAll: (in category 'testing') ----- + testRemoveAll: n + + self initializeBitset: n. + 0 to: n - 1 do: [ :index | + bitset setBitAt: index ]. + self assert: n equals: bitset size. + self assert: (bitset bytes allSatisfy: [ :each | each = 255 ]). + bitset removeAll. + self assert: 0 equals: bitset size. + self assert: #() equals: self bitsetElements. + self assert: (bitset bytes allSatisfy: [ :each | each = 0 ]). + ! Item was added: + ----- Method: BitSetTest>>testSetAPI (in category 'testing') ----- + testSetAPI + + #(0 8 16 24 32) do: [ :each | + self testSetAPI: each ]! Item was added: + ----- Method: BitSetTest>>testSetAPI: (in category 'testing') ----- + testSetAPI: capacity + + self initializeBitset: capacity. + self assert: capacity equals: capacity // 8 * 8 description: 'capacity must be a multiple of eight.'. + self assert: capacity equals: bitset capacity. + self assert: 0 equals: bitset size. + self assert: #() equals: self bitsetElements. + 0 to: capacity - 1 do: [ :index | + self deny: (bitset includes: index). + self assert: #() equals: self bitsetElements. + self assert: nil equals: (bitset remove: index ifAbsent: [ nil ]). + self assert: 0 equals: bitset size. + self assert: #() equals: self bitsetElements. + self deny: (bitset includes: index). + + self assert: index equals: (bitset add: index). + self assert: (bitset includes: index). + self assert: 1 equals: bitset size. + self assert: { index } equals: self bitsetElements. + + self assert: index equals: (bitset add: index). + self assert: (bitset includes: index). + self assert: 1 equals: bitset size. + self assert: { index } equals: self bitsetElements. + + self assert: index equals: (bitset remove: index). + self assert: 0 equals: bitset size. + self assert: #() equals: self bitsetElements. + self deny: (bitset includes: index). + + self assert: nil equals: (bitset remove: index ifAbsent: [ nil ]). + self assert: 0 equals: bitset size. + self assert: #() equals: self bitsetElements. + self deny: (bitset includes: index). + + self assert: capacity equals: bitset capacity ]. + + self + deny: (bitset includes: -1); + deny: (bitset includes: capacity). + + self + should: [ bitset add: capacity ] raise: Error; + should: [ bitset add: -1 ] raise: Error; + should: [ bitset remove: capacity ] raise: Error; + should: [ bitset remove: -1 ] raise: Error! Item was added: + ----- Method: BitSetTest>>testSize (in category 'testing') ----- + testSize + + #(0 8 16 24 32) do: [ :each | + self testSize: each ]! Item was added: + ----- Method: BitSetTest>>testSize: (in category 'testing') ----- + testSize: n + + self initializeBitset: n. + 0 to: n - 1 do: [ :index | + self assert: index equals: bitset size. + bitset setBitAt: index ]. + self assert: n equals: bitset size. + 0 to: n - 1 do: [ :index | + self assert: n - index equals: bitset size. + bitset clearBitAt: index ]. + self assertBitsetIsEmpty! From commits at source.squeak.org Sat Aug 22 12:12:00 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 22 12:12:01 2015 Subject: [squeak-dev] The Trunk: Collections-ul.645.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.645.mcz ==================== Summary ==================== Name: Collections-ul.645 Author: ul Time: 22 August 2015, 1:25:51.922 pm UUID: d0e515b8-18ad-43f0-b96a-c13fa4834fc5 Ancestors: Collections-ul.644 Use the extracted Bitset in WideCharacterSet: - decreased chunk size from 65536 to 256. This should give a purpose to use a dictionary instread of an array for map, because its size will have a chance to be larger than 64. - byteArrayMap is always initialized, so there's no need to use the method to reference it, nor to check if it's initialized - moved #remove: behavior to #remove:ifAbsent:, just like it's done by most collections. Kept the existing behavior of #remove: to not signal an error when the character is not in the collection. - use #atAllPut: to clear the byteArrayMap in #removeAll, because it should be faster than allocating a new instance - improved #size's performance - migrate instances on-the-fly - migrate any unmigrated instaces during the postscript - removed the unused methods =============== Diff against Collections-ul.644 =============== Item was changed: Collection subclass: #WideCharacterSet + instanceVariableNames: 'map byteArrayMap bitsetCapacity highBitsShift lowBitsMask' - instanceVariableNames: 'map byteArrayMap' classVariableNames: '' poolDictionaries: '' category: 'Collections-Support'! !WideCharacterSet commentStamp: 'nice 12/10/2009 19:17' prior: 0! WideCharacterSet is used to store a Set of WideCharacter with fast access and inclusion test. Implementation should be efficient in memory if sets are sufficently sparse. Wide Characters are at most 32bits. We split them into 16 highBits and 16 lowBits. map is a dictionary key: 16 highBits value: map of 16 lowBits. Maps of lowBits are stored as arrays of bits in a ByteArray. If a bit is set to 1, this indicate that corresponding character is present. 8192 bytes are necessary in each lowmap. Empty lowmap are removed from the map Dictionary. A byteArrayMap is maintained in parallel with map for fast handling of ByteString. (byteArrayMap at: i+1) = 0 means that character of asciiValue i is absent, = 1 means present.! Item was changed: ----- Method: WideCharacterSet>>add: (in category 'collection ops') ----- + add: aCharacter + + | value highBits lowBits | + self migrate. + (value := aCharacter asInteger) < 256 ifTrue: [ + byteArrayMap at: value + 1 put: 1 ]. + highBits := value bitShift: highBitsShift. + lowBits := value bitAnd: lowBitsMask. + (map at: highBits ifAbsentPut: [ Bitset new: bitsetCapacity ]) + setBitAt: lowBits. + ^aCharacter! - add: aCharacter - | val high low lowmap | - val := aCharacter asciiValue. - val < 256 ifTrue: [self byteArrayMap at: val + 1 put: 1]. - high := val bitShift: -16. - low := val bitAnd: 16rFFFF. - lowmap := map at: high ifAbsentPut: ["create a chunk of 65536=8192*8 bits" - ByteArray new: 8192]. - self setBitmap: lowmap at: low. - ^ aCharacter! Item was removed: - ----- Method: WideCharacterSet>>bitmap:at: (in category 'private') ----- - bitmap: aMap at: shortInteger - "access a single bit in aMap. - shortInteger should be between: 0 and: 16rFFFF" - - | collecIndex bitIndex | - collecIndex := shortInteger bitShift: -3. - bitIndex := shortInteger bitAnd: 7. - ^(aMap at: collecIndex + 1) bitAnd: (1 bitShift: bitIndex)! Item was changed: ----- Method: WideCharacterSet>>bitmap:do: (in category 'private') ----- bitmap: aMap do: aBlock "Execute a block with each value (0 based) corresponding to set bits. Implementation notes: this version works best for sparse maps. It has (byte lowBit) inlined for speed." | byte byteOffset lowBits | + lowBits := Integer lowBitPerByteTable. "The lowBits table gives a 1-based bitOffset" - lowBits := #[1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 7 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 8 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 7 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1]. "The lowBits table gives a 1-based bitOffset" 1 to: aMap size do: [:i | (byte := aMap at: i) = 0 ifFalse: [ byteOffset := (i bitShift: 3) - 9. "This byteOffset is -1 based" ["Evaluate the block with 0-based (byteOffset + bitOffset)" aBlock value: (byteOffset + (lowBits at: byte)). "Eliminate the low bit and loop if some bit remain" (byte := byte bitAnd: byte - 1) = 0] whileFalse]]! Item was changed: ----- Method: WideCharacterSet>>byteArrayMap (in category 'comparing') ----- byteArrayMap "return a ByteArray mapping each ascii value to a 1 if that ascii value is in the set, and a 0 if it isn't. Intended for use by primitives only. (and comparison) This version will answer a subset with only byte characters" - | lowmap | - byteArrayMap ifNil: [ - byteArrayMap := ByteArray new: 256. - lowmap := map at: 0 ifAbsent: [^byteArrayMap]. - lowmap := lowmap copyFrom: 1 to: 32. "Keep first 8*32=256 bits..." - self bitmap: lowmap do: [:code | byteArrayMap at: code + 1 put: 1]]. ^byteArrayMap! Item was removed: - ----- Method: WideCharacterSet>>clearBitmap:at: (in category 'private') ----- - clearBitmap: aMap at: shortInteger - "clear a single bit in aMap. - shortInteger should be between: 0 and: 16rFFFF" - - | collecIndex bitIndex | - collecIndex := shortInteger bitShift: -3. - bitIndex := shortInteger bitAnd: 7. - ^aMap at: collecIndex + 1 put: ((aMap at: collecIndex + 1) bitClear: (1 bitShift: bitIndex))! Item was changed: ----- Method: WideCharacterSet>>do: (in category 'collection ops') ----- + do: aBlock + + self migrate. + map keysAndValuesDo: [ :index :bitset | + | highBits | + highBits := index * bitsetCapacity. + bitset do: [ :lowBits | + aBlock value: (Character value: highBits + lowBits) ] ]! - do: aBlock - map - keysAndValuesDo: [:index :lowmap | - | high16Bits | - high16Bits := index bitShift: 16. - self - bitmap: lowmap - do: [:low16Bits | aBlock value: (Character value: high16Bits + low16Bits)]]! Item was changed: ----- Method: WideCharacterSet>>findFirstInByteString:startingAt: (in category 'collection ops') ----- findFirstInByteString: aByteString startingAt: startIndex "Double dispatching: since we know this is a ByteString, we can use a superfast primitive using a ByteArray map with 0 slots for byte characters not included and 1 for byte characters included in the receiver." + ^ByteString findFirstInString: aByteString + inSet: byteArrayMap - inSet: self byteArrayMap startingAt: startIndex! Item was changed: ----- Method: WideCharacterSet>>hash (in category 'comparing') ----- hash "Answer a hash code aimed at storing and retrieving the receiver in a Set or Dictionary. Two equal objects should have equal hash. Note: as the receiver can be equal to an ordinary CharacterSet, the hash code must reflect this" + self hasWideCharacters ifTrue: [ ^map hash ]. + ^byteArrayMap hash! - ^self hasWideCharacters - ifTrue: [map hash] - ifFalse: [self asCharacterSet hash]! Item was changed: ----- Method: WideCharacterSet>>includes: (in category 'collection ops') ----- includes: aCharacter + | value | - | value bitmap | (value := aCharacter asInteger) < 256 ifTrue: [ ^(byteArrayMap at: value + 1) ~= 0 ]. + self migrate. + ^((map at: (value bitShift: highBitsShift) ifAbsent: nil) ifNil: [ ^false ]) + includes: (value bitAnd: lowBitsMask)! - bitmap := (map at: (value bitShift: -16) ifAbsent: nil) ifNil: [ ^false ]. - ^(self - bitmap: bitmap - at: (value bitAnd: 16rFFFF)) ~= 0! Item was changed: ----- Method: WideCharacterSet>>initialize (in category 'initialize-release') ----- initialize map := PluggableDictionary integerDictionary. + byteArrayMap := ByteArray new: 256. + self initializeWithLowBits: 8! - byteArrayMap := ByteArray new: 256! Item was added: + ----- Method: WideCharacterSet>>initializeWithLowBits: (in category 'initialize-release') ----- + initializeWithLowBits: lowBits + + bitsetCapacity := 1 bitShift: lowBits. + highBitsShift := 0 - lowBits. + lowBitsMask := bitsetCapacity - 1. + ! Item was added: + ----- Method: WideCharacterSet>>migrate (in category 'private') ----- + migrate + + | newMap | + bitsetCapacity ifNotNil: [ ^self "already migrated" ]. + self initializeWithLowBits: 8. + newMap := PluggableDictionary integerDictionary. + map keysAndValuesDo: [ :index :lowmap | + | high16Bits | + high16Bits := index bitShift: 16. + self + bitmap: lowmap + do: [ :low16Bits | + | value highBits lowBits | + value := high16Bits + low16Bits. + highBits := value bitShift: highBitsShift. + lowBits := value bitAnd: lowBitsMask. + (newMap at: highBits ifAbsentPut: [ Bitset new: bitsetCapacity ]) + setBitAt: lowBits ] ]. + map := newMap! Item was changed: ----- Method: WideCharacterSet>>remove: (in category 'collection ops') ----- + remove: aCharacter + "Don't signal an error when aCharacter is not present." + + ^self remove: aCharacter ifAbsent: aCharacter! - remove: aCharacter - | val high low lowmap | - val := aCharacter asciiValue. - val < 256 ifTrue: [self byteArrayMap at: val + 1 put: 0]. - high := val bitShift: -16. - low := val bitAnd: 16rFFFF. - lowmap := map - at: high - ifAbsent: [^ aCharacter]. - self clearBitmap: lowmap at: low. - (lowmap allSatisfy: [:e | e = 0]) - ifTrue: [map removeKey: high]. - ^ aCharacter! Item was changed: ----- Method: WideCharacterSet>>remove:ifAbsent: (in category 'collection ops') ----- remove: aCharacter ifAbsent: aBlock + + | value highBits lowBits bitset | + (value := aCharacter asInteger) < 256 ifTrue: [ + (byteArrayMap at: value + 1) = 0 ifTrue: [ ^aBlock value ]. + byteArrayMap at: value + 1 put: 0 ]. + self migrate. + highBits := value bitShift: highBitsShift. + lowBits := value bitAnd: lowBitsMask. + bitset := (map at: highBits ifAbsent: nil) ifNil: [ ^aBlock value ]. + ((bitset clearBitAt: lowBits) and: [ bitset size = 0 ]) ifTrue: [ + map removeKey: highBits ]. + ^aCharacter! - (self includes: aCharacter) ifFalse: [^aBlock value]. - ^self remove: aCharacter! Item was changed: ----- Method: WideCharacterSet>>removeAll (in category 'collection ops') ----- removeAll + + map isEmpty ifTrue: [ ^self ]. map removeAll. + byteArrayMap atAllPut: 0! - byteArrayMap := ByteArray new: 256! Item was removed: - ----- Method: WideCharacterSet>>setBitmap:at: (in category 'private') ----- - setBitmap: aMap at: shortInteger - "set a single bit in aMap. - shortInteger should be between: 0 and: 16rFFFF" - - | collecIndex bitIndex | - collecIndex := shortInteger bitShift: -3. - bitIndex := shortInteger bitAnd: 7. - ^aMap at: collecIndex + 1 put: ((aMap at: collecIndex + 1) bitOr: (1 bitShift: bitIndex))! Item was changed: ----- Method: WideCharacterSet>>size (in category 'collection ops') ----- size + + ^map detectSum: [ :each | each size ]! - | size | - size := 0. - map - keysAndValuesDo: [:high :lowmap | self - bitmap: lowmap - do: [:low | size := size + 1]]. - ^ size! Item was changed: + (PackageInfo named: 'Collections') postscript: 'WideCharacterSet allInstancesDo: #migrate'! - (PackageInfo named: 'Collections') postscript: 'Character initializeClassificationTable. - String initialize'! From commits at source.squeak.org Sat Aug 22 12:13:04 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 22 12:13:05 2015 Subject: [squeak-dev] The Trunk: Collections-ul.646.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.646.mcz ==================== Summary ==================== Name: Collections-ul.646 Author: ul Time: 22 August 2015, 1:27:33.8 pm UUID: db0d3568-8710-49c8-826e-3100979e6b48 Ancestors: Collections-ul.645 - removed migration code from WideCharacterSet =============== Diff against Collections-ul.645 =============== Item was changed: ----- Method: WideCharacterSet>>add: (in category 'collection ops') ----- add: aCharacter | value highBits lowBits | - self migrate. (value := aCharacter asInteger) < 256 ifTrue: [ byteArrayMap at: value + 1 put: 1 ]. highBits := value bitShift: highBitsShift. lowBits := value bitAnd: lowBitsMask. (map at: highBits ifAbsentPut: [ Bitset new: bitsetCapacity ]) setBitAt: lowBits. ^aCharacter! Item was removed: - ----- Method: WideCharacterSet>>bitmap:do: (in category 'private') ----- - bitmap: aMap do: aBlock - "Execute a block with each value (0 based) corresponding to set bits. - Implementation notes: this version works best for sparse maps. - It has (byte lowBit) inlined for speed." - - | byte byteOffset lowBits | - lowBits := Integer lowBitPerByteTable. "The lowBits table gives a 1-based bitOffset" - 1 to: aMap size do: [:i | - (byte := aMap at: i) = 0 ifFalse: [ - byteOffset := (i bitShift: 3) - 9. "This byteOffset is -1 based" - ["Evaluate the block with 0-based (byteOffset + bitOffset)" - aBlock value: (byteOffset + (lowBits at: byte)). - "Eliminate the low bit and loop if some bit remain" - (byte := byte bitAnd: byte - 1) = 0] whileFalse]]! Item was changed: ----- Method: WideCharacterSet>>do: (in category 'collection ops') ----- do: aBlock - self migrate. map keysAndValuesDo: [ :index :bitset | | highBits | highBits := index * bitsetCapacity. bitset do: [ :lowBits | aBlock value: (Character value: highBits + lowBits) ] ]! Item was changed: ----- Method: WideCharacterSet>>includes: (in category 'collection ops') ----- includes: aCharacter | value | (value := aCharacter asInteger) < 256 ifTrue: [ ^(byteArrayMap at: value + 1) ~= 0 ]. - self migrate. ^((map at: (value bitShift: highBitsShift) ifAbsent: nil) ifNil: [ ^false ]) includes: (value bitAnd: lowBitsMask)! Item was removed: - ----- Method: WideCharacterSet>>migrate (in category 'private') ----- - migrate - - | newMap | - bitsetCapacity ifNotNil: [ ^self "already migrated" ]. - self initializeWithLowBits: 8. - newMap := PluggableDictionary integerDictionary. - map keysAndValuesDo: [ :index :lowmap | - | high16Bits | - high16Bits := index bitShift: 16. - self - bitmap: lowmap - do: [ :low16Bits | - | value highBits lowBits | - value := high16Bits + low16Bits. - highBits := value bitShift: highBitsShift. - lowBits := value bitAnd: lowBitsMask. - (newMap at: highBits ifAbsentPut: [ Bitset new: bitsetCapacity ]) - setBitAt: lowBits ] ]. - map := newMap! Item was changed: ----- Method: WideCharacterSet>>remove:ifAbsent: (in category 'collection ops') ----- remove: aCharacter ifAbsent: aBlock | value highBits lowBits bitset | (value := aCharacter asInteger) < 256 ifTrue: [ (byteArrayMap at: value + 1) = 0 ifTrue: [ ^aBlock value ]. byteArrayMap at: value + 1 put: 0 ]. - self migrate. highBits := value bitShift: highBitsShift. lowBits := value bitAnd: lowBitsMask. bitset := (map at: highBits ifAbsent: nil) ifNil: [ ^aBlock value ]. ((bitset clearBitAt: lowBits) and: [ bitset size = 0 ]) ifTrue: [ map removeKey: highBits ]. ^aCharacter! From lewis at mail.msen.com Sat Aug 22 14:15:44 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Aug 22 14:15:45 2015 Subject: [squeak-dev] Update stream transition In-Reply-To: References: <20150806040235.GA62405@shell.msen.com> Message-ID: <20150822141544.GA8111@shell.msen.com> Currently we have the problem that an existing trunk image from prior to the Squeak 4.6 release will lock up if the user does a normal "update from server". A knowledgeable user can work around this, as with the script that Nicolas provides. But a year from now our tribal knowledge is likely to dissipate, so I don't really like the idea of having the original trunk update stream end in a frozen image. I think I have come up with a way to have the update stream switch automatically from trunk to squeak46 for existing images, see attached change set. The idea is to add this class into a separate package "Temp-update-strean-migration" in the trunk repository, and add that package to the last update map that worked for V3 images (I think this is update-eem.321.mcm, is that right?). The package loads a class that checks to see if the image needs to be switched from trunk to squeak46, and changes the update preference accordingly. It then removes itself from the system. Does this seem reasonable? Dave On Thu, Aug 06, 2015 at 10:24:31PM +0200, Nicolas Cellier wrote: > 2015-08-06 16:47 GMT+02:00 Chris Muller : > > > > We currently have the trunk update stream, which is governed by update > > maps > > > called 'update' in the source.squeak.org/trunk repository. This update > > > stream is applicable to Squeak images up to the initial release of the > > > Squeak 4.6 image. These are images in the non-Spur image formats (6504 > > > or 6505 for 32-bit images, and 68002 for a 64-bit image). > > > > The .spur branch has already been collapsed onto trunk. There is no > > way to advance a non-spur image except through commits to the release > > repositories (e.g., 'squea46'). > > > > > Hi, > > FYI, I advanced the non spur with attached snippet (nothing really clever). > > Cheers > "update to latest cog version but not spur..." | url repository updateList updater lastUpdateMap config | url := MCMcmUpdater defaultUpdateURL. repository := MCRepositoryGroup default repositories detect:[:r| r description = url] ifNone:[ | r | r := MCHttpRepository location: url user: '' password: ''. MCRepositoryGroup default addRepository: r. r]. updater := [MCMcmUpdater default] ifError: [MCMcmUpdater]. lastUpdateMap := [updater lastUpdateMap] ifError: [MCMcmUpdater classPool at: #LastUpdateMap]. updateList := updater updateListFor: repository. updateList := updateList select: [:e | e key < 323]. updateList := updater refreshUpdateMapFor: repository with: updateList. updateList do:[:assoc| ProgressNotification signal: '' extra: 'Processing ', assoc value. config := repository versionNamed: assoc value. updater updateFromConfig: config. lastUpdateMap at: repository description put: assoc key. ] displayingProgress: 'Processing configurations'. config ifNil: [^updater inform: 'Unable to retrieve updates from remote repository.' translated]. config setSystemVersion. updater inform: ('Update completed. Current update number: ' translated, SystemVersion current highestUpdate). > -------------- next part -------------- 'From Squeak4.6 of 8 July 2015 [latest update: #15102] on 22 August 2015 at 9:47:23 am'! "Change Set: MoveTrunkEndToSqueak46RepoForV3Images-dtl Date: 22 August 2015 Author: David T. Lewis The Squeak trunk development stream is transitioning to Spur image format. Existing V3 images that update from trunk need to avoid loading Spur-specific methods. Move the update preference for those images to the squeak46 maintenance repository. This class is intended to be loadedfrom a single update map in order to perform a one time update for V3 images, after which is serves no ongoing purpose. Therefore, following its initialization, it will delete itself from the system. Note: The delete can be done in MoveTrunkEndToSqueak46RepoForV3Images class>>initialize. It may be preferable to move this to a package postscript."! Object subclass: #MoveTrunkEndToSqueak46RepoForV3Images instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Temp-update-stream-migration'! !MoveTrunkEndToSqueak46RepoForV3Images commentStamp: 'dtl 8/21/2015 19:31' prior: 0! The Squeak trunk development stream is transitioning to Spur image format. Existing V3 images that update from trunk need to avoid loading Spur-specific methods. Move the update preference for those images to the squeak46 maintenance repository. This class is intended to be loadedfrom a single update map in order to perform a one time update for V3 images, after which is serves no ongoing purpose. Therefore, following its initialization, it will delete itself from the system. "MoveTrunkEndToSqueak46RepoForV3Images checkAndChangeUpdateStream" ! !MoveTrunkEndToSqueak46RepoForV3Images class methodsFor: 'update stream migration' stamp: 'dtl 8/21/2015 18:57'! checkAndChangeUpdateStream "Change the update stream preference to squeak46 if this image cannot follow Spur updates." (((self isSqueakV3 and: [self isUsingTrunkUpdateStream])) and: [self isAtEndOfV3Updates]) ifTrue: ["change from trunk to http://source.squeak.org/squeak46" MCMcmUpdater defaultUpdateURL: 'http://source.squeak.org/squeak46']. ^ 'updates from ', MCMcmUpdater updateMapName, ' at ', MCMcmUpdater defaultUpdateURL ! ! !MoveTrunkEndToSqueak46RepoForV3Images class methodsFor: 'testing' stamp: 'dtl 8/21/2015 18:39'! isAtEndOfV3Updates "The update number for the Squeak 4.6 release image is 15102. Answer true if this image is at that level or greater." ^ SystemVersion current highestUpdate >= 15102! ! !MoveTrunkEndToSqueak46RepoForV3Images class methodsFor: 'testing' stamp: 'dtl 8/21/2015 17:56'! isSqueakV3 "True if this image is in a pre-Spur object format" | formats | formats := #( 6504 "32-bit V3 with traditional float ordering" 6505 "32-bit V3 with platform float ordering (Cog VM)" 68002 "64-bit V3 with traditional float ordering" 68003 "64-bit V3 with platform float ordering (mythical)" ).. ^ formats includes: Smalltalk imageFormatVersion! ! !MoveTrunkEndToSqueak46RepoForV3Images class methodsFor: 'testing' stamp: 'dtl 8/21/2015 18:06'! isUsingTrunkUpdateStream "True if the update preferences specify the trunk stream" ^ ( 'http://source.squeak.org/trunk' = MCMcmUpdater defaultUpdateURL ) and: [ 'update' = MCMcmUpdater updateMapName ]! ! !MoveTrunkEndToSqueak46RepoForV3Images class methodsFor: 'class initialization' stamp: 'dtl 8/21/2015 20:24'! destroy "Remove this class from the system after it has served its purpose" | category | category := self category. self removeFromSystem. SystemOrganization futureDo: #removeCategory: at: 1000 args: { category } ! ! !MoveTrunkEndToSqueak46RepoForV3Images class methodsFor: 'class initialization' stamp: 'dtl 8/21/2015 19:28'! initialize "This class is intended to be loaded and initialized from a specific update map. After performing the update stream check, remove this class from the system." self checkAndChangeUpdateStream. self destroy ! ! MoveTrunkEndToSqueak46RepoForV3Images initialize! From eliot.miranda at gmail.com Sat Aug 22 15:12:40 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Aug 22 15:12:44 2015 Subject: [squeak-dev] Update stream transition In-Reply-To: <20150822141544.GA8111@shell.msen.com> References: <20150806040235.GA62405@shell.msen.com> <20150822141544.GA8111@shell.msen.com> Message-ID: Hi David, Sent from my iPhone > On Aug 22, 2015, at 7:15 AM, David T. Lewis wrote: > > Currently we have the problem that an existing trunk image from prior > to the Squeak 4.6 release will lock up if the user does a normal > "update from server". A knowledgeable user can work around this, as > with the script that Nicolas provides. But a year from now our tribal > knowledge is likely to dissipate, so I don't really like the idea of > having the original trunk update stream end in a frozen image. > > I think I have come up with a way to have the update stream switch > automatically from trunk to squeak46 for existing images, see attached > change set. The idea is to add this class into a separate package > "Temp-update-strean-migration" in the trunk repository, and add that > package to the last update map that worked for V3 images (I think this > is update-eem.321.mcm, is that right?). The package loads a class that > checks to see if the image needs to be switched from trunk to squeak46, > and changes the update preference accordingly. It then removes itself > from the system. > > Does this seem reasonable? Oh yes! Looks a v good idea. The only thing I could think of was adding a preamble to trunk Kernel & System to have them error on non Sour. But your proposal above is /much/ better. > > Dave > > > >> On Thu, Aug 06, 2015 at 10:24:31PM +0200, Nicolas Cellier wrote: >> 2015-08-06 16:47 GMT+02:00 Chris Muller : >> >>>> We currently have the trunk update stream, which is governed by update >>> maps >>>> called 'update' in the source.squeak.org/trunk repository. This update >>>> stream is applicable to Squeak images up to the initial release of the >>>> Squeak 4.6 image. These are images in the non-Spur image formats (6504 >>>> or 6505 for 32-bit images, and 68002 for a 64-bit image). >>> >>> The .spur branch has already been collapsed onto trunk. There is no >>> way to advance a non-spur image except through commits to the release >>> repositories (e.g., 'squea46'). >> Hi, >> >> FYI, I advanced the non spur with attached snippet (nothing really clever). >> >> Cheers > >> "update to latest cog version but not spur..." > > | url repository updateList updater lastUpdateMap config | > url := MCMcmUpdater defaultUpdateURL. > repository := MCRepositoryGroup default repositories > detect:[:r| r description = url] > ifNone:[ | r | > r := MCHttpRepository location: url user: '' password: ''. > MCRepositoryGroup default addRepository: r. > r]. > updater := [MCMcmUpdater default] ifError: [MCMcmUpdater]. > lastUpdateMap := [updater lastUpdateMap] ifError: [MCMcmUpdater classPool at: #LastUpdateMap]. > updateList := updater updateListFor: repository. > updateList := updateList select: [:e | e key < 323]. > updateList := updater refreshUpdateMapFor: repository with: updateList. > updateList do:[:assoc| > ProgressNotification signal: '' extra: 'Processing ', assoc value. > config := repository versionNamed: assoc value. > updater updateFromConfig: config. > lastUpdateMap at: repository description put: assoc key. > ] displayingProgress: 'Processing configurations'. > config ifNil: [^updater inform: 'Unable to retrieve updates from remote repository.' translated]. > config setSystemVersion. > updater inform: ('Update completed. > Current update number: ' translated, SystemVersion current highestUpdate). > > > From karlramberg at gmail.com Sat Aug 22 16:15:27 2015 From: karlramberg at gmail.com (karl ramberg) Date: Sat Aug 22 16:15:29 2015 Subject: [squeak-dev] Update stream transition In-Reply-To: References: <20150806040235.GA62405@shell.msen.com> <20150822141544.GA8111@shell.msen.com> Message-ID: "Sour"- pre Spur Squeak ;-) Karl On Sat, Aug 22, 2015 at 5:12 PM, Eliot Miranda wrote: > Hi David, > > Sent from my iPhone > > > On Aug 22, 2015, at 7:15 AM, David T. Lewis wrote: > > > > Currently we have the problem that an existing trunk image from prior > > to the Squeak 4.6 release will lock up if the user does a normal > > "update from server". A knowledgeable user can work around this, as > > with the script that Nicolas provides. But a year from now our tribal > > knowledge is likely to dissipate, so I don't really like the idea of > > having the original trunk update stream end in a frozen image. > > > > I think I have come up with a way to have the update stream switch > > automatically from trunk to squeak46 for existing images, see attached > > change set. The idea is to add this class into a separate package > > "Temp-update-strean-migration" in the trunk repository, and add that > > package to the last update map that worked for V3 images (I think this > > is update-eem.321.mcm, is that right?). The package loads a class that > > checks to see if the image needs to be switched from trunk to squeak46, > > and changes the update preference accordingly. It then removes itself > > from the system. > > > > Does this seem reasonable? > > Oh yes! Looks a v good idea. The only thing I could think of was adding > a preamble to trunk Kernel & System to have them error on non Sour. But > your proposal above is /much/ better. > > > > > Dave > > > > > > > >> On Thu, Aug 06, 2015 at 10:24:31PM +0200, Nicolas Cellier wrote: > >> 2015-08-06 16:47 GMT+02:00 Chris Muller : > >> > >>>> We currently have the trunk update stream, which is governed by update > >>> maps > >>>> called 'update' in the source.squeak.org/trunk repository. This > update > >>>> stream is applicable to Squeak images up to the initial release of the > >>>> Squeak 4.6 image. These are images in the non-Spur image formats (6504 > >>>> or 6505 for 32-bit images, and 68002 for a 64-bit image). > >>> > >>> The .spur branch has already been collapsed onto trunk. There is no > >>> way to advance a non-spur image except through commits to the release > >>> repositories (e.g., 'squea46'). > >> Hi, > >> > >> FYI, I advanced the non spur with attached snippet (nothing really > clever). > >> > >> Cheers > > > >> "update to latest cog version but not spur..." > > > > | url repository updateList updater lastUpdateMap config | > > url := MCMcmUpdater defaultUpdateURL. > > repository := MCRepositoryGroup default repositories > > detect:[:r| r description = url] > > ifNone:[ | r | > > r := MCHttpRepository location: url user: '' password: ''. > > MCRepositoryGroup default addRepository: r. > > r]. > > updater := [MCMcmUpdater default] ifError: [MCMcmUpdater]. > > lastUpdateMap := [updater lastUpdateMap] ifError: [MCMcmUpdater > classPool at: #LastUpdateMap]. > > updateList := updater updateListFor: repository. > > updateList := updateList select: [:e | e key < 323]. > > updateList := updater refreshUpdateMapFor: repository with: updateList. > > updateList do:[:assoc| > > ProgressNotification signal: '' extra: 'Processing ', > assoc value. > > config := repository versionNamed: assoc value. > > updater updateFromConfig: config. > > lastUpdateMap at: repository description put: assoc key. > > ] displayingProgress: 'Processing configurations'. > > config ifNil: [^updater inform: 'Unable to retrieve updates from remote > repository.' translated]. > > config setSystemVersion. > > updater inform: ('Update completed. > > Current update number: ' translated, SystemVersion current > highestUpdate). > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150822/b19d4979/attachment.htm From eliot.miranda at gmail.com Sat Aug 22 16:38:30 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Aug 22 16:38:33 2015 Subject: [squeak-dev] New Cog VMs available... Message-ID: ... at http://www.mirandabanda.org/files/Cog/VM/VM.r3427. Squeak V5 users will want to upgrade their VMs because they, along with Smalltalk changes to follow soon, fix image segments. But upgrading is not a trivial process because the VMs on my site are not complete. The best way to update is to take a copy of the Squeak 5.0 all-in-one and replace the main VM executable there-in with one from my site. This gets you up-to-date plugins and an up-to-date VM. I hope that this process will get easier soon. ------------------------------------------------------------------------ CogVM binaries as per VMMaker.oscog-eem.1441/r3427 Modify Spur ImageSegment load to become the segmentWordArray into an Array of the loaded objects if load is successful, hence decoupling ImageSegment from the assumption that objects are allocated in order. Fix Integer receiver, float arg comparison with NaNs in the machine-code primitive. This has started failing in the FloatTest>>testNaNCompare since the new machine-code perform primitive invoked the machine-code version of the primitive. The Interpretewr code has always been correct and the old perform primitive would always run the Interpreter primitive if it exsted, since this would probably be faster. Fix the bug introduced by the fix to primitive function invocation in VMMaker.oscog-eem.1351 The fix correctly changed primitve code to set the primitiveFunctionPointer appropriately when a jitted external primitive was rebound, but it didn't remember to void the jit's record of the offset of the assignment that sets the primitiveFunctionPointer when switching between profiling andf non-profiling regimes, so that the address from the wrong regime would remain and be used to smash prmitive code. The fix is simply to void the externalSetPrimOffsets in voidCogCompiledCode. This fixes the bug whose symptom is a hard VM crash when using AndreasSystemProfilier. Integrate Marcel Taeumel & Tobias Pape's v2 SSL plugin changes. Fix negative 64-bit shift in the 64-bit Spur Stack interpreter. Newspeak: Fix MNU for cogged self and outer sends. Make the Newspeak VM packager include the V50 sources file instead of V41. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150822/35d7bb41/attachment.htm From commits at source.squeak.org Sat Aug 22 17:01:17 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 22 17:01:19 2015 Subject: [squeak-dev] The Trunk: Tools-eem.631.mcz Message-ID: Eliot Miranda uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-eem.631.mcz ==================== Summary ==================== Name: Tools-eem.631 Author: eem Time: 22 August 2015, 10:00:11.953 am UUID: 78dc8707-12b2-448f-94e2-4bfbfe5b0f46 Ancestors: Tools-ul.630 Remove the become[Un]Compact messages from MethodFinder as these are going away. =============== Diff against Tools-ul.630 =============== Item was changed: ----- Method: MethodFinder>>initialize (in category 'initialize') ----- (excessive size, no diff calculated) Item was changed: ----- Method: MethodFinder>>noteDangerous (in category 'initialize') ----- noteDangerous "Remember the methods with really bad side effects." Dangerous := Set new. "Object accessing, testing, copying, dependent access, macpal, flagging" #(addInstanceVarNamed:withValue: haltIfNil copyAddedStateFrom: veryDeepCopy veryDeepCopyWith: veryDeepFixupWith: veryDeepInner: addDependent: evaluate:wheneverChangeIn: codeStrippedOut: playSoundNamed: isThisEverCalled isThisEverCalled: logEntry logExecution logExit) do: [:sel | Dangerous add: sel]. "Object error handling" #(cannotInterpret: caseError confirm: confirm:orCancel: doesNotUnderstand: error: halt halt: notify: notify:at: primitiveFailed shouldNotImplement subclassResponsibility) do: [:sel | Dangerous add: sel]. "Object user interface" #(basicInspect beep inform: inspect inspectWithLabel: notYetImplemented inspectElement ) do: [:sel | Dangerous add: sel]. "Object system primitives" #(become: becomeForward: instVarAt:put: instVarNamed:put: nextInstance nextObject rootStubInImageSegment: someObject tryPrimitive:withArgs:) do: [:sel | Dangerous add: sel]. "Object private" #(errorImproperStore errorNonIntegerIndex errorNotIndexable errorSubscriptBounds: mustBeBoolean primitiveError: species storeAt:inTempFrame:) do: [:sel | Dangerous add: sel]. "Object, translation support" #(cCode: cCode:inSmalltalk: cCoerce:to: export: inline: returnTypeC: sharedCodeNamed:inCase: var:declareC:) do: [:sel | Dangerous add: sel]. "Object, objects from disk, finalization. And UndefinedObject" #(comeFullyUpOnReload: objectForDataStream: readDataFrom:size: rehash saveOnFile storeDataOn: actAsExecutor executor finalize retryWithGC:until: suspend) do: [:sel | Dangerous add: sel]. "No Restrictions: Boolean, False, True, " "Morph" #() do: [:sel | Dangerous add: sel]. "Behavior" #(obsolete confirmRemovalOf: copyOfMethodDictionary literalScannedAs:notifying: storeLiteral:on: addSubclass: removeSubclass: superclass: "creating method dictionary" addSelector:withMethod: compile: compile:notifying: compileAll compileAllFrom: compress decompile: defaultSelectorForMethod: methodDictionary: recompile:from: recompileChanges removeSelector: compressedSourceCodeAt: selectorAtMethod:setClass: allInstances allSubInstances inspectAllInstances inspectSubInstances thoroughWhichSelectorsReferTo:special:byte: "enumerating" allInstancesDo: allSubInstancesDo: allSubclassesDo: allSuperclassesDo: selectSubclasses: selectSuperclasses: subclassesDo: withAllSubclassesDo: "too slow->" crossReference removeUninstantiatedSubclassesSilently "too slow->" unreferencedInstanceVariables + "private" flushCache format:variable:words:pointers: format:variable:words:pointers:weak: printSubclassesOn:level: basicRemoveSelector: addSelector:withMethod:notifying: addSelectorSilently:withMethod:) - "private" becomeCompact becomeUncompact flushCache format:variable:words:pointers: format:variable:words:pointers:weak: printSubclassesOn:level: basicRemoveSelector: addSelector:withMethod:notifying: addSelectorSilently:withMethod:) do: [:sel | Dangerous add: sel]. "CompiledMethod" #(defaultSelector) do: [:sel | Dangerous add: sel]. "Others " #("no tangible result" do: associationsDo: "private" adaptToCollection:andSend: adaptToNumber:andSend: adaptToPoint:andSend: adaptToString:andSend: instVarAt:put: asDigitsToPower:do: combinations:atATimeDo: doWithIndex: pairsDo: permutationsDo: reverseDo: reverseWith:do: with:do: withIndexDo: asDigitsAt:in:do: combinationsAt:in:after:do: errorOutOfBounds permutationsStartingAt:do: fromUser) do: [:sel | Dangerous add: sel]. #( fileOutPrototype addSpareFields makeFileOutFile ) do: [:sel | Dangerous add: sel]. #(recompile:from: recompileAllFrom: recompileChanges asPrototypeWithFields: asPrototype addInstanceVarNamed:withValue: addInstanceVariable addClassVarName: removeClassVarName: findOrAddClassVarName: instanceVariableNames: ) do: [:sel | Dangerous add: sel]. ! From commits at source.squeak.org Sat Aug 22 17:06:10 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 22 17:06:13 2015 Subject: [squeak-dev] The Trunk: System-eem.758.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.758.mcz ==================== Summary ==================== Name: System-eem.758 Author: eem Time: 22 August 2015, 10:05:39.102 am UUID: 7a2b1f7b-f8a8-463b-b65f-9131c5a9d069 Ancestors: System-ul.757 Reimplement the post-load enumeration of loaded objects to use the revised primitive available in the VMMaker.oscog-eem.1441 /3427 VMs that becomes the loaded segment into an Array of the loaded objects. Hence endMarker disappears and allObjectsDo: is trivially implemented as do: sent to the segment. This change requires users to upgrade their VMs but as the alternative is crashes in ImageSegment loads this is acceptable. AFAIA this fixes ImageSegments in Spur but they clearly need pounding on. =============== Diff against System-ul.757 =============== Item was changed: Object subclass: #ImageSegment + instanceVariableNames: 'arrayOfRoots segment outPointers state segmentName fileName userRootCnt renamedClasses' - instanceVariableNames: 'arrayOfRoots segment outPointers state segmentName fileName endMarker userRootCnt renamedClasses' classVariableNames: 'BiggestFileNumber RecentlyRenamedClasses' poolDictionaries: '' category: 'System-Object Storage'! + !ImageSegment commentStamp: 'eem 8/21/2015 18:55' prior: 0! - !ImageSegment commentStamp: 'nice 3/25/2010 23:01' prior: 0! I represent a segment of Squeak address space. I am created from an array of root objects. After storing, my segment contains a binary encoding of every object accessible from my roots but not otherwise accessible from anywhere else in the system. My segment contains outward pointers that are indices into my table of outPointers. + On load my segment is converted back into objects and becommed + into an Array of the loaded objects, so they can be enumerated. + The main use of ImageSegments is to store Projects. A dummy version of SmartRefStream traverses the Project. Everything it finds is classified as either an object that is owned by the project (only pointed to inside the project), or an object outside the project that is pointed to from inside the project. The objects that are completely owned by the project are compressed into pure binary form in an ImageSegment. The outside objects are put in the 'outPointers' array. The entire ImageSegment (binary part plus outPointers) is encoded in a SmartRefStream, and saved on the disk. (aProject exportSegmentWithChangeSet:fileName:directory:) calls (anImageSegment writeForExportWithSources:inDirectory:changeSet:). + Note that every object inside the project is put into the segment's arrayOfRoots. This is because a dummy SmartRefStream to scan the project, in order to make intelligent decisions about what belongs in the project. See Project's class comment for what messages are sent to objects as they are unpacked in a new image. ---- Older Details ------ The primary kind of image segment is an Export Segment. It can be saved on a server and read into a completely different Squeak image. Old way to create one: (ImageSegment new copyFromRootsForExport: (Array with: Baz with: Baz class)) writeForExport: 'myFile.extSeg'. Old way to create one for a project: (Project named: 'Play With Me - 3') exportSegment. To read it into another image: Select 'myFile.extSeg' in a FileList, Menu 'load as project'. It will install its classes automatically. If you need to see the roots array, it is temporarily stored in (SmartRefStream scannedObject). Most of 'states' of an ImageSegment are not used to export a project, and have been abandoned. When a segment is written out onto a file, it goes in a folder called _segs. If your image is called "Squeak2.6.image", the folder "Squeak2.6_segs" must accompany the image whenever your move, copy, or rename it. Whenever a Class is in arrayOfRoots, its class (aClass class) must also be in the arrayOfRoots. There are two kinds of image segments. Normal image segments are a piece of a specific Squeak image, and can only be read back into that image. The image holds the array of outPointers that are necessary to turn the bits in the file into objects. To put out a normal segment that holds a Project (not the current project), execute (Project named: 'xxx') storeSegment. arrayOfRoots The objects that head the tree we will trace. segment The WordArray of raw bits of all objects in the tree. outPointers Oops of all objects outside the segment pointed to from inside. state (see below) segmentName Its basic name. Often the name of a Project. fileName The local name of the file. 'Foo-23.seg' - endMarker An object located in memory somewhere after a - segment that has - just been brought in. To enumerate the objects in - the segment, start at - the segment and go to this object. userRootCnt number of roots submitted by caller. Extras are added in preparation for saving. state that an ImageSegment may exist in... #activeCopy (has been copied, with the intent to become active) arrayOfRoots, segment, and outPointers have been created by copyFromRoots:. The tree of objects has been encoded in the segment, but those objects are still present in the Squeak system. #active (segment is actively holding objects) The segment is now the only holder of tree of objects. Each of the original roots has been transmuted into an ImageSegmentRootStub that refers back to this image segment. The original objects in the segment will all be garbageCollected. #onFile The segment has been written out to a file and replaced by a file pointer. Only ImageSegmentRootStubs and the array of outPointers remains in the image. To get this far: (ImageSegment new copyFromRoots: (Array with: Baz with: Baz class)) writeToFile: 'myFile.seg'. #inactive The segment has been brought back into memory and turned back into objects. rootsArray is set, but the segment is invalid. #onFileWithSymbols The segment has been written out to a file, along with the text of all the symbols in the outPointers array, and replaced by a file pointer. This reduces the size of the outPointers array, and also allows the system to reclaim any symbols that are not referred to from elsewhere in the image. The specific format used is that of a literal array as follows: #(symbol1 symbol2 # symbol3 symbol4 'symbolWithSpaces' # symbol5). In this case, the original outPointers array was 8 long, but the compacted table of outPointers retains only two entries. These get inserted in place of the #'s in the array of symbols after it is read back in. Symbols with embedded spaces or other strange characters are written as strings, and converted back to symbols when read back in. The symbol # is never written out. NOTE: All IdentitySets or dictionaries must be rehashed when being read back from this format. The symbols are effectively internal. (No, not if read back into same image. If a different image, then use #imported. -tk) #imported The segment is on an external file or just read in from one. The segment and outPointers are meant to be read into a foreign image. In this form, the image segment can be read from a URL, and installed. A copy of the original array of root objects is constructed, with former outPointers bound to existing objects in the host system. (Any Class inside the segment MUST be in the arrayOfRoots. This is so its association can be inserted into Smalltalk. The class's metaclass must be in roots also. Methods that are in outPointers because blocks point at them, were found and added to the roots. All IdentitySets and dictionaries are rehashed when being read back from exported segments.) To discover why only some of the objects in a project are being written out, try this (***Destructive Test***). This breaks lots of backpointers in the target project, and puts up an array of suspicious objects, a list of the classes of the outPointers, and a debugger. "Close any transcripts in the target project" World currentHand objectToPaste ifNotNil: [ self inform: 'Hand is holding a Morph in its paste buffer:\' withCRs, World currentHand objectToPaste printString]. PV := Project named: 'xxxx'. (IS := ImageSegment new) findRogueRootsImSeg: (Array with: PV world presenter with: PV world). IS findOwnersOutPtrs. "Optionally: write a file with owner chains" "Quit and DO NOT save" When an export image segment is brought into an image, it is like an image starting up. Certain startUp messages need to be run. These are byte and word reversals for nonPointer data that comes from a machine of the opposite endianness. #startUpProc passes over all objects in the segment, and: The first time an instance of class X is encountered, (msg _ X startUpFrom: anImageSegment) is sent. If msg is nil, the usual case, it means that instances of X do not need special work. X is included in the IdentitySet, noStartUpNeeded. If msg is not nil, store it in the dictionary, startUps (aClass -> aMessage). When a later instance of X is encountered, if X is in noStartUpNeeded, do nothing. If X is in startUps, send the message to the instance. Typically this is a message like #swapShortObjects. Every class that implements #startUp, should see if it needs a parallel implementation of #startUpFrom:. ! Item was changed: ----- Method: ImageSegment>>allObjectsDo: (in category 'access') ----- allObjectsDo: aBlock "Enumerate all objects that came from this segment. NOTE this assumes that the segment was created (and extracted). After the segment has been installed (install), this method allows you to enumerate its objects." + self checkAndReportLoadError. + segment do: aBlock! - | obj | - - endMarker == nil ifTrue: [ - ^ self error: 'Just extract and install, don''t writeToFile:']. - segment size ~= 1 ifTrue: [ - ^ self error: 'Vestigial segment size must be 1 (version word)']. - - obj := segment nextObject. "Start with the next object after the vestigial header" - [obj == endMarker] whileFalse: "Stop at the next object after the full segment" - [aBlock value: obj. - obj := obj nextObject]. "Step through the objects installed from the segment."! Item was removed: - ----- Method: ImageSegment>>cc:new:current:fake:refStrm: (in category '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 added: + ----- Method: ImageSegment>>checkAndReportLoadError (in category 'error checking') ----- + checkAndReportLoadError + "Check that the load has occurred. A side-efect of the load primitive is to become + the segment into an Array of the loaded objects, so they can be enumerated. If + this hasn't happened also check if the segment is a zero-length word array which + indicates we're running on an older Spur VM that doesn't do the become." + segment isArray ifTrue: [^self]. "ok" + (segment class == WordArrayForSegment + and: [segment size = 0]) ifTrue: + [^self error: 'The load primitive has not becomed segment into an Array of the loaded objects. \Please upgrade your virtual machine to one that does this.' withCRs]. + ^self error: 'Segment has not been becommed into the loaded objects'! Item was changed: ----- Method: ImageSegment>>comeFullyUpOnReload: (in category 'fileIn/Out') ----- comeFullyUpOnReload: smartRefStream "fix up the objects in the segment that changed size. An object in the segment is the wrong size for the modern version of the class. Construct a fake class that is the old size. Replace the modern class with the old one in outPointers. Load the segment. Traverse the instances, making new instances by copying fields, and running conversion messages. Keep the new instances. Bulk forward become the old to the new. Let go of the fake objects and classes. After the install (below), arrayOfRoots is filled in. Globalize new classes. Caller may want to do some special install on certain objects in arrayOfRoots. May want to write the segment out to disk in its new form." + | mapFakeClassesToReal receiverClasses rootsToUnhiberhate myProject forgetDoItsClasses | - | mapFakeClassesToReal ccFixups receiverClasses rootsToUnhiberhate myProject forgetDoItsClasses | forgetDoItsClasses := Set new. RecentlyRenamedClasses := nil. "in case old data hanging around" mapFakeClassesToReal := smartRefStream reshapedClassesIn: outPointers. + "Dictionary of just the ones that change shape. Substitute them in outPointers." - "Dictionary of just the ones that change shape. Substitute them in outPointers." - ccFixups := self remapCompactClasses: mapFakeClassesToReal - refStrm: smartRefStream. - ccFixups ifFalse: [^ self error: 'A class in the file is not compatible']. - endMarker := segment nextObject. "for enumeration of objects" - endMarker == 0 ifTrue: [endMarker := 'End' clone]. self fixCapitalizationOfSymbols. arrayOfRoots := self loadSegmentFrom: segment outPointers: outPointers. + self checkAndReportLoadError. "Can't use install. Not ready for rehashSets" mapFakeClassesToReal isEmpty ifFalse: [ self reshapeClasses: mapFakeClassesToReal refStream: smartRefStream ]. "When a Project is stored, arrayOfRoots has all objects in the project, except those in outPointers" arrayOfRoots do: [:importedObject | | existing | ((importedObject isMemberOf: WideString) or: [importedObject isMemberOf: WideSymbol]) ifTrue: [ importedObject mutateJISX0208StringToUnicode. importedObject class = WideSymbol ifTrue: [ "self halt." Symbol hasInterned: importedObject asString ifTrue: [:multiSymbol | multiSymbol == importedObject ifFalse: [ importedObject becomeForward: multiSymbol. ]. ]. ]. ]. (importedObject isKindOf: TTCFontSet) ifTrue: [ + existing := TTCFontSet + familyName: importedObject familyName + pointSize: importedObject pointSize. "supplies default" - existing := TTCFontSet familyName: importedObject familyName - pointSize: importedObject pointSize. "supplies default" existing == importedObject ifFalse: [importedObject becomeForward: existing]. ]. ]. "Smalltalk garbageCollect. MultiSymbol rehash. These take time and are not urgent, so don't to them. In the normal case, no bad MultiSymbols will be found." receiverClasses := self restoreEndianness. "rehash sets" smartRefStream checkFatalReshape: receiverClasses. "Classes in this segment." arrayOfRoots do: [:importedObject | importedObject class class == Metaclass ifTrue: [ forgetDoItsClasses add: importedObject. self declare: importedObject]]. arrayOfRoots do: [:importedObject | + importedObject isCompiledMethod ifTrue: [ - (importedObject isKindOf: CompiledMethod) ifTrue: [ importedObject sourcePointer > 0 ifTrue: [importedObject zapSourcePointer]]. (importedObject isKindOf: Project) ifTrue: [ myProject := importedObject. importedObject ensureChangeSetNameUnique. Project addingProject: importedObject. importedObject restoreReferences. self dependentsRestore: importedObject]]. rootsToUnhiberhate := arrayOfRoots select: [:importedObject | importedObject respondsTo: #unhibernate "ScriptEditors and ViewerFlapTabs" ]. myProject ifNotNil: [ myProject world setProperty: #thingsToUnhibernate toValue: rootsToUnhiberhate asArray. ]. mapFakeClassesToReal isEmpty ifFalse: [ mapFakeClassesToReal keysAndValuesDo: [:aFake :aReal | - aFake indexIfCompact > 0 ifTrue: [aFake becomeUncompact]. aFake removeFromSystemUnlogged. "do not assign the fake's hash to the real class" aFake becomeForward: aReal copyHash: false]. SystemOrganization removeEmptyCategories]. forgetDoItsClasses do: [:c | c forgetDoIts]. "^ self" ! Item was changed: ----- Method: ImageSegment>>copyFromRoots:sizeHint:areUnique: (in category 'read/write segment') ----- copyFromRoots: aRootArray sizeHint: segSizeHint areUnique: areUnique "Copy a tree of objects into a WordArray segment. The copied objects in the segment are not in the normal Squeak space. [1] For exporting a project. Objects were enumerated by ReferenceStream and aRootArray has them all. [2] For exporting some classes. See copyFromRootsForExport:. (Caller must hold Symbols, or they will not get registered in the target system.) [3] For 'local segments'. outPointers are kept in the image. If this method yields a very small segment, it is because objects just below the roots are pointed at from the outside. (See findRogueRootsImSeg: for a *destructive* diagnostic of who is pointing in.)" | segmentWordArray outPointerArray segSize rootSet uniqueRoots | aRootArray ifNil: [self errorWrongState]. uniqueRoots := areUnique ifTrue: [aRootArray] ifFalse: [rootSet := IdentitySet new: aRootArray size * 3. uniqueRoots := OrderedCollection new. 1 to: aRootArray size do: [:ii | "Don't include any roots twice" (rootSet includes: (aRootArray at: ii)) ifFalse: [ uniqueRoots addLast: (aRootArray at: ii). rootSet add: (aRootArray at: ii)] ifTrue: [userRootCnt ifNotNil: ["adjust the count" ii <= userRootCnt ifTrue: [userRootCnt := userRootCnt - 1]]]]. uniqueRoots]. arrayOfRoots := uniqueRoots asArray. rootSet := uniqueRoots := nil. "be clean" userRootCnt ifNil: [userRootCnt := arrayOfRoots size]. - arrayOfRoots do: [:aRoot | - aRoot indexIfCompact > 0 ifTrue: [ - self error: 'Compact class ', aRoot name, ' cannot be a root']]. outPointers := nil. "may have used this instance before" segSize := segSizeHint > 0 ifTrue: [segSizeHint *3 //2] ifFalse: [50000]. ["Guess a reasonable segment size" segmentWordArray := WordArrayForSegment new: segSize. outPointerArray := [Array new: segSize // 20] ifError: [ state := #tooBig. ^ self]. "Smalltalk garbageCollect." (self storeSegmentFor: arrayOfRoots into: segmentWordArray outPointers: outPointerArray) == nil] whileTrue: ["Double the segment size and try again" segmentWordArray := outPointerArray := nil. segSize := segSize * 2]. segment := segmentWordArray. outPointers := outPointerArray. + state := #activeCopy - state := #activeCopy. - endMarker := segment nextObject. "for enumeration of objects" - endMarker == 0 ifTrue: [endMarker := 'End' clone]. ! Item was changed: ----- Method: ImageSegment>>install (in category 'read/write segment') ----- install "This operation retrieves the segment if necessary from file storage, installs it in memory, and replaces (using become:) all the root stubs with the reconstructed roots of the segment." | newRoots | state = #onFile ifTrue: [self readFromFile]. + state = #onFileWithSymbols ifTrue: + [self readFromFileWithSymbols]. - state = #onFileWithSymbols ifTrue: [self readFromFileWithSymbols. - endMarker := segment nextObject. "for enumeration of objects" - endMarker == 0 ifTrue: [endMarker := 'End' clone]]. (state = #active) | (state = #imported) ifFalse: [self errorWrongState]. newRoots := self loadSegmentFrom: segment outPointers: outPointers. + self checkAndReportLoadError. state = #imported ifTrue: ["just came in from exported file" arrayOfRoots := newRoots] ifFalse: [ arrayOfRoots elementsForwardIdentityTo: newRoots]. state := #inactive. Beeper beepPrimitive! Item was changed: ----- Method: ImageSegment>>loadSegmentFrom:outPointers: (in category 'primitives') ----- loadSegmentFrom: segmentWordArray outPointers: outPointerArray + "This primitive will install a binary image segment and return as its value the array + of roots of the tree of objects represented. Upon successful completion, the + wordArray will have been becomed into anArray of the loaded objects. If this + primitive should fail, it will have destroyed the contents of the segment wordArray." - "This primitive will install a binary image segment and return as its value the array of roots of the tree of objects represented. Upon successful completion, the wordArray will have been transmuted into an object of zero length. If this primitive should fail, it will have destroyed the contents of the segment wordArray." + "successful completion returns the array of roots" + ^nil "failure returns nil"! - "successful completion returns the array of roots" - ^ nil "failure returns nil"! Item was changed: ----- Method: ImageSegment>>readFromFile (in category 'read/write segment') ----- readFromFile "Read in a simple segment. Use folder of this image, even if remembered as previous location of this image" | ff realName | realName := self class folder, FileDirectory slash, self localName. ff := FileStream readOnlyFileNamed: realName. segment := ff nextWordsInto: (WordArrayForSegment new: ff size//4). - endMarker := segment nextObject. "for enumeration of objects" - endMarker == 0 ifTrue: [endMarker := 'End' clone]. ff close. state := #active! Item was changed: ----- Method: ImageSegment>>rehashSets (in category 'fileIn/Out') ----- rehashSets "I have just been brought in and converted to live objects. Find all Sets and Dictionaries in the newly created objects and rehash them. Segment is near then end of memory, since is was newly brought in (and a new object created for it). Also, collect all classes of receivers of blocks. Return them. Caller will check if they have been reshaped." + | hashedCollections receiverClasses | - | object hashedCollections receiverClasses inSeg | - object := segment. hashedCollections := OrderedCollection new. "have to collect them, because Dictionary makes a copy, and that winds up at the end of memory and gets rehashed and makes another one." receiverClasses := IdentitySet new. + self allObjectsDo: + [:object| + object isInMemory ifTrue: + [(object isCollection and: [object isKindOf: HashedCollection]) ifTrue: + [hashedCollections add: object]. + (object isBlock or: [object isContext]) ifTrue: + [receiverClasses add: object receiver class]]]. - inSeg := true. - [object := object nextObject. - object == endMarker ifTrue: [inSeg := false]. "off end" - object isInMemory ifTrue: [ - (object isKindOf: HashedCollection) ifTrue: [hashedCollections add: object]. - object isBlock ifTrue: [inSeg ifTrue: [ - receiverClasses add: object receiver class]]. - object class == MethodContext ifTrue: [inSeg ifTrue: [ - receiverClasses add: object receiver class]]. - ]. - object == 0] whileFalse. hashedCollections do: [ :each | each compact ]. "our purpose" + ^receiverClasses "our secondary job"! - ^ receiverClasses "our secondary job" - ! Item was removed: - ----- Method: ImageSegment>>remapCompactClasses:refStrm: (in category 'compact classes') ----- - remapCompactClasses: mapFakeClassesToReal refStrm: smartRefStream - | ccArray current fake info | - "See if our compact classes are compatible with this system. Convert to what the system already has. If we are adding a new class, it has already been filed in. A compact class may not be a root." - - (outPointers at: (outPointers size - 1)) = 1717 ifFalse: [^ true]. - ccArray := outPointers last. - current := Smalltalk compactClassesArray. - 1 to: ccArray size do: [:ind | - (ccArray at: ind) ifNotNil: ["is compact in the segment" - fake := mapFakeClassesToReal keyAtValue: (current at: ind) ifAbsent: [nil]. - info := self cc: ind new: (ccArray at: ind) current: (current at: ind) - fake: fake refStrm: smartRefStream. - info ifFalse: [^ false]]]. - ^ true! Item was changed: ----- Method: ImageSegment>>reshapeClasses:refStream: (in category 'fileIn/Out') ----- + reshapeClasses: mapFakeClassesToReal refStream: smartRefStream - reshapeClasses: mapFakeClassesToReal refStream: smartRefStream | bads allVarMaps partials in out perfect | self flag: #bobconv. partials := OrderedCollection new. bads := OrderedCollection new. allVarMaps := IdentityDictionary new. + mapFakeClassesToReal keysAndValuesDo: [ :aFakeClass :theRealClass | + aFakeClass allInstances do: [ :misShapen | - mapFakeClassesToReal keysAndValuesDo: [ :aFakeClass :theRealClass | | insts | - (theRealClass indexIfCompact > 0) "and there is a fake class" - ifFalse: [insts := aFakeClass allInstances] - ifTrue: ["instances have the wrong class. Fix them before anyone notices." - insts := OrderedCollection new. - self allObjectsDo: [:obj | obj class == theRealClass ifTrue: [insts add: obj]]. - ]. - insts do: [ :misShapen | perfect := smartRefStream convert1: misShapen to: theRealClass allVarMaps: allVarMaps. + bads + detect: [ :x | x == misShapen] - bads - detect: [ :x | x == misShapen] ifNone: [ bads add: misShapen. partials add: perfect ]. ]. ]. bads isEmpty ifFalse: [ bads asArray elementsForwardIdentityTo: partials asArray ]. in := OrderedCollection new. out := OrderedCollection new. partials do: [ :each | perfect := smartRefStream convert2: each allVarMaps: allVarMaps. + in - in detect: [ :x | x == each] ifNone: [ in add: each. out add: perfect ] ]. in isEmpty ifFalse: [ in asArray elementsForwardIdentityTo: out asArray ]. ! Item was changed: ----- Method: ImageSegment>>restoreEndianness (in category 'fileIn/Out') ----- restoreEndianness "Fix endianness (byte order) of any objects not already fixed. Do this by discovering classes that need a startUp message sent to each instance, and sending it. I have just been brought in and converted to live objects. Find all Sets and Dictionaries in the newly created objects and rehash them. Segment is near then end of memory, since is was newly brought in (and a new object created for it). Also, collect all classes of receivers of blocks which refer to instance variables. Return them. Caller will check if they have been reshaped." + | hashedCollections receiverClasses noStartUpNeeded startUps | - | object hashedCollections receiverClasses inSeg noStartUpNeeded startUps cls msg | - object := segment. hashedCollections := OrderedCollection new. - "have to collect them, because Dictionary makes a copy, and that winds up at the end of memory and gets rehashed and makes another one." receiverClasses := IdentitySet new. noStartUpNeeded := IdentitySet new. "classes that don't have a per-instance startUp message" startUps := IdentityDictionary new. "class -> MessageSend of a startUp message" + self allObjectsDo: + [:object| | cls msg | + object isInMemory ifTrue: + [(object isCollection and: [object isKindOf: HashedCollection]) ifTrue: + [hashedCollections add: object]. + (object isContext and: [object hasInstVarRef]) ifTrue: + [receiverClasses add: object receiver class]]. + (noStartUpNeeded includes: object class) ifFalse: + [cls := object class. + (msg := startUps at: cls ifAbsent: nil) ifNil: + [msg := cls startUpFrom: self. "a Message, if we need to swap bytes this time" + msg ifNil: [noStartUpNeeded add: cls] + ifNotNil: [startUps at: cls put: msg]]. + msg ifNotNil: [msg sentTo: object]]]. - inSeg := true. - [object := object nextObject. "all the way to the end of memory to catch remade objects" - object == endMarker ifTrue: [inSeg := false]. "off end" - object isInMemory ifTrue: [ - (object isKindOf: HashedCollection) ifTrue: [hashedCollections add: object]. - (object isKindOf: ContextPart) ifTrue: [ - (inSeg and: [object hasInstVarRef]) ifTrue: [ - receiverClasses add: object receiver class]]. - inSeg ifTrue: [ - (noStartUpNeeded includes: object class) ifFalse: [ - cls := object class. - (msg := startUps at: cls ifAbsent: [nil]) ifNil: [ - msg := cls startUpFrom: self. "a Message, if we need to swap bytes this time" - msg ifNil: [noStartUpNeeded add: cls] - ifNotNil: [startUps at: cls put: msg]]. - msg ifNotNil: [msg sentTo: object]]]]. - object == 0] whileFalse. hashedCollections do: [ :each | each compact ]. "our purpose" + ^ receiverClasses "our secondary job"! - ^ receiverClasses "our secondary job" - ! Item was changed: ----- Method: ImageSegment>>revert (in category 'read/write segment') ----- revert "Pretend this segment was never brought in. Check that it has a fileName. Replace (using become:) all the original roots of a segment with segmentRootStubs. Thus the original objects will be reclaimed, and the root stubs will remain to bring the segment back in if it is needed. How to use revert: In the project, choose 'save for reverting'. ReEnter the project. Make changes. Either exit normally, and change will be kept, or Choose 'Revert to saved version'." fileName ifNil: [^ self]. (state = #inactive) | (state = #onFile) ifFalse: [^ self]. Cursor write showWhile: [ arrayOfRoots elementsForwardIdentityTo: (arrayOfRoots collect: [:r | r rootStubInImageSegment: self]). state := #onFile. + segment := nil] - segment := nil. - endMarker := nil]. "Old version: How to use revert: In the project, execute (Project current projectParameters at: #frozen put: true) Leave the project. Check that the project went out to disk (it is gray in the Jump to Project list). ReEnter the project. Hear a plink as it comes in from disk. Make a change. Exit the project. Choose 'Revert to previous version' in the dialog box. Check that the project went out to disk (it is gray in the Jump to Project list). + ReEnter the project and see that it is in the original state."! - ReEnter the project and see that it is in the original state." - - ! Item was changed: ----- Method: ImageSegment>>verify:matches:knowing: (in category 'testing') ----- verify: ob1 matches: ob2 knowing: matchDict | priorMatch first | ob1 == ob2 ifTrue: + ["If two pointers are same, they must be immediates or in outPointers" + (ob1 class isImmediateClass and: [ob1 = ob2]) ifTrue: [^self]. - ["If two pointers are same, they must be ints or in outPointers" - ((ob1 isMemberOf: SmallInteger) and: [ob1 = ob2]) ifTrue: [^ self]. - ((ob1 isKindOf: Behavior) and: [ob1 indexIfCompact = ob2 indexIfCompact]) ifTrue: [^ self]. (outPointers includes: ob1) ifTrue: [^ self]. self halt]. priorMatch := matchDict at: ob1 ifAbsent: [nil]. priorMatch == nil ifTrue: [matchDict at: ob1 put: ob2] ifFalse: [priorMatch == ob2 ifTrue: [^ self] ifFalse: [self halt]]. self verify: ob1 class matches: ob2 class knowing: matchDict. ob1 class isVariable ifTrue: [ob1 basicSize = ob2 basicSize ifFalse: [self halt]. first := 1. + ob1 isCompiledMethod ifTrue: [first := ob1 initialPC]. - (ob1 isMemberOf: CompiledMethod) ifTrue: [first := ob1 initialPC]. first to: ob1 basicSize do: [:i | self verify: (ob1 basicAt: i) matches: (ob2 basicAt: i) knowing: matchDict]]. ob1 class instSize = ob2 class instSize ifFalse: [self halt]. 1 to: ob1 class instSize do: [:i | self verify: (ob1 instVarAt: i) matches: (ob2 instVarAt: i) knowing: matchDict]. + ob1 isCompiledMethod ifTrue: - (ob1 isMemberOf: CompiledMethod) ifTrue: [ob1 header = ob2 header ifFalse: [self halt]. ob1 numLiterals = ob2 numLiterals ifFalse: [self halt]. 1 to: ob1 numLiterals do: [:i | self verify: (ob1 literalAt: i) matches: (ob2 literalAt: i) knowing: matchDict]]! Item was changed: ----- Method: ImageSegment>>writeForExport: (in category 'read/write segment') ----- writeForExport: shortName "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." + | fileStream | - | fileStream temp | state = #activeCopy ifFalse: [self error: 'wrong state']. - temp := endMarker. - endMarker := nil. fileStream := FileStream newFileNamed: (FileDirectory fileName: shortName extension: self class fileExtension). fileStream fileOutClass: nil andObject: self. + "remember extra structures. Note class names."! - "remember extra structures. Note class names." - endMarker := temp. - ! Item was changed: ----- Method: ImageSegment>>writeForExportWithSources:inDirectory: (in category 'read/write segment') ----- writeForExportWithSources: fName inDirectory: aDirectory "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. Append the source code of any classes in roots. Target system will quickly transfer the sources to its changes file." "this is the old version which I restored until I solve the gzip problem" + | fileStream tempFileName zipper allClassesInRoots classesToWriteEntirely methodsWithSource | - | fileStream temp tempFileName zipper allClassesInRoots classesToWriteEntirely methodsWithSource | state = #activeCopy ifFalse: [self error: 'wrong state']. (fName includes: $.) ifFalse: [ ^ self inform: 'Please use ''.pr'' or ''.extSeg'' at the end of the file name'.]. - temp := endMarker. - endMarker := nil. tempFileName := aDirectory nextNameFor: 'SqProject' extension: 'temp'. zipper := [ ProgressNotification signal: '3:uncompressedSaveComplete'. (aDirectory oldFileNamed: tempFileName) compressFile. "makes xxx.gz" aDirectory rename: (tempFileName, FileDirectory dot, 'gz') toBe: fName. aDirectory deleteFileNamed: tempFileName ifAbsent: [] ]. fileStream := aDirectory newFileNamed: tempFileName. fileStream fileOutClass: nil andObject: self. "remember extra structures. Note class names." - endMarker := temp. "append sources" + allClassesInRoots := arrayOfRoots select: [:cls | cls isBehavior]. - allClassesInRoots := arrayOfRoots select: [:cls | cls isKindOf: Behavior]. classesToWriteEntirely := allClassesInRoots select: [ :cls | cls theNonMetaClass isSystemDefined]. methodsWithSource := OrderedCollection new. allClassesInRoots do: [ :cls | (classesToWriteEntirely includes: cls) ifFalse: [ cls selectorsAndMethodsDo: [ :sel :meth | meth sourcePointer = 0 ifFalse: [methodsWithSource add: {cls. sel. meth}]. ]. ]. ]. (classesToWriteEntirely isEmpty and: [methodsWithSource isEmpty]) ifTrue: [zipper value. ^ self]. fileStream reopen; setToEnd. fileStream nextPutAll: '\\!!ImageSegment new!!\\' withCRs. methodsWithSource do: [ :each | fileStream nextPut: $!!. "try to pacify ImageSegment>>scanFrom:" fileStream nextChunkPut: 'RenamedClassSourceReader formerClassName: ', each first name printString,' methodsFor: ', (each first organization categoryOfElement: each second) asString printString, ' stamp: ',(each third timeStamp) printString; cr. fileStream nextChunkPut: (each third getSourceFor: each second in: each first) asString. fileStream nextChunkPut: ' '; cr. ]. classesToWriteEntirely do: [:cls | cls isMeta ifFalse: [fileStream nextPutAll: (cls name, ' category: ''', cls category, '''.!!'); cr; cr]. cls organization putCommentOnFile: fileStream numbered: 0 moveSource: false forClass: cls. "does nothing if metaclass" cls organization categories do: [:heading | cls fileOutCategory: heading on: fileStream moveSource: false toFile: 0]]. "no class initialization -- it came in as a real object" fileStream close. + zipper value! - zipper value.! Item was changed: ----- Method: ImageSegment>>writeForExportWithSources:inDirectory:changeSet: (in category 'read/write segment') ----- writeForExportWithSources: fName inDirectory: aDirectory changeSet: aChangeSetOrNil "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. Append the source code of any classes in roots. Target system will quickly transfer the sources to its changes file." "Files out a changeSet first, so that a project can contain classes that are unique to the project." + | fileStream tempFileName zipper allClassesInRoots classesToWriteEntirely methodsWithSource | - | fileStream temp tempFileName zipper allClassesInRoots - classesToWriteEntirely methodsWithSource | state = #activeCopy ifFalse: [self error: 'wrong state']. (fName includes: $.) ifFalse: [ ^ self inform: 'Please use ''.pr'' or ''.extSeg'' at + the end of the file name']. - the end of the file name'.]. - temp := endMarker. - endMarker := nil. tempFileName := aDirectory nextNameFor: 'SqProject' extension: 'temp'. zipper := [ Preferences debugPrintSpaceLog ifTrue:[ fileStream := aDirectory newFileNamed: (fName copyFrom: 1 to: (fName lastIndexOf: $.)), 'space'. self printSpaceAnalysisOn: fileStream. fileStream close]. ProgressNotification signal: '3:uncompressedSaveComplete'. (aDirectory oldFileNamed: tempFileName) compressFile. "makes xxx.gz" aDirectory rename: (tempFileName, FileDirectory dot, 'gz') toBe: fName. aDirectory deleteFileNamed: tempFileName ifAbsent: [] ]. fileStream := aDirectory newFileNamed: tempFileName. fileStream fileOutChangeSet: aChangeSetOrNil andObject: self. "remember extra structures. Note class names." - endMarker := temp. "append sources" + allClassesInRoots := arrayOfRoots select: [:cls | cls isBehavior]. - allClassesInRoots := arrayOfRoots select: [:cls | cls - isKindOf: Behavior]. classesToWriteEntirely := allClassesInRoots select: [ :cls | + cls theNonMetaClass isSystemDefined]. - cls theNonMetaClass isSystemDefined]. methodsWithSource := OrderedCollection new. allClassesInRoots do: [ :cls | (classesToWriteEntirely includes: cls) ifFalse: [ cls selectorsAndMethodsDo: [ :sel :meth | meth sourcePointer = 0 ifFalse: + [methodsWithSource add: {cls. sel. meth}]. - [methodsWithSource add: {cls. sel. meth}]. ]. ]. ]. + (classesToWriteEntirely isEmpty and: [methodsWithSource isEmpty]) ifTrue: + [zipper value. ^ self]. - (classesToWriteEntirely isEmpty and: [methodsWithSource - isEmpty]) ifTrue: [zipper value. ^ self]. fileStream reopen; setToEnd. fileStream nextPutAll: '\\!!ImageSegment new!!\\' withCRs. methodsWithSource do: [ :each | fileStream nextPut: $!!. "try to pacify ImageSegment>>scanFrom:" fileStream nextChunkPut: 'RenamedClassSourceReader formerClassName: ', each first name printString,' methodsFor: ', (each first organization categoryOfElement: each second) asString printString, ' stamp: ',(each third timeStamp) printString; cr. fileStream nextChunkPut: (each third getSourceFor: each second in: each first) asString. fileStream nextChunkPut: ' '; cr. ]. classesToWriteEntirely do: [:cls | cls isMeta ifFalse: [fileStream nextPutAll: (cls name, ' category: ''', cls category, '''.!!'); cr; cr]. cls organization putCommentOnFile: fileStream numbered: 0 moveSource: false forClass: cls. "does nothing if metaclass" cls organization categories do: [:heading | cls fileOutCategory: heading on: fileStream moveSource: false toFile: 0]]. "no class initialization -- it came in as a real object" fileStream close. + zipper value - zipper value. ! Item was changed: ----- Method: ImageSegment>>writeForExportWithSourcesGZ:inDirectory: (in category 'read/write segment') ----- writeForExportWithSourcesGZ: fName inDirectory: aDirectory "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. Append the source code of any classes in roots. Target system will quickly transfer the sources to its changes file." "this is the gzipped version which I have temporarily suspended until I can get resolve the problem with forward references tring to reposition the stream - RAA 11 june 2000" + | fileStream allClassesInRoots classesToWriteEntirely methodsWithSource | - | fileStream temp allClassesInRoots classesToWriteEntirely methodsWithSource | state = #activeCopy ifFalse: [self error: 'wrong state']. (fName includes: $.) ifFalse: [ ^ self inform: 'Please use ''.pr'' or ''.extSeg'' at the end of the file name'.]. - temp := endMarker. - endMarker := nil. fileStream := GZipSurrogateStream newFileNamed: fName inDirectory: aDirectory. fileStream fileOutClass: nil andObject: self. "remember extra structures. Note class names." - endMarker := temp. "append sources" + allClassesInRoots := arrayOfRoots select: [:cls | cls isBehavior]. - allClassesInRoots := arrayOfRoots select: [:cls | cls isKindOf: Behavior]. classesToWriteEntirely := allClassesInRoots select: [ :cls | cls theNonMetaClass isSystemDefined]. methodsWithSource := OrderedCollection new. allClassesInRoots do: [ :cls | (classesToWriteEntirely includes: cls) ifFalse: [ cls selectorsAndMethodsDo: [ :sel :meth | meth sourcePointer = 0 ifFalse: [methodsWithSource add: {cls. sel. meth}]. ]. ]. ]. (classesToWriteEntirely isEmpty and: [methodsWithSource isEmpty]) ifTrue: [ fileStream reallyClose. "since #close is ignored" ^ self ]. "fileStream reopen; setToEnd." "<--not required with gzipped surrogate stream" fileStream nextPutAll: '\\!!ImageSegment new!!\\' withCRs. methodsWithSource do: [ :each | fileStream nextPut: $!!. "try to pacify ImageSegment>>scanFrom:" fileStream nextChunkPut: 'RenamedClassSourceReader formerClassName: ', each first name printString,' methodsFor: ', (each first organization categoryOfElement: each second) asString printString, ' stamp: ',(each third timeStamp) printString; cr. fileStream nextChunkPut: (each third getSourceFor: each second in: each first) asString. fileStream nextChunkPut: ' '; cr. ]. classesToWriteEntirely do: [:cls | cls isMeta ifFalse: [fileStream nextPutAll: (cls name, ' category: ''', cls category, '''.!!'); cr; cr]. cls organization putCommentOnFile: fileStream numbered: 0 moveSource: false forClass: cls. "does nothing if metaclass" cls organization categories do: [:heading | cls fileOutCategory: heading on: fileStream moveSource: false toFile: 0]]. "no class initialization -- it came in as a real object" + fileStream reallyClose "since #close is ignored" - fileStream reallyClose. "since #close is ignored" ! Item was changed: ----- Method: ImageSegment>>writeToFile (in category 'read/write segment') ----- writeToFile state = #active ifFalse: [self error: 'wrong state'. ^ self]. Cursor write showWhile: [ segmentName ifNil: [ segmentName := (FileDirectory localNameFor: fileName) sansPeriodSuffix]. "OK that still has number on end. This is an unusual case" fileName := self class uniqueFileNameFor: segmentName. "local name" (self class segmentDirectory newFileNamed: fileName) nextPutAll: segment; close. segment := nil. - endMarker := nil. state := #onFile].! From commits at source.squeak.org Sat Aug 22 17:08:04 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 22 17:08:06 2015 Subject: [squeak-dev] The Trunk: SMBase-eem.134.mcz Message-ID: Eliot Miranda uploaded a new version of SMBase to project The Trunk: http://source.squeak.org/trunk/SMBase-eem.134.mcz ==================== Summary ==================== Name: SMBase-eem.134 Author: eem Time: 22 August 2015, 10:07:47.773 am UUID: ddf45ed9-070e-4ad7-a5e4-7cda58d32af4 Ancestors: SMBase-bf.133 Reimplement the post-load enumeration of loaded objects to use the revised primitive available in the VMMaker.oscog-eem.1441 /3427 VMs that becomes the loaded segment into an Array of the loaded objects. Hence endMarker disappears and allObjectsDo: is trivially implemented as do: sent to the segment. This change requires users to upgrade their VMs but as the alternative is crashes in ImageSegment loads this is acceptable. AFAIA this fixes ImageSegments in Spur but they clearly need pounding on. =============== Diff against SMBase-bf.133 =============== Item was changed: ----- 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." - | temp | state = #activeCopy ifFalse: [self error: 'wrong state']. - temp := endMarker. - endMarker := nil. fileStream fileOutClass: nil andObject: self. + "remember extra structures. Note class names."! - "remember extra structures. Note class names." - endMarker := temp. - ! From commits at source.squeak.org Sat Aug 22 17:10:01 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 22 17:10:02 2015 Subject: [squeak-dev] The Trunk: KernelTests-eem.297.mcz Message-ID: Eliot Miranda uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-eem.297.mcz ==================== Summary ==================== Name: KernelTests-eem.297 Author: eem Time: 22 August 2015, 10:09:42.663 am UUID: 4c36a37c-ce66-46fb-9ab8-12d6b256acd6 Ancestors: KernelTests-ul.296 Remove the compact class index tests from LargeNegativeInteger as the compact class code is going away. =============== Diff against KernelTests-ul.296 =============== Item was removed: - ----- Method: LargeNegativeIntegerTest>>testCompactClassIndex (in category 'tests') ----- - testCompactClassIndex - Character instSize > 0 ifTrue: "No compact classes on Spur..." - [self assert: 4 equals: LargeNegativeInteger indexIfCompact] - ! Item was removed: - ----- Method: LargePositiveIntegerTest>>testCompactClassIndex (in category 'tests') ----- - testCompactClassIndex - Character instSize > 0 ifTrue: "No compact classes on Spur..." - [self assert: 5 equals: LargePositiveInteger indexIfCompact]! From commits at source.squeak.org Sat Aug 22 17:14:40 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 22 17:14:40 2015 Subject: [squeak-dev] The Trunk: Kernel-eem.944.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.944.mcz ==================== Summary ==================== Name: Kernel-eem.944 Author: eem Time: 22 August 2015, 10:14:01.562 am UUID: 2398e31e-ac36-4423-b2d3-3aafa53bb339 Ancestors: Kernel-ul.943 Nuke the compact class support in Kernel and the ClassBuilder. Spur has a regular 64-bit object header format with no special cases. Fix CompiledMethod>>at:ifAbsent: to work with the initialPC to endPC range and run the ifAbsent: block for indices outside this range. Categorize isCompiledMethodClass correctly. =============== Diff against Kernel-ul.943 =============== Item was removed: - ----- Method: Behavior>>becomeCompact (in category 'private') ----- - becomeCompact - "Here are the restrictions on compact classes in order for export segments to work: A compact class index may not be reused. If a class was compact in a release of Squeak, no other class may use that index. The class might not be compact later, and there should be nil in its place in the array." - | cct index | - - self isWeak ifTrue:[^ self halt: 'You must not make a weak class compact']. - cct := Smalltalk compactClassesArray. - (self isCompact or: [cct includes: self]) - ifTrue: [^ self halt: self name , 'is already compact']. - index := cct indexOf: nil - ifAbsent: [^ self halt: 'compact class table is full']. - "Install this class in the compact class table" - cct at: index put: self. - "Update instspec so future instances will be compact" - format := format + (index bitShift: 11). - "Make up new instances and become old ones into them" - self updateInstancesFrom: self. - "Purge any old instances" - Smalltalk garbageCollect.! Item was removed: - ----- Method: Behavior>>becomeCompactSimplyAt: (in category 'private') ----- - becomeCompactSimplyAt: index - "Make me compact, but don't update the instances. For importing segments." - "Here are the restrictions on compact classes in order for export segments to work: A compact class index may not be reused. If a class was compact in a release of Squeak, no other class may use that index. The class might not be compact later, and there should be nil in its place in the array." - | cct | - - self isWeak ifTrue:[^ self halt: 'You must not make a weak class compact']. - cct := Smalltalk compactClassesArray. - (self isCompact or: [cct includes: self]) - ifTrue: [^ self halt: self name , 'is already compact']. - (cct at: index) ifNotNil: [^ self halt: 'compact table slot already in use']. - "Install this class in the compact class table" - cct at: index put: self. - "Update instspec so future instances will be compact" - format := format + (index bitShift: 11). - "Caller must convert the instances" - ! Item was removed: - ----- Method: Behavior>>becomeUncompact (in category 'private') ----- - becomeUncompact - | cct index | - cct := Smalltalk compactClassesArray. - (index := self indexIfCompact) = 0 - ifTrue: [^ self]. - (cct includes: self) - ifFalse: [^ self halt "inconsistent state"]. - "Update instspec so future instances will not be compact" - format := format - (index bitShift: 11). - "Make up new instances and become old ones into them" - self updateInstancesFrom: self. - "Make sure there are no compact ones left around" - Smalltalk garbageCollect. - "Remove this class from the compact class table" - cct at: index put: nil. - ! Item was removed: - ----- Method: Behavior>>indexIfCompact (in category 'private') ----- - indexIfCompact - "Backward compatibility with the Squeak V3 object format. - Spur does not have a distinction between compact and non-compact classes." - ^0! Item was removed: - ----- Method: Behavior>>isCompact (in category 'testing') ----- - isCompact - - ^self indexIfCompact ~= 0! Item was changed: + ----- Method: Behavior>>isCompiledMethodClass (in category 'testing') ----- - ----- Method: Behavior>>isCompiledMethodClass (in category 'as yet unclassified') ----- isCompiledMethodClass "Answer whether the receiver has compiled method instances that mix pointers and bytes." ^self instSpec >= 24! Item was added: + ----- Method: ClassBuilder>>computeFormat:instSize:forSuper: (in category 'class format') ----- + computeFormat: type instSize: newInstSize forSuper: newSuper + "Compute the new format for making oldClass a subclass of newSuper. + Answer the format or nil if there is any problem." + | instSize isVar isWords isPointers isWeak | + type == #compiledMethod ifTrue: + [newInstSize > 0 ifTrue: + [self error: 'A compiled method class cannot have named instance variables'. + ^nil]. + ^CompiledMethod format]. + instSize := newInstSize + (newSuper ifNil:[0] ifNotNil:[newSuper instSize]). + instSize > 65535 ifTrue: + [self error: 'Class has too many instance variables (', instSize printString,')'. + ^nil]. + type == #normal ifTrue:[isVar := isWeak := false. isWords := isPointers := true]. + type == #bytes ifTrue:[isVar := true. isWords := isPointers := isWeak := false]. + type == #words ifTrue:[isVar := isWords := true. isPointers := isWeak := false]. + type == #variable ifTrue:[isVar := isPointers := isWords := true. isWeak := false]. + type == #weak ifTrue:[isVar := isWeak := isWords := isPointers := true]. + type == #ephemeron ifTrue:[isVar := false. isWeak := isWords := isPointers := true]. + type == #immediate ifTrue:[isVar := isWeak := isPointers := false. isWords := true]. + (isPointers not and: [instSize > 0]) ifTrue: + [self error: 'A non-pointer class cannot have named instance variables'. + ^nil]. + ^self format: instSize variable: isVar words: isWords pointers: isPointers weak: isWeak! Item was removed: - ----- Method: ClassBuilder>>computeFormat:instSize:forSuper:ccIndex: (in category 'class format') ----- - computeFormat: type instSize: newInstSize forSuper: newSuper ccIndex: ccIndex - "Compute the new format for making oldClass a subclass of newSuper. - Answer the format or nil if there is any problem." - | instSize isVar isWords isPointers isWeak | - type == #compiledMethod ifTrue: - [newInstSize > 0 ifTrue: - [self error: 'A compiled method class cannot have named instance variables'. - ^nil]. - ^CompiledMethod format]. - instSize := newInstSize + (newSuper ifNil:[0] ifNotNil:[newSuper instSize]). - instSize > 65535 ifTrue: - [self error: 'Class has too many instance variables (', instSize printString,')'. - ^nil]. - type == #normal ifTrue:[isVar := isWeak := false. isWords := isPointers := true]. - type == #bytes ifTrue:[isVar := true. isWords := isPointers := isWeak := false]. - type == #words ifTrue:[isVar := isWords := true. isPointers := isWeak := false]. - type == #variable ifTrue:[isVar := isPointers := isWords := true. isWeak := false]. - type == #weak ifTrue:[isVar := isWeak := isWords := isPointers := true]. - type == #ephemeron ifTrue:[isVar := false. isWeak := isWords := isPointers := true]. - type == #immediate ifTrue:[isVar := isWeak := isPointers := false. isWords := true]. - (isPointers not and: [instSize > 0]) ifTrue: - [self error: 'A non-pointer class cannot have named instance variables'. - ^nil]. - ^self format: instSize variable: isVar words: isWords pointers: isPointers weak: isWeak! Item was changed: ----- Method: ClassBuilder>>needsSubclassOf:type:instanceVariables:from: (in category 'class definition') ----- needsSubclassOf: newSuper type: type instanceVariables: instVars from: oldClass "Answer whether we need a new subclass to conform to the requested changes" | newFormat | "Compute the format of the new class" + newFormat := self computeFormat: type instSize: instVars size forSuper: newSuper. + newFormat ifNil: [^nil]. - newFormat := - self computeFormat: type - instSize: instVars size - forSuper: newSuper - ccIndex: (oldClass ifNil:[0] ifNotNil:[oldClass indexIfCompact]). - newFormat == nil ifTrue:[^nil]. "Check if we really need a new subclass" oldClass ifNil:[^true]. "yes, it's a new class" newSuper == oldClass superclass ifFalse:[^true]. "yes, it's a superclass change" newFormat = oldClass format ifFalse:[^true]. "yes, it's a format change" instVars = oldClass instVarNames ifFalse:[^true]. "yes, it's an iVar change" ^false ! Item was changed: ----- Method: ClassBuilder>>newSubclassOf:type:instanceVariables:from: (in category 'class definition') ----- newSubclassOf: newSuper type: type instanceVariables: instVars from: oldClass "Create a new subclass of the given superclass with the given specification." | newFormat newClass | "Compute the format of the new class" + newFormat := self computeFormat: type instSize: instVars size forSuper: newSuper. - newFormat := - self computeFormat: type - instSize: instVars size - forSuper: newSuper - ccIndex: (oldClass ifNil:[0] ifNotNil:[oldClass indexIfCompact]). + newFormat ifNil: [^nil]. - newFormat == nil ifTrue:[^nil]. (oldClass == nil or:[oldClass isMeta not]) ifTrue:[newClass := self privateNewSubclassOf: newSuper from: oldClass] ifFalse:[newClass := oldClass clone]. newClass superclass: newSuper methodDictionary: (oldClass ifNil: [MethodDictionary new] ifNotNil: [oldClass methodDict copy]) format: newFormat; setInstVarNames: instVars. oldClass ifNotNil:[ newClass organization: oldClass organization. "Recompile the new class" oldClass hasMethods ifTrue:[newClass compileAllFrom: oldClass]. oldClass hasTraitComposition ifTrue: [ newClass setTraitComposition: oldClass traitComposition copyTraitExpression ]. oldClass class hasTraitComposition ifTrue: [ newClass class setTraitComposition: oldClass class traitComposition copyTraitExpression ]. self recordClass: oldClass replacedBy: newClass. ]. (oldClass == nil or:[oldClass isObsolete not]) ifTrue:[newSuper addSubclass: newClass] ifFalse:[newSuper addObsoleteSubclass: newClass]. ^newClass! Item was changed: ----- Method: ClassBuilder>>privateNewSubclassOf:from: (in category 'private') ----- privateNewSubclassOf: newSuper from: oldClass "Create a new meta and non-meta subclass of newSuper using oldClass as template" "WARNING: This method does not preserve the superclass/subclass invariant!!" | newSuperMeta oldMeta newMeta | oldClass ifNil:[^self privateNewSubclassOf: newSuper]. newSuperMeta := newSuper ifNil:[Class] ifNotNil:[newSuper class]. oldMeta := oldClass class. newMeta := oldMeta clone. newMeta superclass: newSuperMeta methodDictionary: oldMeta methodDict copy format: (self computeFormat: oldMeta typeOfClass instSize: oldMeta instVarNames size + forSuper: newSuperMeta); - forSuper: newSuperMeta - ccIndex: 0); setInstVarNames: oldMeta instVarNames; organization: oldMeta organization. "Recompile the meta class" oldMeta hasMethods ifTrue:[newMeta compileAllFrom: oldMeta]. "Record the meta class change" self recordClass: oldMeta replacedBy: newMeta. "And create a new instance" ^newMeta adoptInstance: oldClass from: oldMeta! Item was changed: ----- Method: ClassBuilder>>reshapeClass:toSuper: (in category 'class mutation') ----- reshapeClass: oldClass toSuper: newSuper "Reshape the given class to the new super class. Recompile all the methods in the newly created class. Answer the new class." | instVars | + instVars := instVarMap at: oldClass name ifAbsent: [oldClass instVarNames]. - "ar 9/22/2002: The following is a left-over from some older code. - I do *not* know why we uncompact oldClass here. If you do, then - please let me know so I can put a comment here..." - oldClass becomeUncompact. - - instVars := instVarMap at: oldClass name ifAbsent:[oldClass instVarNames]. - ^self newSubclassOf: newSuper type: oldClass typeOfClass instanceVariables: instVars from: oldClass! Item was added: + ----- Method: CompiledMethod>>at:ifAbsent: (in category 'accessing') ----- + at: index ifAbsent: exceptionBlock + "Answer the element at my position index. If I do not contain an element + at index, answer the result of evaluating the argument, exceptionBlock." + + (index <= self size and: [self initialPC <= index]) ifTrue: [^self at: index]. + ^exceptionBlock value! Item was removed: - ----- Method: Object>>indexIfCompact (in category 'objects from disk') ----- - indexIfCompact - - ^0 "helps avoid a #respondsTo: in publishing"! From eliot.miranda at gmail.com Sat Aug 22 17:15:47 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Aug 22 17:15:51 2015 Subject: [squeak-dev] Update stream transition In-Reply-To: References: <20150806040235.GA62405@shell.msen.com> <20150822141544.GA8111@shell.msen.com> Message-ID: On Sat, Aug 22, 2015 at 9:15 AM, karl ramberg wrote: > "Sour"- pre Spur Squeak ;-) > I know :-/. I make that typo all the time, o and p being right next to each other on my qwerty kbd. Forgive me! > > Karl > > On Sat, Aug 22, 2015 at 5:12 PM, Eliot Miranda > wrote: > >> Hi David, >> >> Sent from my iPhone >> >> > On Aug 22, 2015, at 7:15 AM, David T. Lewis >> wrote: >> > >> > Currently we have the problem that an existing trunk image from prior >> > to the Squeak 4.6 release will lock up if the user does a normal >> > "update from server". A knowledgeable user can work around this, as >> > with the script that Nicolas provides. But a year from now our tribal >> > knowledge is likely to dissipate, so I don't really like the idea of >> > having the original trunk update stream end in a frozen image. >> > >> > I think I have come up with a way to have the update stream switch >> > automatically from trunk to squeak46 for existing images, see attached >> > change set. The idea is to add this class into a separate package >> > "Temp-update-strean-migration" in the trunk repository, and add that >> > package to the last update map that worked for V3 images (I think this >> > is update-eem.321.mcm, is that right?). The package loads a class that >> > checks to see if the image needs to be switched from trunk to squeak46, >> > and changes the update preference accordingly. It then removes itself >> > from the system. >> > >> > Does this seem reasonable? >> >> Oh yes! Looks a v good idea. The only thing I could think of was adding >> a preamble to trunk Kernel & System to have them error on non Sour. But >> your proposal above is /much/ better. >> >> > >> > Dave >> > >> > >> > >> >> On Thu, Aug 06, 2015 at 10:24:31PM +0200, Nicolas Cellier wrote: >> >> 2015-08-06 16:47 GMT+02:00 Chris Muller : >> >> >> >>>> We currently have the trunk update stream, which is governed by >> update >> >>> maps >> >>>> called 'update' in the source.squeak.org/trunk repository. This >> update >> >>>> stream is applicable to Squeak images up to the initial release of >> the >> >>>> Squeak 4.6 image. These are images in the non-Spur image formats >> (6504 >> >>>> or 6505 for 32-bit images, and 68002 for a 64-bit image). >> >>> >> >>> The .spur branch has already been collapsed onto trunk. There is no >> >>> way to advance a non-spur image except through commits to the release >> >>> repositories (e.g., 'squea46'). >> >> Hi, >> >> >> >> FYI, I advanced the non spur with attached snippet (nothing really >> clever). >> >> >> >> Cheers >> > >> >> "update to latest cog version but not spur..." >> > >> > | url repository updateList updater lastUpdateMap config | >> > url := MCMcmUpdater defaultUpdateURL. >> > repository := MCRepositoryGroup default repositories >> > detect:[:r| r description = url] >> > ifNone:[ | r | >> > r := MCHttpRepository location: url user: '' password: >> ''. >> > MCRepositoryGroup default addRepository: r. >> > r]. >> > updater := [MCMcmUpdater default] ifError: [MCMcmUpdater]. >> > lastUpdateMap := [updater lastUpdateMap] ifError: [MCMcmUpdater >> classPool at: #LastUpdateMap]. >> > updateList := updater updateListFor: repository. >> > updateList := updateList select: [:e | e key < 323]. >> > updateList := updater refreshUpdateMapFor: repository with: updateList. >> > updateList do:[:assoc| >> > ProgressNotification signal: '' extra: 'Processing ', >> assoc value. >> > config := repository versionNamed: assoc value. >> > updater updateFromConfig: config. >> > lastUpdateMap at: repository description put: assoc key. >> > ] displayingProgress: 'Processing configurations'. >> > config ifNil: [^updater inform: 'Unable to retrieve updates from remote >> repository.' translated]. >> > config setSystemVersion. >> > updater inform: ('Update completed. >> > Current update number: ' translated, SystemVersion current >> highestUpdate). >> > >> > >> > >> >> > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150822/7cec6dd5/attachment-0001.htm From karlramberg at gmail.com Sat Aug 22 20:00:34 2015 From: karlramberg at gmail.com (karl ramberg) Date: Sat Aug 22 20:00:37 2015 Subject: [squeak-dev] Update stream transition In-Reply-To: References: <20150806040235.GA62405@shell.msen.com> <20150822141544.GA8111@shell.msen.com> Message-ID: I was just noticing the pun :-) On Sat, Aug 22, 2015 at 7:15 PM, Eliot Miranda wrote: > > > On Sat, Aug 22, 2015 at 9:15 AM, karl ramberg > wrote: > >> "Sour"- pre Spur Squeak ;-) >> > > I know :-/. I make that typo all the time, o and p being right next to > each other on my qwerty kbd. Forgive me! > > > >> >> Karl >> >> On Sat, Aug 22, 2015 at 5:12 PM, Eliot Miranda >> wrote: >> >>> Hi David, >>> >>> Sent from my iPhone >>> >>> > On Aug 22, 2015, at 7:15 AM, David T. Lewis >>> wrote: >>> > >>> > Currently we have the problem that an existing trunk image from prior >>> > to the Squeak 4.6 release will lock up if the user does a normal >>> > "update from server". A knowledgeable user can work around this, as >>> > with the script that Nicolas provides. But a year from now our tribal >>> > knowledge is likely to dissipate, so I don't really like the idea of >>> > having the original trunk update stream end in a frozen image. >>> > >>> > I think I have come up with a way to have the update stream switch >>> > automatically from trunk to squeak46 for existing images, see attached >>> > change set. The idea is to add this class into a separate package >>> > "Temp-update-strean-migration" in the trunk repository, and add that >>> > package to the last update map that worked for V3 images (I think this >>> > is update-eem.321.mcm, is that right?). The package loads a class that >>> > checks to see if the image needs to be switched from trunk to squeak46, >>> > and changes the update preference accordingly. It then removes itself >>> > from the system. >>> > >>> > Does this seem reasonable? >>> >>> Oh yes! Looks a v good idea. The only thing I could think of was >>> adding a preamble to trunk Kernel & System to have them error on non Sour. >>> But your proposal above is /much/ better. >>> >>> > >>> > Dave >>> > >>> > >>> > >>> >> On Thu, Aug 06, 2015 at 10:24:31PM +0200, Nicolas Cellier wrote: >>> >> 2015-08-06 16:47 GMT+02:00 Chris Muller : >>> >> >>> >>>> We currently have the trunk update stream, which is governed by >>> update >>> >>> maps >>> >>>> called 'update' in the source.squeak.org/trunk repository. This >>> update >>> >>>> stream is applicable to Squeak images up to the initial release of >>> the >>> >>>> Squeak 4.6 image. These are images in the non-Spur image formats >>> (6504 >>> >>>> or 6505 for 32-bit images, and 68002 for a 64-bit image). >>> >>> >>> >>> The .spur branch has already been collapsed onto trunk. There is no >>> >>> way to advance a non-spur image except through commits to the release >>> >>> repositories (e.g., 'squea46'). >>> >> Hi, >>> >> >>> >> FYI, I advanced the non spur with attached snippet (nothing really >>> clever). >>> >> >>> >> Cheers >>> > >>> >> "update to latest cog version but not spur..." >>> > >>> > | url repository updateList updater lastUpdateMap config | >>> > url := MCMcmUpdater defaultUpdateURL. >>> > repository := MCRepositoryGroup default repositories >>> > detect:[:r| r description = url] >>> > ifNone:[ | r | >>> > r := MCHttpRepository location: url user: '' password: >>> ''. >>> > MCRepositoryGroup default addRepository: r. >>> > r]. >>> > updater := [MCMcmUpdater default] ifError: [MCMcmUpdater]. >>> > lastUpdateMap := [updater lastUpdateMap] ifError: [MCMcmUpdater >>> classPool at: #LastUpdateMap]. >>> > updateList := updater updateListFor: repository. >>> > updateList := updateList select: [:e | e key < 323]. >>> > updateList := updater refreshUpdateMapFor: repository with: updateList. >>> > updateList do:[:assoc| >>> > ProgressNotification signal: '' extra: 'Processing ', >>> assoc value. >>> > config := repository versionNamed: assoc value. >>> > updater updateFromConfig: config. >>> > lastUpdateMap at: repository description put: assoc key. >>> > ] displayingProgress: 'Processing configurations'. >>> > config ifNil: [^updater inform: 'Unable to retrieve updates from >>> remote repository.' translated]. >>> > config setSystemVersion. >>> > updater inform: ('Update completed. >>> > Current update number: ' translated, SystemVersion current >>> highestUpdate). >>> > >>> > >>> > >>> >>> >> >> >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150822/4b370bb0/attachment.htm From commits at source.squeak.org Sat Aug 22 20:49:08 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 22 20:49:09 2015 Subject: [squeak-dev] The Trunk: Collections-ul.647.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.647.mcz ==================== Summary ==================== Name: Collections-ul.647 Author: ul Time: 22 August 2015, 10:44:11.184 pm UUID: 8f7a52eb-415a-4aaf-9b8a-26ff5d388a10 Ancestors: Collections-ul.646 - in Spur we can speed up Character >> #sameAs: by using #== =============== Diff against Collections-ul.646 =============== Item was changed: ----- Method: Character>>sameAs: (in category 'comparing') ----- sameAs: aCharacter "Answer whether the receiver is equal to aCharacter, ignoring case" + + self == aCharacter ifTrue: [ ^true ]. + ^self asLowercase == aCharacter asLowercase! - ^ (self asLowercase = aCharacter asLowercase) ! From commits at source.squeak.org Sat Aug 22 20:49:23 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 22 20:49:25 2015 Subject: [squeak-dev] The Trunk: Regex-Core-ul.40.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Core-ul.40.mcz ==================== Summary ==================== Name: Regex-Core-ul.40 Author: ul Time: 22 August 2015, 10:43:08.836 pm UUID: ea54abd3-fd5c-44b5-90a4-f129cd1848eb Ancestors: Regex-Core-ul.39 RxsPredicate: - added \t \n escapes for tab and lf - unified all single character predicates as #beCharacter: - postscript reinitializes the dictionary RxMatchOptimizer: - removed lookarounds, because they were never used, just collected - all collections get initialized lazily - CharacterSet are used for storing characters - IdentitySets are used where unique objects are stored (e.g. symbols) - use #== and #~~ for character comparison (Spur-specific change) RxMatcher: - reuse previous markerPositions - use String >> #new:streamContents: where possible - use #== and #~~ for character comparison (Spur-specific change) - quick returns in #tryMatch General: - renamed RxmLookahaed to RxmLookahead - in RxmPredicate >> #matchAgainst: use the fact that aMatcher is providing a ReadStream of characters, so nil means end of stream - reimplemented RxmSubstring =============== Diff against Regex-Core-ul.39 =============== Item was changed: Object subclass: #RxMatchOptimizer + instanceVariableNames: 'ignoreCase prefixes nonPrefixes conditions testBlock methodPredicates nonMethodPredicates predicates nonPredicates' - instanceVariableNames: 'ignoreCase prefixes nonPrefixes conditions testBlock methodPredicates nonMethodPredicates predicates nonPredicates lookarounds' classVariableNames: '' poolDictionaries: '' category: 'Regex-Core'! !RxMatchOptimizer commentStamp: 'Tbn 11/12/2010 23:13' prior: 0! -- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov -- A match start optimizer, handy for searching a string. Takes a regex syntax tree and sets itself up so that prefix characters or matcher states that cannot start a match are later recognized with #canStartMatch:in: method. Used by RxMatcher, but can be used by other matchers (if implemented) as well.! Item was added: + ----- Method: RxMatchOptimizer>>addCondition: (in category 'private') ----- + addCondition: aSymbol + + ^(conditions ifNil: [ conditions := IdentitySet new: 1 ]) add: aSymbol! Item was added: + ----- Method: RxMatchOptimizer>>addMethodPredicate: (in category 'private') ----- + addMethodPredicate: aSelector + + ^(methodPredicates ifNil: [ methodPredicates := IdentitySet new: 1 ]) add: aSelector! Item was added: + ----- Method: RxMatchOptimizer>>addNonMethodPredicate: (in category 'private') ----- + addNonMethodPredicate: aSelector + + ^(nonMethodPredicates ifNil: [ nonMethodPredicates := IdentitySet new: 1 ]) add: aSelector! Item was added: + ----- Method: RxMatchOptimizer>>addNonPredicate: (in category 'private') ----- + addNonPredicate: nonPredicate + + ^(nonPredicates ifNil: [ nonPredicates := Set new: 1 ]) add: nonPredicate! Item was added: + ----- Method: RxMatchOptimizer>>addNonPrefix: (in category 'private') ----- + addNonPrefix: aCharacter + + ^(nonPrefixes ifNil: [ nonPrefixes := CharacterSet new ]) add: aCharacter! Item was added: + ----- Method: RxMatchOptimizer>>addPredicate: (in category 'private') ----- + addPredicate: predicate + + ^(predicates ifNil: [ predicates := Set new: 1 ]) add: predicate! Item was added: + ----- Method: RxMatchOptimizer>>addPrefix: (in category 'private') ----- + addPrefix: aCharacter + + ^(prefixes ifNil: [ prefixes := CharacterSet new ]) add: aCharacter! Item was changed: ----- Method: RxMatchOptimizer>>conditionTester (in category 'accessing') ----- conditionTester "#any condition is filtered at the higher level; it cannot appear among the conditions here." | matchConditions size | + conditions ifNil: [ ^nil ]. + (size := conditions size) = 0 ifTrue: [ ^nil ]. - (size := conditions size) = 0ifTrue: [ ^nil ]. size = 1 ifTrue: [ | matchCondition | matchCondition := conditions anyOne. "Special case all of the possible conditions." #atBeginningOfLine == matchCondition ifTrue: [^[:c :matcher | matcher atBeginningOfLine]]. #atEndOfLine == matchCondition ifTrue: [^[:c :matcher | matcher atEndOfLine]]. #atBeginningOfWord == matchCondition ifTrue: [^[:c :matcher | matcher atBeginningOfWord]]. #atEndOfWord == matchCondition ifTrue: [^[:c :matcher | matcher atEndOfWord]]. #atWordBoundary == matchCondition ifTrue: [^[:c :matcher | matcher atWordBoundary]]. #notAtWordBoundary == matchCondition ifTrue: [^[:c :matcher | matcher notAtWordBoundary]]. RxParser signalCompilationException: 'invalid match condition']. "More than one condition. Capture them as an array in scope." matchConditions := conditions asArray. ^[ :c :matcher | matchConditions anySatisfy: [ :conditionSelector | matcher perform: conditionSelector ] ]! Item was changed: ----- Method: RxMatchOptimizer>>determineTestMethod (in category 'private') ----- determineTestMethod "Answer a block closure that will work as a can-match predicate. Answer nil if no viable optimization is possible (too many chars would be able to start a match)." | testers size | + conditions ifNotNil: [ + (conditions includes: #any) ifTrue: [ ^nil ] ]. - (conditions includes: #any) ifTrue: [^nil]. testers := { self prefixTester. self nonPrefixTester. self conditionTester. self methodPredicateTester. self nonMethodPredicateTester. self predicateTester. self nonPredicateTester } reject: [ :each | each isNil ]. (size := testers size) = 0 ifTrue: [ ^nil ]. size = 1 ifTrue: [ ^testers first ]. ^[ :char :matcher | testers anySatisfy: [ :t | t value: char value: matcher ] ]! Item was changed: ----- Method: RxMatchOptimizer>>initialize:ignoreCase: (in category 'initialize-release') ----- initialize: aRegex ignoreCase: aBoolean "Set `testMethod' variable to a can-match predicate block: two-argument block which accepts a lookahead character and a matcher (presumably built from aRegex) and answers a boolean indicating whether a match could start at the given lookahead. " ignoreCase := aBoolean. + aRegex dispatchTo: self. + "If the whole expression is nullable, end-of-line is an implicit can-match condition!!" + aRegex isNullable ifTrue: [ self addCondition: #atEndOfLine ]. - prefixes := IdentitySet new: 10. - nonPrefixes := IdentitySet new: 10. - conditions := IdentitySet new: 3. - methodPredicates := Set new: 3. - nonMethodPredicates := Set new: 3. - predicates := Set new: 3. - nonPredicates := Set new: 3. - lookarounds := Set new: 3. - aRegex dispatchTo: self. "If the whole expression is nullable, - end-of-line is an implicit can-match condition!!" - aRegex isNullable ifTrue: [conditions add: #atEndOfLine]. testBlock := self determineTestMethod! Item was changed: ----- Method: RxMatchOptimizer>>methodPredicateTester (in category 'accessing') ----- methodPredicateTester | p size | + methodPredicates ifNil: [ ^nil ]. (size := methodPredicates size) = 0 ifTrue: [ ^nil ]. size = 1 ifTrue: [ | selector | "might be a pretty common case" selector := methodPredicates anyOne. ^[ :char :matcher | RxParser doHandlingMessageNotUnderstood: [ char perform: selector ] ] ]. p := methodPredicates asArray. ^[ :char :matcher | RxParser doHandlingMessageNotUnderstood: [ p anySatisfy: [ :sel | char perform: sel ] ] ]! Item was changed: ----- Method: RxMatchOptimizer>>nonMethodPredicateTester (in category 'accessing') ----- nonMethodPredicateTester | p size | + nonMethodPredicates ifNil: [ ^nil ]. (size := nonMethodPredicates size) = 0 ifTrue: [ ^nil ]. size = 1 ifTrue: [ | selector | selector := nonMethodPredicates anyOne. ^[ :char :matcher | RxParser doHandlingMessageNotUnderstood: [ (char perform: selector) not ] ] ]. p := nonMethodPredicates asArray. ^[:char :m | RxParser doHandlingMessageNotUnderstood: [ (p allSatisfy: [:sel | char perform: sel ]) not ] ]! Item was changed: ----- Method: RxMatchOptimizer>>nonPredicateTester (in category 'private') ----- nonPredicateTester | p size | + nonPredicates ifNil: [ ^nil ]. (size := nonPredicates size) = 0 ifTrue: [ ^nil ]. size = 1 ifTrue: [ | predicate | predicate := nonPredicates anyOne. ^[ :char :matcher | (predicate value: char) not] ]. p := nonPredicates asArray. ^[ :char :m | (p allSatisfy: [:some | some value: char ]) not ]! Item was changed: ----- Method: RxMatchOptimizer>>nonPrefixTester (in category 'private') ----- nonPrefixTester | size | + nonPrefixes ifNil: [ ^nil ]. (size := nonPrefixes size) = 0 ifTrue: [ ^nil ]. size = 1 ifTrue: [ | nonPrefixChar | nonPrefixChar := nonPrefixes anyOne. + ^[ :char :matcher | char ~~ nonPrefixChar ] ]. - ^[ :char :matcher | char ~= nonPrefixChar ] ]. ^[ :char : matcher | (nonPrefixes includes: char) not ]! Item was changed: ----- Method: RxMatchOptimizer>>predicateTester (in category 'private') ----- predicateTester | p size | + predicates ifNil: [ ^nil ]. (size := predicates size) = 0 ifTrue: [ ^nil ]. size = 1 ifTrue: [ | pred | pred := predicates anyOne. ^[ :char :matcher | pred value: char ] ]. p := predicates asArray. ^[ :char :matcher | p anySatisfy: [:some | some value: char ] ]! Item was changed: ----- Method: RxMatchOptimizer>>prefixTester (in category 'private') ----- prefixTester | p size | + prefixes ifNil: [ ^nil ]. (size := prefixes size) = 0 ifTrue: [ ^nil ]. size = 1 ifTrue: [ | prefixChar | prefixChar := prefixes anyOne. ignoreCase ifTrue: [ ^[ :char :matcher | char sameAs: prefixChar ] ]. + ^[ :char :matcher | char == prefixChar ] ]. - ^[ :char :matcher | char = prefixChar ] ]. ignoreCase ifFalse: [ ^[ :char :matcher | prefixes includes: char ] ]. p := prefixes collect: [ :each | each asUppercase ]. ^[ :char :matcher | p includes: char asUppercase ]! Item was changed: ----- Method: RxMatchOptimizer>>syntaxAny (in category 'double dispatch') ----- syntaxAny "Any special char is among the prefixes." + self addCondition: #any! - conditions add: #any! Item was changed: ----- Method: RxMatchOptimizer>>syntaxBeginningOfLine (in category 'double dispatch') ----- syntaxBeginningOfLine "Beginning of line is among the prefixes." + self addCondition: #atBeginningOfLine! - conditions add: #atBeginningOfLine! Item was changed: ----- Method: RxMatchOptimizer>>syntaxBeginningOfWord (in category 'double dispatch') ----- syntaxBeginningOfWord "Beginning of line is among the prefixes." + self addCondition: #atBeginningOfWord! - conditions add: #atBeginningOfWord! Item was changed: ----- Method: RxMatchOptimizer>>syntaxCharSet: (in category 'double dispatch') ----- syntaxCharSet: charSetNode "All these (or none of these) characters is the prefix." (charSetNode enumerableSetIgnoringCase: ignoreCase) ifNotNil: [ :enumerableSet | charSetNode isNegated + ifTrue: [ enumerableSet do: [ :each | self addNonPrefix: each ] ] + ifFalse: [ enumerableSet do: [ :each | self addPrefix: each ] ] ]. + - ifTrue: [ nonPrefixes addAll: enumerableSet ] - ifFalse: [ prefixes addAll: enumerableSet ] ]. charSetNode predicates ifNotNil: [ :charsetPredicates | charSetNode isNegated + ifTrue: [ + charsetPredicates do: [ :each | self addNonPredicate: each ] ] + ifFalse: [ + charsetPredicates do: [ :each | self addPredicate: each ] ] ]! - ifTrue: [ nonPredicates addAll: charsetPredicates ] - ifFalse: [ predicates addAll: charsetPredicates ] ]! Item was changed: ----- Method: RxMatchOptimizer>>syntaxCharacter: (in category 'double dispatch') ----- syntaxCharacter: charNode "This character is the prefix, of one of them." + self addPrefix: charNode character! - prefixes add: charNode character! Item was changed: ----- Method: RxMatchOptimizer>>syntaxEndOfLine (in category 'double dispatch') ----- syntaxEndOfLine "Beginning of line is among the prefixes." + self addCondition: #atEndOfLine! - conditions add: #atEndOfLine! Item was changed: ----- Method: RxMatchOptimizer>>syntaxEndOfWord (in category 'double dispatch') ----- syntaxEndOfWord + self addCondition: #atEndOfWord! - conditions add: #atEndOfWord! Item was changed: ----- Method: RxMatchOptimizer>>syntaxLookaround: (in category 'double dispatch') ----- syntaxLookaround: lookaroundNode + "Do nothing."! - - - lookarounds add: lookaroundNode! Item was changed: ----- Method: RxMatchOptimizer>>syntaxMessagePredicate: (in category 'double dispatch') ----- syntaxMessagePredicate: messagePredicateNode + + messagePredicateNode negated ifTrue: [ + ^self addNonMethodPredicate: messagePredicateNode selector ]. + self addMethodPredicate: messagePredicateNode selector! - messagePredicateNode negated - ifTrue: [nonMethodPredicates add: messagePredicateNode selector] - ifFalse: [methodPredicates add: messagePredicateNode selector]! Item was changed: ----- Method: RxMatchOptimizer>>syntaxNonWordBoundary (in category 'double dispatch') ----- syntaxNonWordBoundary + self addCondition: #notAtWordBoundary! - conditions add: #notAtWordBoundary! Item was changed: ----- Method: RxMatchOptimizer>>syntaxPredicate: (in category 'double dispatch') ----- syntaxPredicate: predicateNode + self addPredicate: predicateNode predicate! - predicates add: predicateNode predicate! Item was changed: ----- Method: RxMatchOptimizer>>syntaxWordBoundary (in category 'double dispatch') ----- syntaxWordBoundary + self addCondition: #atWordBoundary! - conditions add: #atWordBoundary! Item was changed: Object subclass: #RxMatcher + instanceVariableNames: 'matcher ignoreCase startOptimizer stream markerPositions markerCount lastResult oldMarkerPositions' - instanceVariableNames: 'matcher ignoreCase startOptimizer stream markerPositions markerCount lastResult' classVariableNames: 'Cr Lf' poolDictionaries: '' category: 'Regex-Core'! !RxMatcher commentStamp: 'Tbn 11/12/2010 23:13' prior: 0! -- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov -- This is a recursive regex matcher. Not strikingly efficient, but simple. Also, keeps track of matched subexpressions. The life cycle goes as follows: 1. Initialization. Accepts a syntax tree (presumably produced by RxParser) and compiles it into a matcher built of other classes in this category. 2. Matching. Accepts a stream or a string and returns a boolean indicating whether the whole stream or its prefix -- depending on the message sent -- matches the regex. 3. Subexpression query. After a successful match, and before any other match, the matcher may be queried about the range of specific stream (string) positions that matched to certain parenthesized subexpressions of the original expression. Any number of queries may follow a successful match, and any number or matches may follow a successful initialization. Note that `matcher' is actually a sort of a misnomer. The actual matcher is a web of Rxm* instances built by RxMatcher during initialization. RxMatcher is just the interface facade of this network. It is also a builder of it, and also provides a stream-like protocol to easily access the stream being matched. Instance variables: matcher The entry point into the actual matcher. stream The stream currently being matched against. markerPositions Positions of markers' matches. markerCount Number of markers. lastResult Whether the latest match attempt succeeded or not. lastChar character last seen in the matcher stream! Item was changed: ----- Method: RxMatcher>>copy:replacingMatchesWith: (in category 'match enumeration') ----- copy: aString replacingMatchesWith: replacementString "Copy , except for the matches. Replace each match with ." + ^String new: (aString size min: 1000) streamContents: [ :stream | + self + copyStream: aString readStream + to: stream + replacingMatchesWith: replacementString ]! - | answer | - answer := (String new: 40) writeStream. - self - copyStream: aString readStream - to: answer - replacingMatchesWith: replacementString. - ^answer contents! Item was changed: ----- Method: RxMatcher>>copyStream:to:replacingMatchesWith: (in category 'match enumeration') ----- copyStream: aStream to: writeStream replacingMatchesWith: aString "Copy the contents of on the , except for the matches. Replace each match with ." | searchStart matchStart matchEnd | stream := aStream. + oldMarkerPositions := markerPositions := nil. - markerPositions := nil. [searchStart := aStream position. self proceedSearchingStream: aStream] whileTrue: [matchStart := (self subBeginning: 1) first. matchEnd := (self subEnd: 1) first. aStream position: searchStart. searchStart to: matchStart - 1 do: [:ignoredPos | writeStream nextPut: aStream next]. writeStream nextPutAll: aString. aStream position: matchEnd. "Be extra careful about successful matches which consume no input. After those, make sure to advance or finish if already at end." matchEnd = searchStart ifTrue: [aStream atEnd ifTrue: [^self "rest after end of whileTrue: block is a no-op if atEnd"] ifFalse: [writeStream nextPut: aStream next]]]. aStream position: searchStart. [aStream atEnd] whileFalse: [writeStream nextPut: aStream next]! Item was changed: ----- Method: RxMatcher>>copyStream:to:translatingMatchesUsing: (in category 'match enumeration') ----- copyStream: aStream to: writeStream translatingMatchesUsing: aBlock "Copy the contents of on the , except for the matches. For each match, evaluate passing the matched substring as the argument. Expect the block to answer a String, and write the answer to in place of the match." | searchStart matchStart matchEnd match | stream := aStream. + oldMarkerPositions := markerPositions := nil. - markerPositions := nil. [searchStart := aStream position. self proceedSearchingStream: aStream] whileTrue: [matchStart := (self subBeginning: 1) first. matchEnd := (self subEnd: 1) first. aStream position: searchStart. searchStart to: matchStart - 1 do: [:ignoredPos | writeStream nextPut: aStream next]. match := (String new: matchEnd - matchStart + 1) writeStream. matchStart to: matchEnd - 1 do: [:ignoredPos | match nextPut: aStream next]. writeStream nextPutAll: (aBlock value: match contents). "Be extra careful about successful matches which consume no input. After those, make sure to advance or finish if already at end." matchEnd = searchStart ifTrue: [aStream atEnd ifTrue: [^self "rest after end of whileTrue: block is a no-op if atEnd"] ifFalse: [writeStream nextPut: aStream next]]]. aStream position: searchStart. [aStream atEnd] whileFalse: [writeStream nextPut: aStream next]! Item was changed: ----- Method: RxMatcher>>matchesStreamPrefix: (in category 'accessing') ----- matchesStreamPrefix: theStream "Match thyself against a positionable stream." stream := theStream. + oldMarkerPositions := markerPositions := nil. - markerPositions := nil. ^self tryMatch! Item was changed: ----- Method: RxMatcher>>searchStream: (in category 'accessing') ----- searchStream: aStream "Search the stream for occurrence of something matching myself. After the search has occurred, stop positioned after the end of the matched substring. Answer a Boolean indicating success." | position | stream := aStream. position := aStream position. + oldMarkerPositions := markerPositions := nil. - markerPositions := nil. [aStream atEnd] whileFalse: [self tryMatch ifTrue: [^true]. aStream position: position; next. position := aStream position]. "Try match at the very stream end too!!" + ^self tryMatch! - self tryMatch ifTrue: [^true]. - ^false! Item was changed: ----- Method: RxMatcher>>syntaxCharacter: (in category 'double dispatch') ----- syntaxCharacter: charNode "Double dispatch from the syntax tree. We get here when no merging characters into strings was possible." | wanted | wanted := charNode character. ^RxmPredicate new predicate: (ignoreCase ifTrue: [[:char | char sameAs: wanted]] + ifFalse: [[:char | char == wanted]])! - ifFalse: [[:char | char = wanted]])! Item was changed: ----- Method: RxMatcher>>syntaxLookaround: (in category 'double dispatch') ----- syntaxLookaround: lookaroundNode "Double dispatch from the syntax tree. Special link can handle lookarounds (look ahead, positive and negative)." | piece | piece := lookaroundNode piece dispatchTo: self. + ^ RxmLookahead with: piece! - ^ RxmLookahaed with: piece! Item was changed: ----- Method: RxMatcher>>tryMatch (in category 'private') ----- tryMatch "Match thyself against the current stream." + | newMarkerPositions | + newMarkerPositions := oldMarkerPositions. - | oldMarkerPositions | oldMarkerPositions := markerPositions. + markerPositions := newMarkerPositions. + markerPositions + ifNil: [ + markerPositions := Array new: markerCount. + 1 to: markerCount do: [ :i | + | collection | + collection := OrderedCollection new: 2. "There are usually 0 or 1 objects to store." + collection resetTo: 3. "We'll add elements to the beginning, so make room there." + markerPositions at: i put: collection ] ] + ifNotNil: [ + 1 to: markerCount do: [ :i | + | collection | + collection := markerPositions at: i. + collection resetTo: collection capacity + 1 ] ]. + lastResult := startOptimizer + ifNil: [ matcher matchAgainst: self] + ifNotNil: [ (startOptimizer canStartMatch: stream peek in: self) and: [ matcher matchAgainst: self ] ]. - markerPositions := Array new: markerCount. - 1 to: markerCount do: [ :i | - | collection | - collection := OrderedCollection new. - collection resetTo: collection capacity + 1. "We'll add element to the beginning, so make room there." - markerPositions at: i put: collection ]. - lastResult := startOptimizer isNil - ifTrue: [ matcher matchAgainst: self] - ifFalse: [ (startOptimizer canStartMatch: stream peek in: self) and: [ matcher matchAgainst: self ] ]. "check for duplicates" + lastResult ifFalse: [ ^false ]. + oldMarkerPositions ifNil: [ ^true ]. + (oldMarkerPositions hasEqualElements: markerPositions) ifFalse: [ ^true ]. - (lastResult not or: [ oldMarkerPositions isNil or: [ oldMarkerPositions size ~= markerPositions size ] ]) - ifTrue: [ ^ lastResult ]. - oldMarkerPositions with: markerPositions do: [ :oldPos :newPos | - oldPos size = newPos size - ifFalse: [ ^ lastResult ]. - oldPos with: newPos do: [ :old :new | - old = new - ifFalse: [ ^ lastResult ] ] ]. "this is a duplicate" ^ lastResult := false! Item was removed: - RxmLink subclass: #RxmLookahaed - instanceVariableNames: 'lookahead positive' - classVariableNames: '' - poolDictionaries: '' - category: 'Regex-Core'! - - !RxmLookahaed commentStamp: '' prior: 0! - Instance holds onto a lookead which matches but does not consume anything. - - Instance variables: - predicate ! Item was removed: - ----- Method: RxmLookahaed class>>with: (in category 'instance creation') ----- - with: aPiece - - ^self new lookahead: aPiece! Item was removed: - ----- Method: RxmLookahaed>>initialize (in category 'initialization') ----- - initialize - super initialize. - positive := true.! Item was removed: - ----- Method: RxmLookahaed>>lookahead (in category 'accessing') ----- - lookahead - ^ lookahead! Item was removed: - ----- Method: RxmLookahaed>>lookahead: (in category 'accessing') ----- - lookahead: anRxmLink - lookahead := anRxmLink! Item was removed: - ----- Method: RxmLookahaed>>matchAgainst: (in category 'matching') ----- - matchAgainst: aMatcher - "Match if the predicate block evaluates to true when given the - current stream character as the argument." - - | original result | - original := aMatcher currentState. - result := lookahead matchAgainst: aMatcher. - aMatcher restoreState: original. - ^ result not - and: [ next matchAgainst: aMatcher ]! Item was removed: - ----- Method: RxmLookahaed>>terminateWith: (in category 'building') ----- - terminateWith: aNode - lookahead terminateWith: aNode. - super terminateWith: aNode.! Item was added: + RxmLink subclass: #RxmLookahead + instanceVariableNames: 'lookahead positive' + classVariableNames: '' + poolDictionaries: '' + category: 'Regex-Core'! + + !RxmLookahead commentStamp: '' prior: 0! + Instance holds onto a lookead which matches but does not consume anything. + + Instance variables: + predicate ! Item was added: + ----- Method: RxmLookahead class>>with: (in category 'instance creation') ----- + with: aPiece + + ^self new lookahead: aPiece! Item was added: + ----- Method: RxmLookahead>>initialize (in category 'initialization') ----- + initialize + super initialize. + positive := true.! Item was added: + ----- Method: RxmLookahead>>lookahead (in category 'accessing') ----- + lookahead + ^ lookahead! Item was added: + ----- Method: RxmLookahead>>lookahead: (in category 'accessing') ----- + lookahead: anRxmLink + lookahead := anRxmLink! Item was added: + ----- Method: RxmLookahead>>matchAgainst: (in category 'matching') ----- + matchAgainst: aMatcher + "Match if the predicate block evaluates to true when given the + current stream character as the argument." + + | original result | + original := aMatcher currentState. + result := lookahead matchAgainst: aMatcher. + aMatcher restoreState: original. + ^ result not + and: [ next matchAgainst: aMatcher ]! Item was added: + ----- Method: RxmLookahead>>terminateWith: (in category 'building') ----- + terminateWith: aNode + lookahead terminateWith: aNode. + super terminateWith: aNode.! Item was changed: ----- Method: RxmPredicate>>matchAgainst: (in category 'matching') ----- matchAgainst: aMatcher "Match if the predicate block evaluates to true when given the current stream character as the argument." + | nextCharacter originalState | + originalState := aMatcher currentState. + nextCharacter := aMatcher next ifNil: [ + aMatcher restoreState: originalState. - | original | - aMatcher atEnd ifTrue: [ ^false ]. - original := aMatcher currentState. - (predicate value: aMatcher next) ifFalse: [ - aMatcher restoreState: original. ^false ]. + (predicate value: nextCharacter) ifTrue: [ + (next matchAgainst: aMatcher) ifTrue: [ ^true ] ]. + aMatcher restoreState: originalState. - (next matchAgainst: aMatcher) ifTrue: [ ^true ]. - aMatcher restoreState: original. ^false ! Item was changed: RxmLink subclass: #RxmSubstring + instanceVariableNames: 'sampleStream caseSensitive ignoreCase' - instanceVariableNames: 'sample compare' classVariableNames: '' poolDictionaries: '' category: 'Regex-Core'! !RxmSubstring commentStamp: 'Tbn 11/12/2010 23:14' prior: 0! -- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov -- Instance holds onto a string and matches exactly this string, and exactly once. Instance variables: string ! Item was removed: - ----- Method: RxmSubstring>>beCaseInsensitive (in category 'initialize-release') ----- - beCaseInsensitive - - compare := [:char1 :char2 | char1 sameAs: char2]! Item was removed: - ----- Method: RxmSubstring>>beCaseSensitive (in category 'initialize-release') ----- - beCaseSensitive - - compare := [:char1 :char2 | char1 = char2]! Item was changed: ----- Method: RxmSubstring>>character:ignoreCase: (in category 'initialize-release') ----- character: aCharacter ignoreCase: aBoolean "Match exactly this character." + sampleStream := (String with: aCharacter) readStream. + ignoreCase := aBoolean! - sample := String with: aCharacter. - aBoolean ifTrue: [self beCaseInsensitive]! Item was changed: ----- Method: RxmSubstring>>initialize (in category 'initialization') ----- initialize + super initialize. + ignoreCase := false! - self beCaseSensitive! Item was changed: ----- Method: RxmSubstring>>matchAgainst: (in category 'matching') ----- matchAgainst: aMatcher "Match if my sample stream is exactly the current prefix of the matcher stream's contents." + | nextSample nextFromMatcher originalState | - | originalState sampleStream nextSample | originalState := aMatcher currentState. + sampleStream reset. + ignoreCase + ifFalse: [ + [ (nextSample := sampleStream next) == nil or: [ (nextFromMatcher := aMatcher next) == nil ] ] whileFalse: [ + nextSample == nextFromMatcher ifFalse: [ + aMatcher restoreState: originalState. + ^false ] ] ] + ifTrue: [ + [ (nextSample := sampleStream next) == nil or: [ (nextFromMatcher := aMatcher next) == nil ] ] whileFalse: [ + (nextSample sameAs: nextFromMatcher) ifFalse: [ + aMatcher restoreState: originalState. + ^false ] ] ]. - sampleStream := self sampleStream. - [ (nextSample := sampleStream next) == nil or: [ aMatcher atEnd ] ] whileFalse: [ - (compare value: nextSample value: aMatcher next) ifFalse: [ - aMatcher restoreState: originalState. - ^false ] ]. (nextSample == nil and: [ next matchAgainst: aMatcher ]) ifTrue: [ ^true ]. aMatcher restoreState: originalState. ^false! Item was removed: - ----- Method: RxmSubstring>>sampleStream (in category 'private') ----- - sampleStream - - ^sample readStream! Item was changed: ----- Method: RxmSubstring>>substring:ignoreCase: (in category 'initialize-release') ----- substring: aString ignoreCase: aBoolean "Match exactly this string." + sampleStream := aString readStream. + ignoreCase := aBoolean! - sample := aString. - aBoolean ifTrue: [self beCaseInsensitive]! Item was changed: ----- Method: RxsPredicate class>>initializeEscapedLetterSelectors (in category 'class initialization') ----- initializeEscapedLetterSelectors "self initializeEscapedLetterSelectors" | newEscapedLetterSelectors | newEscapedLetterSelectors := Dictionary new at: $w put: #beWordConstituent; at: $W put: #beNotWordConstituent; at: $d put: #beDigit; at: $D put: #beNotDigit; at: $s put: #beSpace; at: $S put: #beNotSpace; at: $\ put: #beBackslash; at: $r put: #beCarriageReturn; + at: $n put: #beLineFeed; + at: $t put: #beTab; yourself. EscapedLetterSelectors := newEscapedLetterSelectors! Item was changed: ----- Method: RxsPredicate>>beBackslash (in category 'initialize-release') ----- beBackslash + self beCharacter: $\! - predicate := [:char | char == $\]. - negation := [:char | char ~~ $\]! Item was changed: ----- Method: RxsPredicate>>beCarriageReturn (in category 'initialize-release') ----- beCarriageReturn + self beCharacter: Character cr! - | cr | - cr := Character cr. - predicate := [ :char | char == cr ]. - negation := [ :char | char ~~ cr ]! Item was added: + ----- Method: RxsPredicate>>beCharacter: (in category 'initialize-release') ----- + beCharacter: aCharacter + + predicate := [ :char | char == aCharacter ]. + negation := [ :char | char ~~ aCharacter ]! Item was added: + ----- Method: RxsPredicate>>beLineFeed (in category 'initialize-release') ----- + beLineFeed + + self beCharacter: Character lf! Item was added: + ----- Method: RxsPredicate>>beTab (in category 'initialize-release') ----- + beTab + + self beCharacter: Character tab! Item was added: + (PackageInfo named: 'Regex-Core') postscript: 'RxsPredicate initializeEscapedLetterSelectors'! From commits at source.squeak.org Sat Aug 22 21:53:52 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 22 21:53:55 2015 Subject: [squeak-dev] The Trunk: Regex-Tests-Core-ul.1.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Tests-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Tests-Core-ul.1.mcz ==================== Summary ==================== Name: Regex-Tests-Core-ul.1 Author: ul Time: 12 August 2015, 10:43:52.346 pm UUID: 2538aebb-3e78-4bb8-ad6f-2b0df63e564b Ancestors: - tests from Pharo ==================== Snapshot ==================== SystemOrganization addCategory: #'Regex-Tests-Core'! TestCase subclass: #RxMatcherTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Regex-Tests-Core'! !RxMatcherTest commentStamp: 'Tbn 11/12/2010 22:31' prior: 0! This class provides tests for the regular expression matcher.! ----- Method: RxMatcherTest class>>packageNamesUnderTest (in category 'accessing') ----- packageNamesUnderTest ^ #('VB-Regex')! ----- Method: RxMatcherTest>>compileRegex: (in category 'utilties') ----- compileRegex: aString "Compile the regex and answer the matcher, or answer nil if compilation fails." | syntaxTree | syntaxTree := RxParser safelyParse: aString. ^ syntaxTree isNil ifFalse: [ self matcherClass for: syntaxTree ]! ----- Method: RxMatcherTest>>henryReadme (in category 'testing-henry') ----- henryReadme self error: 'The tests in this category are based on the ones in Henry Spencer''s regexp.c package.'! ----- Method: RxMatcherTest>>matcherClass (in category 'accessing') ----- matcherClass ^ RxMatcher! ----- Method: RxMatcherTest>>runMatcher:with:expect:withSubexpressions: (in category 'utilties') ----- runMatcher: aMatcher with: aString expect: aBoolean withSubexpressions: anArray | copy got | copy := aMatcher copy: aString translatingMatchesUsing: [ :each | each ]. self assert: copy = aString description: 'Copying: expected ' , aString printString , ', but got ' , copy printString. got := aMatcher search: aString. self assert: got = aBoolean description: 'Searching: expected ' , aBoolean printString , ', but got ' , got printString. (anArray isNil or: [ aMatcher supportsSubexpressions not ]) ifTrue: [ ^ self ]. 1 to: anArray size by: 2 do: [ :index | | sub subExpect subGot | sub := anArray at: index. subExpect := anArray at: index + 1. subGot := aMatcher subexpression: sub. self assert: subExpect = subGot description: 'Subexpression ' , sub printString , ': expected ' , subExpect printString , ', but got ' , subGot printString ]! ----- Method: RxMatcherTest>>runRegex: (in category 'utilties') ----- runRegex: anArray "Run a clause anArray against a set of tests. Each clause is an array with a regex source string followed by sequence of 3-tuples. Each three-element group is one test to try against the regex, and includes: 1) test string; 2) expected result; 3) expected subexpression as an array of (index, substring), or nil." | source matcher | source := anArray first. matcher := self compileRegex: source. matcher isNil ifTrue: [ (anArray at: 2) isNil ifFalse: [ self signalFailure: 'Compilation failed, should have succeeded: ' , source printString ] ] ifFalse: [ (anArray at: 2) isNil ifTrue: [ self signalFailure: 'Compilation succeeded, should have failed: ' , source printString ] ifFalse: [ 2 to: anArray size by: 3 do: [ :index | self runMatcher: matcher with: (anArray at: index) expect: (anArray at: index + 1) withSubexpressions: (anArray at: index + 2) ] ] ]! ----- Method: RxMatcherTest>>testCaseInsensitive (in category 'testing-protocol') ----- testCaseInsensitive | matcher | matcher := self matcherClass forString: 'the quick brown fox' ignoreCase: true. self assert: (matcher search: 'the quick brown fox'). self assert: (matcher search: 'The quick brown FOX'). self assert: (matcher search: 'What do you know about the quick brown fox?'). self assert: (matcher search: 'What do you know about THE QUICK BROWN FOX?')! ----- Method: RxMatcherTest>>testCaseSensitive (in category 'testing-protocol') ----- testCaseSensitive | matcher | matcher := self matcherClass forString: 'the quick brown fox' ignoreCase: false. self assert: (matcher search: 'the quick brown fox'). self deny: (matcher search: 'The quick brown FOX'). self assert: (matcher search: 'What do you know about the quick brown fox?'). self deny: (matcher search: 'What do you know about THE QUICK BROWN FOX?')! ----- Method: RxMatcherTest>>testCopyReplacingMatches (in category 'testing-protocol') ----- testCopyReplacingMatches "See that the match context is preserved while copying stuff between matches:" | matcher | matcher := self matcherClass forString: '\<\d\D+'. self assert: (matcher copy: '9aaa1bbb 8ccc' replacingMatchesWith: 'foo') = 'foo1bbb foo'! ----- Method: RxMatcherTest>>testCopyTranslatingMatches (in category 'testing-protocol') ----- testCopyTranslatingMatches | matcher | matcher := self matcherClass forString: '\w+'. self assert: (matcher copy: 'now is the time ' translatingMatchesUsing: [ :each | each reversed ]) = 'won si eht emit '! ----- Method: RxMatcherTest>>testEmptyStringAtBeginningOfLine (in category 'testing-empty') ----- testEmptyStringAtBeginningOfLine | matcher | matcher := self matcherClass forString: '^'. self assert: (matcher copy: 'foo1 bar1' , String cr , 'foo2 bar2' replacingMatchesWith: '*') = ('*foo1 bar1' , String cr , '*foo2 bar2') description: 'An empty string at the beginning of a line'! ----- Method: RxMatcherTest>>testEmptyStringAtBeginningOfWord (in category 'testing-empty') ----- testEmptyStringAtBeginningOfWord | matcher | matcher := self matcherClass forString: '\<'. self assert: (matcher copy: 'foo bar' replacingMatchesWith: '*') = '*foo *bar' description: 'An empty string at the beginning of a word'! ----- Method: RxMatcherTest>>testEmptyStringAtEndOfLine (in category 'testing-empty') ----- testEmptyStringAtEndOfLine | matcher | matcher := self matcherClass forString: '$'. self assert: (matcher copy: 'foo1 bar1' , String cr , 'foo2 bar2' replacingMatchesWith: '*') = ('foo1 bar1*', String cr , 'foo2 bar2*') description: 'An empty string at the end of a line'! ----- Method: RxMatcherTest>>testEmptyStringAtEndOfWord (in category 'testing-empty') ----- testEmptyStringAtEndOfWord | matcher | matcher := self matcherClass forString: '\>'. self assert: (matcher copy: 'foo bar' replacingMatchesWith: '*') = 'foo* bar*' description: 'An empty string at the end of a word'! ----- Method: RxMatcherTest>>testEmptyStringAtWordBoundary (in category 'testing-empty') ----- testEmptyStringAtWordBoundary | matcher | matcher := self matcherClass forString: '\b'. self assert: (matcher copy: 'foo bar' replacingMatchesWith: '*') = '*foo* *bar*' description: 'An empty string at a word boundary'! ----- Method: RxMatcherTest>>testEmptyStringNotAtWordBoundary (in category 'testing-empty') ----- testEmptyStringNotAtWordBoundary | matcher | matcher := self matcherClass forString: '\B'. self assert: (matcher copy: 'foo bar' replacingMatchesWith: '*') = 'f*o*o b*a*r' description: 'An empty string not at a word boundary'! ----- Method: RxMatcherTest>>testHenry001 (in category 'testing-henry') ----- testHenry001 self runRegex: #('abc' 'abc' true (1 'abc') 'xbc' false nil 'axc' false nil 'abx' false nil 'xabcy' true (1 'abc') 'ababc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry002 (in category 'testing-henry') ----- testHenry002 self runRegex: #('ab*c' 'abc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry003 (in category 'testing-henry') ----- testHenry003 self runRegex: #('ab*bc' 'abc' true (1 'abc') 'abbc' true (1 'abbc') 'abbbbc' true (1 'abbbbc'))! ----- Method: RxMatcherTest>>testHenry004 (in category 'testing-henry') ----- testHenry004 self runRegex: #('ab+bc' 'abbc' true (1 'abbc') 'abc' false nil 'abq' false nil 'abbbbc' true (1 'abbbbc'))! ----- Method: RxMatcherTest>>testHenry005 (in category 'testing-henry') ----- testHenry005 self runRegex: #('ab?bc' 'abbc' true (1 'abbc') 'abc' true (1 'abc') 'abbbbc' false nil 'abc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry006 (in category 'testing-henry') ----- testHenry006 self runRegex: #('^abc$' 'abc' true (1 'abc') 'abcc' false nil 'aabc' false nil)! ----- Method: RxMatcherTest>>testHenry007 (in category 'testing-henry') ----- testHenry007 self runRegex: #('^abc' 'abcc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry008 (in category 'testing-henry') ----- testHenry008 self runRegex: #('abc$' 'aabc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry009 (in category 'testing-henry') ----- testHenry009 self runRegex: #('^' 'abc' true nil)! ----- Method: RxMatcherTest>>testHenry010 (in category 'testing-henry') ----- testHenry010 self runRegex: #('$' 'abc' true nil)! ----- Method: RxMatcherTest>>testHenry011 (in category 'testing-henry') ----- testHenry011 self runRegex: #('a.c' 'abc' true (1 'abc') 'axc' true (1 'axc'))! ----- Method: RxMatcherTest>>testHenry012 (in category 'testing-henry') ----- testHenry012 "Need to get creative to include the null character..." self runRegex: #('a.*c' 'axyzc' true (1 'axyzc') 'axy zc' true (1 'axy zc') "testing that a dot matches a space" ), (Array with: 'axy', (String with: 0 asCharacter), 'zc'), #(false nil "testing that a dot does not match a null" 'axyzd' false nil)! ----- Method: RxMatcherTest>>testHenry013 (in category 'testing-henry') ----- testHenry013 self runRegex: #('.a.*' '1234abc' true (1 '4abc') 'abcd' false nil)! ----- Method: RxMatcherTest>>testHenry014 (in category 'testing-henry') ----- testHenry014 self runRegex: #('a\w+c' ' abbbbc ' true (1 'abbbbc') 'abb bc' false nil)! ----- Method: RxMatcherTest>>testHenry015 (in category 'testing-henry') ----- testHenry015 self runRegex: #('\w+' ' foobar quux' true (1 'foobar') ' ~!!@#$%^&*()-+=\|/?.>,<' false nil)! ----- Method: RxMatcherTest>>testHenry016 (in category 'testing-henry') ----- testHenry016 self runRegex: #('a\W+c' 'a c' true (1 'a c') 'a bc' false nil)! ----- Method: RxMatcherTest>>testHenry017 (in category 'testing-henry') ----- testHenry017 self runRegex: #('\W+' 'foo!!@#$bar' true (1 '!!@#$') 'foobar' false nil)! ----- Method: RxMatcherTest>>testHenry018 (in category 'testing-henry') ----- testHenry018 self runRegex: #('a\s*c' 'a c' true (1 'a c') 'a bc' false nil)! ----- Method: RxMatcherTest>>testHenry019 (in category 'testing-henry') ----- testHenry019 self runRegex: #('\s+' 'abc3457 sd' true (1 ' ') '1234$^*^&asdfb' false nil)! ----- Method: RxMatcherTest>>testHenry020 (in category 'testing-henry') ----- testHenry020 self runRegex: #('a\S*c' 'aqwertyc' true (1 'aqwertyc') 'ab c' false nil)! ----- Method: RxMatcherTest>>testHenry021 (in category 'testing-henry') ----- testHenry021 self runRegex: #('\S+' ' asdf ' true (1 'asdf') ' ' false nil)! ----- Method: RxMatcherTest>>testHenry022 (in category 'testing-henry') ----- testHenry022 self runRegex: #('a\d+c' 'a0123456789c' true (1 'a0123456789c') 'a12b34c' false nil)! ----- Method: RxMatcherTest>>testHenry023 (in category 'testing-henry') ----- testHenry023 self runRegex: #('\d+' 'foo@#$%123ASD #$$%^&' true (1 '123') 'foo!!@#$asdfl;' false nil)! ----- Method: RxMatcherTest>>testHenry024 (in category 'testing-henry') ----- testHenry024 self runRegex: #('a\D+c' 'aqwertyc' true (1 'aqwertyc') 'aqw6ertc' false nil)! ----- Method: RxMatcherTest>>testHenry025 (in category 'testing-henry') ----- testHenry025 self runRegex: #('\D+' '1234 abc 456' true (1 ' abc ') '1234567890' false nil)! ----- Method: RxMatcherTest>>testHenry026 (in category 'testing-henry') ----- testHenry026 self runRegex: #('(f|o)+\b' 'foo' true (1 'foo') ' foo ' true (1 'foo'))! ----- Method: RxMatcherTest>>testHenry027 (in category 'testing-henry') ----- testHenry027 self runRegex: #('\ba\w+' "a word beginning with an A" 'land ancient' true (1 'ancient') 'antique vase' true (1 'antique') 'goofy foobar' false nil)! ----- Method: RxMatcherTest>>testHenry028 (in category 'testing-henry') ----- testHenry028 self runRegex: #('(f|o)+\B' 'quuxfoobar' true (1 'foo') 'quuxfoo ' true (1 'fo'))! ----- Method: RxMatcherTest>>testHenry029 (in category 'testing-henry') ----- testHenry029 self runRegex: #('\Ba\w+' "a word with an A in the middle, match at A and further" 'land ancient' true (1 'and') 'antique vase' true (1 'ase') 'smalltalk shall overcome' true (1 'alltalk') 'foonix is better' false nil)! ----- Method: RxMatcherTest>>testHenry030 (in category 'testing-henry') ----- testHenry030 self runRegex: #('fooa\>.*' 'fooa ' true nil 'fooa123' false nil 'fooa bar' true nil 'fooa' true nil 'fooargh' false nil)! ----- Method: RxMatcherTest>>testHenry031 (in category 'testing-henry') ----- testHenry031 self runRegex: #('\>.+abc' ' abcde fg' false nil 'foo abcde' true (1 ' abc') 'abcde' false nil)! ----- Method: RxMatcherTest>>testHenry032 (in category 'testing-henry') ----- testHenry032 self runRegex: #('\>testHenry033 (in category 'testing-henry') ----- testHenry033 self runRegex: #('.+\>testHenry034 (in category 'testing-henry') ----- testHenry034 self runRegex: #('a[bc]d' 'abc' false nil 'abd' true (1 'abd'))! ----- Method: RxMatcherTest>>testHenry035 (in category 'testing-henry') ----- testHenry035 self runRegex: #('a[b-d]e' 'abd' false nil 'ace' true (1 'ace'))! ----- Method: RxMatcherTest>>testHenry036 (in category 'testing-henry') ----- testHenry036 self runRegex: #('a[b-d]' 'aac' true (1 'ac'))! ----- Method: RxMatcherTest>>testHenry037 (in category 'testing-henry') ----- testHenry037 self runRegex: #('a[-b]' 'a-' true (1 'a-'))! ----- Method: RxMatcherTest>>testHenry038 (in category 'testing-henry') ----- testHenry038 self runRegex: #('a[b-]' 'a-' true (1 'a-'))! ----- Method: RxMatcherTest>>testHenry039 (in category 'testing-henry') ----- testHenry039 self runRegex: #('a[a-b-c]' nil)! ----- Method: RxMatcherTest>>testHenry040 (in category 'testing-henry') ----- testHenry040 self runRegex: #('[k]' 'ab' false nil)! ----- Method: RxMatcherTest>>testHenry041 (in category 'testing-henry') ----- testHenry041 self runRegex: #('a[b-a]' nil)! ----- Method: RxMatcherTest>>testHenry042 (in category 'testing-henry') ----- testHenry042 self runRegex: #('a[]b' nil)! ----- Method: RxMatcherTest>>testHenry043 (in category 'testing-henry') ----- testHenry043 self runRegex: #('a[' nil)! ----- Method: RxMatcherTest>>testHenry044 (in category 'testing-henry') ----- testHenry044 self runRegex: #('a]' 'a]' true (1 'a]'))! ----- Method: RxMatcherTest>>testHenry045 (in category 'testing-henry') ----- testHenry045 self runRegex: #('a[]]b' 'a]b' true (1 'a]b'))! ----- Method: RxMatcherTest>>testHenry046 (in category 'testing-henry') ----- testHenry046 self runRegex: #('a[^bc]d' 'aed' true (1 'aed') 'abd' false nil)! ----- Method: RxMatcherTest>>testHenry047 (in category 'testing-henry') ----- testHenry047 self runRegex: #('a[^-b]c' 'adc' true (1 'adc') 'a-c' false nil)! ----- Method: RxMatcherTest>>testHenry048 (in category 'testing-henry') ----- testHenry048 self runRegex: #('a[^]b]c' 'a]c' false nil 'adc' true (1 'adc'))! ----- Method: RxMatcherTest>>testHenry049 (in category 'testing-henry') ----- testHenry049 self runRegex: #('[\de]+' '01234' true (1 '01234') '0123e456' true (1 '0123e456') '0123e45g78' true (1 '0123e45'))! ----- Method: RxMatcherTest>>testHenry050 (in category 'testing-henry') ----- testHenry050 self runRegex: #('[e\d]+' "reversal of the above, should be the same" '01234' true (1 '01234') '0123e456' true (1 '0123e456') '0123e45g78' true (1 '0123e45'))! ----- Method: RxMatcherTest>>testHenry051 (in category 'testing-henry') ----- testHenry051 self runRegex: #('[\D]+' '123abc45def78' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry052 (in category 'testing-henry') ----- testHenry052 self runRegex: #('[[:digit:]e]+' '01234' true (1 '01234') '0123e456' true (1 '0123e456') '0123e45g78' true (1 '0123e45'))! ----- Method: RxMatcherTest>>testHenry053 (in category 'testing-henry') ----- testHenry053 self runRegex: #('[\s]+' '2 spaces' true (1 ' '))! ----- Method: RxMatcherTest>>testHenry054 (in category 'testing-henry') ----- testHenry054 self runRegex: #('[\S]+' ' word12!!@#$ ' true (1 'word12!!@#$'))! ----- Method: RxMatcherTest>>testHenry055 (in category 'testing-henry') ----- testHenry055 self runRegex: #('[\w]+' ' foo123bar 45' true (1 'foo123bar'))! ----- Method: RxMatcherTest>>testHenry056 (in category 'testing-henry') ----- testHenry056 self runRegex: #('[\W]+' 'fii234!!@#$34f' true (1 '!!@#$'))! ----- Method: RxMatcherTest>>testHenry057 (in category 'testing-henry') ----- testHenry057 self runRegex: #('[^[:alnum:]]+' 'fii234!!@#$34f' true (1 '!!@#$'))! ----- Method: RxMatcherTest>>testHenry058 (in category 'testing-henry') ----- testHenry058 self runRegex: #('[%&[:alnum:]]+' 'foo%3' true (1 'foo%3') 'foo34&rt4$57a' true (1 'foo34&rt4') '!!@#$' false nil)! ----- Method: RxMatcherTest>>testHenry059 (in category 'testing-henry') ----- testHenry059 self runRegex: #('[[:alpha:]]+' ' 123foo3 ' true (1 'foo') '123foo' true (1 'foo') 'foo1b' true (1 'foo'))! ----- Method: RxMatcherTest>>testHenry060 (in category 'testing-henry') ----- testHenry060 self runRegex: #('[[:cntrl:]]+' ' a 1234asdf' false nil)! ----- Method: RxMatcherTest>>testHenry061 (in category 'testing-henry') ----- testHenry061 self runRegex: #('[[:lower:]]+' 'UPPERlower1234' true (1 'lower') 'lowerUPPER' true (1 'lower'))! ----- Method: RxMatcherTest>>testHenry062 (in category 'testing-henry') ----- testHenry062 self runRegex: #('[[:upper:]]+' 'UPPERlower1234' true (1 'UPPER') 'lowerUPPER ' true (1 'UPPER'))! ----- Method: RxMatcherTest>>testHenry063 (in category 'testing-henry') ----- testHenry063 self runRegex: #('[[:space:]]+' '2 spaces' true (1 ' '))! ----- Method: RxMatcherTest>>testHenry064 (in category 'testing-henry') ----- testHenry064 self runRegex: #('[^[:space:]]+' ' word12!!@#$ ' true (1 'word12!!@#$'))! ----- Method: RxMatcherTest>>testHenry065 (in category 'testing-henry') ----- testHenry065 self runRegex: #('[[:graph:]]+' 'abc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry066 (in category 'testing-henry') ----- testHenry066 self runRegex: #('[[:print:]]+' 'abc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry067 (in category 'testing-henry') ----- testHenry067 self runRegex: #('[^[:punct:]]+' '!!hello,world!!' true (1 'hello'))! ----- Method: RxMatcherTest>>testHenry068 (in category 'testing-henry') ----- testHenry068 self runRegex: #('[[:xdigit:]]+' ' x10FCD ' true (1 '10FCD') ' hgfedcba0123456789ABCDEFGH ' true (1 'fedcba0123456789ABCDEF'))! ----- Method: RxMatcherTest>>testHenry069 (in category 'testing-henry') ----- testHenry069 self runRegex: #('ab|cd' 'abc' true (1 'ab') 'abcd' true (1 'ab'))! ----- Method: RxMatcherTest>>testHenry070 (in category 'testing-henry') ----- testHenry070 self runRegex: #('()ef' 'def' true (1 'ef' 2 ''))! ----- Method: RxMatcherTest>>testHenry071 (in category 'testing-henry') ----- testHenry071 self runRegex: #('()*' nil)! ----- Method: RxMatcherTest>>testHenry072 (in category 'testing-henry') ----- testHenry072 self runRegex: #('*a' nil)! ----- Method: RxMatcherTest>>testHenry073 (in category 'testing-henry') ----- testHenry073 self runRegex: #('^*' nil)! ----- Method: RxMatcherTest>>testHenry074 (in category 'testing-henry') ----- testHenry074 self runRegex: #('$*' nil)! ----- Method: RxMatcherTest>>testHenry075 (in category 'testing-henry') ----- testHenry075 self runRegex: #('(*)b' nil)! ----- Method: RxMatcherTest>>testHenry076 (in category 'testing-henry') ----- testHenry076 self runRegex: #('$b' 'b' false nil)! ----- Method: RxMatcherTest>>testHenry077 (in category 'testing-henry') ----- testHenry077 self runRegex: #('a\' nil)! ----- Method: RxMatcherTest>>testHenry078 (in category 'testing-henry') ----- testHenry078 self runRegex: #('a\(b' 'a(b' true (1 'a(b'))! ----- Method: RxMatcherTest>>testHenry079 (in category 'testing-henry') ----- testHenry079 self runRegex: #('a\(*b' 'ab' true (1 'ab') 'a((b' true (1 'a((b'))! ----- Method: RxMatcherTest>>testHenry080 (in category 'testing-henry') ----- testHenry080 self runRegex: #('a\\b' 'a\b' true (1 'a\b'))! ----- Method: RxMatcherTest>>testHenry081 (in category 'testing-henry') ----- testHenry081 self runRegex: #('abc)' nil)! ----- Method: RxMatcherTest>>testHenry082 (in category 'testing-henry') ----- testHenry082 self runRegex: #('(abc' nil)! ----- Method: RxMatcherTest>>testHenry083 (in category 'testing-henry') ----- testHenry083 self runRegex: #('((a))' 'abc' true (1 'a' 2 'a' 3 'a'))! ----- Method: RxMatcherTest>>testHenry084 (in category 'testing-henry') ----- testHenry084 self runRegex: #('(a)b(c)' 'abc' true (1 'abc' 2 'a' 3 'c'))! ----- Method: RxMatcherTest>>testHenry085 (in category 'testing-henry') ----- testHenry085 self runRegex: #('a+b+c' 'aabbabc' true (1 'abc'))! ----- Method: RxMatcherTest>>testHenry086 (in category 'testing-henry') ----- testHenry086 self runRegex: #('a**' nil)! ----- Method: RxMatcherTest>>testHenry087 (in category 'testing-henry') ----- testHenry087 self runRegex: #('a*?' nil)! ----- Method: RxMatcherTest>>testHenry088 (in category 'testing-henry') ----- testHenry088 self runRegex: #('(a*)*' nil)! ----- Method: RxMatcherTest>>testHenry089 (in category 'testing-henry') ----- testHenry089 self runRegex: #('(a*)+' nil)! ----- Method: RxMatcherTest>>testHenry090 (in category 'testing-henry') ----- testHenry090 self runRegex: #('(a|)*' nil)! ----- Method: RxMatcherTest>>testHenry091 (in category 'testing-henry') ----- testHenry091 self runRegex: #('(a*|b)*' nil)! ----- Method: RxMatcherTest>>testHenry092 (in category 'testing-henry') ----- testHenry092 self runRegex: #('(a+|b)*' 'ab' true (1 'ab' 2 'b'))! ----- Method: RxMatcherTest>>testHenry093 (in category 'testing-henry') ----- testHenry093 self runRegex: #('(a+|b)+' 'ab' true (1 'ab' 2 'b'))! ----- Method: RxMatcherTest>>testHenry094 (in category 'testing-henry') ----- testHenry094 self runRegex: #('(a+|b)?' 'ab' true (1 'a' 2 'a'))! ----- Method: RxMatcherTest>>testHenry095 (in category 'testing-henry') ----- testHenry095 self runRegex: #('[^ab]*' 'cde' true (1 'cde'))! ----- Method: RxMatcherTest>>testHenry096 (in category 'testing-henry') ----- testHenry096 self runRegex: #('(^)*' nil)! ----- Method: RxMatcherTest>>testHenry097 (in category 'testing-henry') ----- testHenry097 self runRegex: #('(ab|)*' nil)! ----- Method: RxMatcherTest>>testHenry098 (in category 'testing-henry') ----- testHenry098 self runRegex: #(')(' nil)! ----- Method: RxMatcherTest>>testHenry099 (in category 'testing-henry') ----- testHenry099 self runRegex: #('' 'abc' true (1 ''))! ----- Method: RxMatcherTest>>testHenry100 (in category 'testing-henry') ----- testHenry100 self runRegex: #('abc' '' false nil)! ----- Method: RxMatcherTest>>testHenry101 (in category 'testing-henry') ----- testHenry101 self runRegex: #('a*' '' true '')! ----- Method: RxMatcherTest>>testHenry102 (in category 'testing-henry') ----- testHenry102 self runRegex: #('abcd' 'abcd' true (1 'abcd'))! ----- Method: RxMatcherTest>>testHenry103 (in category 'testing-henry') ----- testHenry103 self runRegex: #('a(bc)d' 'abcd' true (1 'abcd' 2 'bc'))! ----- Method: RxMatcherTest>>testHenry104 (in category 'testing-henry') ----- testHenry104 self runRegex: #('([abc])*d' 'abbbcd' true (1 'abbbcd' 2 'c'))! ----- Method: RxMatcherTest>>testHenry105 (in category 'testing-henry') ----- testHenry105 self runRegex: #('([abc])*bcd' 'abcd' true (1 'abcd' 2 'a'))! ----- Method: RxMatcherTest>>testHenry106 (in category 'testing-henry') ----- testHenry106 self runRegex: #('a|b|c|d|e' 'e' true (1 'e'))! ----- Method: RxMatcherTest>>testHenry107 (in category 'testing-henry') ----- testHenry107 self runRegex: #('(a|b|c|d|e)f' 'ef' true (1 'ef' 2 'e')) " ((a*|b))* - c - -"! ----- Method: RxMatcherTest>>testHenry108 (in category 'testing-henry') ----- testHenry108 self runRegex: #('abcd*efg' 'abcdefg' true (1 'abcdefg'))! ----- Method: RxMatcherTest>>testHenry109 (in category 'testing-henry') ----- testHenry109 self runRegex: #('ab*' 'xabyabbbz' true (1 'ab') 'xayabbbz' true (1 'a'))! ----- Method: RxMatcherTest>>testHenry110 (in category 'testing-henry') ----- testHenry110 self runRegex: #('(ab|cd)e' 'abcde' true (1 'cde' 2 'cd'))! ----- Method: RxMatcherTest>>testHenry111 (in category 'testing-henry') ----- testHenry111 self runRegex: #('[abhgefdc]ij' 'hij' true (1 'hij'))! ----- Method: RxMatcherTest>>testHenry112 (in category 'testing-henry') ----- testHenry112 self runRegex: #('^(ab|cd)e' 'abcde' false nil) ! ----- Method: RxMatcherTest>>testHenry113 (in category 'testing-henry') ----- testHenry113 self runRegex: #('(abc|)def' 'abcdef' true nil) ! ----- Method: RxMatcherTest>>testHenry114 (in category 'testing-henry') ----- testHenry114 self runRegex: #('(a|b)c*d' 'abcd' true (1 'bcd' 2 'b')) ! ----- Method: RxMatcherTest>>testHenry115 (in category 'testing-henry') ----- testHenry115 self runRegex: #('(ab|ab*)bc' 'abc' true (1 'abc' 2 'a')) ! ----- Method: RxMatcherTest>>testHenry116 (in category 'testing-henry') ----- testHenry116 self runRegex: #('a([bc]*)c*' 'abc' true (1 'abc' 2 'bc')) ! ----- Method: RxMatcherTest>>testHenry117 (in category 'testing-henry') ----- testHenry117 self runRegex: #('a([bc]*)(c*d)' 'abcd' true (1 'abcd' 2 'bc' 3 'd')) ! ----- Method: RxMatcherTest>>testHenry118 (in category 'testing-henry') ----- testHenry118 self runRegex: #('a([bc]+)(c*d)' 'abcd' true (1 'abcd' 2 'bc' 3 'd')) ! ----- Method: RxMatcherTest>>testHenry119 (in category 'testing-henry') ----- testHenry119 self runRegex: #('a([bc]*)(c+d)' 'abcd' true (1 'abcd' 2 'b' 3 'cd')) ! ----- Method: RxMatcherTest>>testHenry120 (in category 'testing-henry') ----- testHenry120 self runRegex: #('a[bcd]*dcdcde' 'adcdcde' true (1 'adcdcde')) ! ----- Method: RxMatcherTest>>testHenry121 (in category 'testing-henry') ----- testHenry121 self runRegex: #('a[bcd]+dcdcde' 'adcdcde' false nil) ! ----- Method: RxMatcherTest>>testHenry122 (in category 'testing-henry') ----- testHenry122 self runRegex: #('(ab|a)b*c' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry123 (in category 'testing-henry') ----- testHenry123 self runRegex: #('((a)(b)c)(d)' 'abcd' true (1 'abcd' 3 'a' 4 'b' 5 'd')) ! ----- Method: RxMatcherTest>>testHenry124 (in category 'testing-henry') ----- testHenry124 self runRegex: #('[ -~]*' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry125 (in category 'testing-henry') ----- testHenry125 self runRegex: #('[ -~ -~]*' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry126 (in category 'testing-henry') ----- testHenry126 self runRegex: #('[ -~ -~ -~]*' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry127 (in category 'testing-henry') ----- testHenry127 self runRegex: #('[ -~ -~ -~ -~]*' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry128 (in category 'testing-henry') ----- testHenry128 self runRegex: #('[ -~ -~ -~ -~ -~]*' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry129 (in category 'testing-henry') ----- testHenry129 self runRegex: #('[ -~ -~ -~ -~ -~ -~]*' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry130 (in category 'testing-henry') ----- testHenry130 self runRegex: #('[ -~ -~ -~ -~ -~ -~ -~]*' 'abc' true (1 'abc')) ! ----- Method: RxMatcherTest>>testHenry131 (in category 'testing-henry') ----- testHenry131 self runRegex: #('[a-zA-Z_][a-zA-Z0-9_]*' 'alpha' true (1 'alpha')) ! ----- Method: RxMatcherTest>>testHenry132 (in category 'testing-henry') ----- testHenry132 self runRegex: #('^a(bc+|b[eh])g|.h$' 'abh' true (1 'bh' 2 nil)) ! ----- Method: RxMatcherTest>>testHenry133 (in category 'testing-henry') ----- testHenry133 self runRegex: #('(bc+d$|ef*g.|h?i(j|k))' 'effgz' true (1 'effgz' 2 'effgz' 3 nil) 'ij' true (1 'ij' 2 'ij' 3 'j') 'effg' false nil 'bcdd' false nil 'reffgz' true (1 'effgz' 2 'effgz' 3 nil))! ----- Method: RxMatcherTest>>testHenry134 (in category 'testing-henry') ----- testHenry134 self runRegex: #('(((((((((a)))))))))' 'a' true (1 'a'))! ----- Method: RxMatcherTest>>testHenry135 (in category 'testing-henry') ----- testHenry135 self runRegex: #('multiple words of text' 'uh-uh' false nil 'multiple words of text, yeah' true (1 'multiple words of text'))! ----- Method: RxMatcherTest>>testHenry136 (in category 'testing-henry') ----- testHenry136 self runRegex: #('(.*)c(.*)' 'abcde' true (1 'abcde' 2 'ab' 3 'de'))! ----- Method: RxMatcherTest>>testHenry137 (in category 'testing-henry') ----- testHenry137 self runRegex: #('\((.*), (.*)\)' '(a, b)' true (2 'a' 3 'b'))! ----- Method: RxMatcherTest>>testMatches (in category 'testing-protocol') ----- testMatches | matcher | matcher := self matcherClass forString: '\w+'. self assert: (matcher matches: 'now'). self deny: (matcher matches: 'now is')! ----- Method: RxMatcherTest>>testMatchesIn (in category 'testing-protocol') ----- testMatchesIn | matcher | matcher := self matcherClass forString: '\w+'. self assert: (matcher matchesIn: 'now is the time') asArray = #('now' 'is' 'the' 'time')! ----- Method: RxMatcherTest>>testMatchesInCollect (in category 'testing-protocol') ----- testMatchesInCollect | matcher | matcher := self matcherClass forString: '\w+'. self assert: (matcher matchesIn: 'now is the time' collect: [ :each | each reversed ]) asArray = #('won' 'si' 'eht' 'emit')! ----- Method: RxMatcherTest>>testMatchesInDo (in category 'testing-protocol') ----- testMatchesInDo | matcher expected | matcher := self matcherClass forString: '\w+'. expected := #('now' 'is' 'the' 'time') asOrderedCollection. matcher matchesIn: 'now is the time' do: [ :each | self assert: each = expected removeFirst ]. self assert: expected isEmpty! ----- Method: RxMatcherTest>>testMatchesOnStream (in category 'testing-protocol') ----- testMatchesOnStream | matcher | matcher := self matcherClass forString: '\w+'. self assert: (matcher matchesOnStream: 'now is the time' readStream) asArray = #('now' 'is' 'the' 'time')! ----- Method: RxMatcherTest>>testMatchesOnStreamCollect (in category 'testing-protocol') ----- testMatchesOnStreamCollect | matcher | matcher := self matcherClass forString: '\w+'. self assert: (matcher matchesOnStream: 'now is the time' readStream collect: [ :each | each reversed ]) asArray = #('won' 'si' 'eht' 'emit')! ----- Method: RxMatcherTest>>testMatchesOnStreamDo (in category 'testing-protocol') ----- testMatchesOnStreamDo | matcher expected | matcher := self matcherClass forString: '\w+'. expected := #('now' 'is' 'the' 'time') asOrderedCollection. matcher matchesOnStream: 'now is the time' readStream do: [ :each | self assert: each = expected removeFirst ]. self assert: expected isEmpty! ----- Method: RxMatcherTest>>testMatchesStream (in category 'testing-protocol') ----- testMatchesStream | matcher | matcher := self matcherClass forString: '\w+'. self assert: (matcher matchesStream: 'now' readStream). self deny: (matcher matchesStream: 'now is' readStream)! ----- Method: RxMatcherTest>>testMatchingRangesIn (in category 'testing-protocol') ----- testMatchingRangesIn | matcher expected | matcher := self matcherClass forString: '\w+'. expected := #(1 3 5 6 8 10 12 15) asOrderedCollection. (matcher matchingRangesIn: 'now is the time') do: [ :range | self assert: range first = expected removeFirst. self assert: range last = expected removeFirst ]. self assert: expected isEmpty! ----- Method: RxMatcherTest>>testRegex001 (in category 'testing') ----- testRegex001 self runRegex: #('^.*$' '' true (1 '') 'a' true (1 'a') 'abc' true (1 'abc'))! ----- Method: RxMatcherTest>>testRegex002 (in category 'testing') ----- testRegex002 self runRegex: #('a\w+c' ' abb_bbc ' true (1 'abb_bbc') 'abb-bc' false nil)! ----- Method: RxMatcherTest>>testRegex003 (in category 'testing') ----- testRegex003 self runRegex: #('a\W+c' ' abb_bbc ' false nil 'abb-bc' false nil 'a.,:;-&!!"#%/()={[]}+?\~*''c' true (1 'a.,:;-&!!"#%/()={[]}+?\~*''c'))! ----- Method: RxMatcherTest>>testRegex004 (in category 'testing') ----- testRegex004 self runRegex: #(':isVowel:' 'aei' true nil 'xyz' false nil)! ----- Method: RxMatcherTest>>testStringAllRangesOfRegexMatches (in category 'testing-extensions') ----- testStringAllRangesOfRegexMatches | result | result := 'aabbcc' allRangesOfRegexMatches: 'b+'. self assert: result size = 1. self assert: result first first = 3. self assert: result first last = 4 ! ----- Method: RxMatcherTest>>testStringAllRegexMatches (in category 'testing-extensions') ----- testStringAllRegexMatches | result | result := 'aabbcc' allRegexMatches: 'b+'. self assert: result size = 1. self assert: result first = 'bb'! ----- Method: RxMatcherTest>>testStringAsRegex (in category 'testing-extensions') ----- testStringAsRegex self assert: 'b+' asRegex class = RxParser preferredMatcherClass! ----- Method: RxMatcherTest>>testStringAsRegexIgnoringCase (in category 'testing-extensions') ----- testStringAsRegexIgnoringCase self assert: 'b+' asRegexIgnoringCase class = RxParser preferredMatcherClass! ----- Method: RxMatcherTest>>testStringCopyWithRegexMatchesReplacedWith (in category 'testing-extensions') ----- testStringCopyWithRegexMatchesReplacedWith self assert: ('aabbcc' copyWithRegex: 'b+' matchesReplacedWith: 'X') = 'aaXcc'! ----- Method: RxMatcherTest>>testStringCopyWithRegexMatchesTranslatedUsing (in category 'testing-extensions') ----- testStringCopyWithRegexMatchesTranslatedUsing self assert: ('aabbcc' copyWithRegex: 'b+' matchesTranslatedUsing: [ :each | self assert: each = 'bb'. 'X' ]) = 'aaXcc'! ----- Method: RxMatcherTest>>testStringMatchesRegex (in category 'testing-extensions') ----- testStringMatchesRegex self deny: ('aabbcc' matchesRegex: 'a+'). self deny: ('aabbcc' matchesRegex: 'b+c+'). self assert: ('aabbcc' matchesRegex: 'a+b+c+')! ----- Method: RxMatcherTest>>testStringMatchesRegexIgnoringCase (in category 'testing-extensions') ----- testStringMatchesRegexIgnoringCase self deny: ('AABBCC' matchesRegexIgnoringCase: 'a+'). self deny: ('AABBCC' matchesRegexIgnoringCase: 'b+c+'). self assert: ('AABBCC' matchesRegexIgnoringCase: 'a+b+c+')! ----- Method: RxMatcherTest>>testStringPrefixMatchesRegex (in category 'testing-extensions') ----- testStringPrefixMatchesRegex self assert: ('aabbcc' prefixMatchesRegex: 'a+'). self deny: ('aabbcc' prefixMatchesRegex: 'b+')! ----- Method: RxMatcherTest>>testStringPrefixMatchesRegexIgnoringCase (in category 'testing-extensions') ----- testStringPrefixMatchesRegexIgnoringCase self assert: ('AABBCC' prefixMatchesRegexIgnoringCase: 'a+'). self deny: ('AABBCC' prefixMatchesRegexIgnoringCase: 'b+')! ----- Method: RxMatcherTest>>testStringRegexMatchesCollect (in category 'testing-extensions') ----- testStringRegexMatchesCollect | result | result := 'aabbcc' regex: 'b+' matchesCollect: [ :each | each asUppercase ]. self assert: result size = 1. self assert: result first = 'BB'! ----- Method: RxMatcherTest>>testStringRegexMatchesDo (in category 'testing-extensions') ----- testStringRegexMatchesDo | result | result := OrderedCollection new. 'aabbcc' regex: 'b+' matchesDo: [ :each | result add: each ]. self assert: result size = 1. self assert: result first = 'bb'! ----- Method: RxMatcherTest>>testSubexpressionCount (in category 'testing-protocol') ----- testSubexpressionCount | matcher | #(('a' 1) ('a(b)' 2) ('a(b(c))' 3) ('(a)(b)' 3) ('(a(b))*' 3)) do: [ :pair | matcher := self matcherClass forString: pair first. matcher supportsSubexpressions ifTrue: [ self assert: matcher subexpressionCount = pair last ] ]! TestCase subclass: #RxParserTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Regex-Tests-Core'! !RxParserTest commentStamp: 'Tbn 11/12/2010 22:31' prior: 0! This class provides tests for the regular expression parser.! ----- Method: RxParserTest>>DoesNotWorktestBackQuotesEscape (in category 'tests') ----- DoesNotWorktestBackQuotesEscape "self debug: #testBackQuotesEscape" "Regular expressions can also include the following backquote escapes to refer to popular classes of characters: \w any word constituent character (same as [a-zA-Z0-9:=]) \W any character but a word constituent \d a digit (same as [0-9]) \D anything but a digit \s a whitespace character \S anything but a whitespace character These escapes are also allowed in character classes: '[\w+-]' means 'any character that is either a word constituent, or a plus, or a minus'." self assert: ('one word' matchesRegex: '\w'). self assert: ('one' matchesRegex: '\w'). ! ----- Method: RxParserTest>>test (in category 'tests') ----- test "self debug: #test" self assert: ('\>testCadrMatching (in category 'tests') ----- testCadrMatching "self debug: #testCadrMatching" "A bit more complex example is the following expression, matching the name of any of the Lisp-style `car', `cdr', `caar', `cadr', ... functions:" self assert: ( 'car' matchesRegex: 'c(a|d)+r'). self assert: ( 'cdr' matchesRegex: 'c(a|d)+r'). self assert: ( 'caar' matchesRegex: 'c(a|d)+r'). self assert: ( 'cadr' matchesRegex: 'c(a|d)+r'). self assert: ( 'caddar' matchesRegex: 'c(a|d)+r').! ----- Method: RxParserTest>>testCharacterSet (in category 'tests') ----- testCharacterSet "self debug: #testCharacterSet" "So far, we have used only characters as the 'smallest' components of regular expressions. There are other, more `interesting', components. A character set is a string of characters enclosed in square brackets. It matches any single character if it appears between the brackets. For example, `[01]' matches either `0' or `1':" self assert: ('0' matchesRegex: '[01]'). self deny: ('3' matchesRegex: '[01]'). self deny: ('11' matchesRegex: '[01]'). "-- false: a set matches only one character" self deny: ('01' matchesRegex: '[01]'). ! ----- Method: RxParserTest>>testCharacterSetBinaryNumber (in category 'tests') ----- testCharacterSetBinaryNumber "self debug: #testCharacterSetBinaryNumber" "Using plus operator, we can build the following binary number recognizer:" self assert: ('10010100' matchesRegex: '[01]+'). self deny: ('10001210' matchesRegex: '[01]+') ! ----- Method: RxParserTest>>testCharacterSetInversion (in category 'tests') ----- testCharacterSetInversion "self debug: #testCharacterSetInversion" "If the first character after the opening bracket is `^', the set is inverted: it matches any single character *not* appearing between the brackets:" self deny: ('0' matchesRegex: '[^01]'). "0 appears in 01 so there is no match" self assert: ('3' matchesRegex: '[^01]'). "3 is not in 01 so it matches" self deny: ('30' matchesRegex: '[^01]'). self deny: ('33333333333333333333333330' matchesRegex: '[^01]'). "there is one zero so it does not match"! ----- Method: RxParserTest>>testCharacterSetRange (in category 'tests') ----- testCharacterSetRange "self debug: #testCharacterSetRange" "For convenience, a set may include ranges: pairs of characters separated with `-'. This is equivalent to listing all characters between them: `[0-9]' is the same as `[0123456789]'. " self assert: ('0' matchesRegex: '[0-9]'). self assert: ('9' matchesRegex: '[0-9]'). self deny: ('a' matchesRegex: '[0-9]'). self deny: ('01' matchesRegex: '[0-9]'). self assert: ('01442128629839374565' matchesRegex: '[0-9]+'). ! ----- Method: RxParserTest>>testLookaround (in category 'tests') ----- testLookaround self assert: ('A' matchesRegex: '(?!!ABC).*'). self assert: ('AB' matchesRegex: '(?!!ABC).*'). self deny: ('ABC' matchesRegex: '(?!!ABC).*').! ----- Method: RxParserTest>>testMatchesInwW (in category 'tests') ----- testMatchesInwW "self debug: #testMatchesInwW" "1. Backslash escapes similar to those in Perl are allowed in patterns: \w any word constituent character (equivalent to [a-zA-Z0-9:=]) \W any character but a word constituent (equivalent to [^a-xA-Z0-9:=]" self assert: ('\w+' asRegex matchesIn: 'now is the time') asArray = #('now' 'is' 'the' 'time'). self assert: ('\W+' asRegex matchesIn: 'now is the time') asArray = #(' ' ' ' ' '). "why do we get that" self assert: ('\w' asRegex matchesIn: 'now') asArray = #('n' 'o' 'w').! ----- Method: RxParserTest>>testOrOperator (in category 'tests') ----- testOrOperator "self debug: #testOrOperator" "The last operator is `|' meaning `or'. It is placed between two regular expressions, and the resulting expression matches if one of the expressions matches. It has the lowest possible precedence (lower than sequencing). For example, `ab*|ba*' means `a followed by any number of b's, or b followed by any number of a's':" self assert: ('abb' matchesRegex: 'ab*|ba*'). self assert: ('baa' matchesRegex: 'ab*|ba*'). self deny: ('baab' matchesRegex: 'ab*|ba*'). "It is possible to write an expression matching an empty string, for example: `a|'. However, it is an error to apply `*', `+', or `?' to such expression: `(a|)*' is an invalid expression." self should: ['(a|)*' asRegex] raise: Error. ! ----- Method: RxParserTest>>testQuantifier (in category 'tests') ----- testQuantifier self deny: ('' matchesRegex: 'a{2}'). self deny: ('a' matchesRegex: 'a{2}'). self assert: ('aa' matchesRegex: 'a{2}'). self deny: ('aaa' matchesRegex: 'a{2}'). self deny: ('' matchesRegex: 'a{2,3}'). self deny: ('a' matchesRegex: 'a{2,3}'). self assert: ('aa' matchesRegex: 'a{2,3}'). self assert: ('aaa' matchesRegex: 'a{2,3}'). self deny: ('aaaa' matchesRegex: 'a{2,3}'). self deny: ('' matchesRegex: 'a{2,}'). self deny: ('a' matchesRegex: 'a{2,}'). self assert: ('aa' matchesRegex: 'a{2,}'). self assert: ('aaa' matchesRegex: 'a{2,}'). self assert: ('aaaa' matchesRegex: 'a{2,}'). self assert: ('' matchesRegex: 'a{,3}'). self assert: ('a' matchesRegex: 'a{,3}'). self assert: ('aa' matchesRegex: 'a{,3}'). self assert: ('aaa' matchesRegex: 'a{,3}'). self deny: ('aaaa' matchesRegex: 'a{,3}').! ----- Method: RxParserTest>>testQuantifierSimple (in category 'tests') ----- testQuantifierSimple "Test quantifier expressions that can be expressed with + or *" self assert: ('a' matchesRegex: 'a{1}'). self deny: ('aa' matchesRegex: 'a{1}'). self assert: ('a' matchesRegex: 'a{1,1}'). self deny: ('aa' matchesRegex: 'a{1,1}'). self assert: ('ab' matchesRegex: '(ab){1,}'). self assert: ('abab' matchesRegex: '(ab){1,}'). self deny: ('' matchesRegex: '(ab){1,}'). self assert: ('ab' matchesRegex: '(ab){,1}'). self assert: ('' matchesRegex: '(ab){,1}'). self deny: ('abab' matchesRegex: '(ab){,1}').! ----- Method: RxParserTest>>testQuotingOperators (in category 'tests') ----- testQuotingOperators "self debug: #testQuotingOperators" "As we have seen, characters `*', `+', `?', `(', and `)' have special meaning in regular expressions. If one of them is to be used literally, it should be quoted: preceded with a backslash. (Thus, backslash is also special character, and needs to be quoted for a literal match--as well as any other special character described further)." self deny: ('ab*' matchesRegex: 'ab*'). " -- false: star in the right string is special" self assert: ('ab*' matchesRegex: 'ab\*'). self assert: ('a\c' matchesRegex: 'a\\c'). ! ----- Method: RxParserTest>>testSimpleMatchesRegex (in category 'tests') ----- testSimpleMatchesRegex "self debug: #testSimpleMatchesRegex" "The simplest regular expression is a single character. It matches exactly that character. A sequence of characters matches a string with exactly the same sequence of characters:" self assert: ('a' matchesRegex: 'a'). self assert: ('foobar' matchesRegex: 'foobar') . self deny: ('blorple' matchesRegex: 'foobar')! ----- Method: RxParserTest>>testSimpleMatchesRegexWithStar (in category 'tests') ----- testSimpleMatchesRegexWithStar "self debug: #testSimpleMatchesRegexWithStar" "The above paragraph in testSimpleMatchesRegex introduced a primitive regular expression (a character), and an operator (sequencing). Operators are applied to regular expressions to produce more complex regular expressions. Sequencing (placing expressions one after another) as an operator is, in a certain sense, `invisible'--yet it is arguably the most common. A more `visible' operator is Kleene closure, more often simply referred to as `a star'. A regular expression followed by an asterisk matches any number (including 0) of matches of the original expression. For example:" self assert: ('ab' matchesRegex: 'a*b'). self assert: ('aaaaab' matchesRegex: 'a*b'). self assert: ('b' matchesRegex: 'a*b'). self deny: ('aac' matchesRegex: 'a*b'). ! ----- Method: RxParserTest>>testSpecialCharacterInSetRange (in category 'tests') ----- testSpecialCharacterInSetRange "self debug: #testSpecialCharacterInSetRange" "Special characters within a set are `^', `-', and `]' that closes the set. Below are the examples of how to literally use them in a set: [01^] -- put the caret anywhere except the beginning [01-] -- put the dash as the last character []01] -- put the closing bracket as the first character [^]01] (thus, empty and universal sets cannot be specified)" self assert: ('0' matchesRegex: '[01^]'). self assert: ('1' matchesRegex: '[01^]'). self assert: ('^' matchesRegex: '[01^]'). self deny: ('0' matchesRegex: '[^01]'). self deny: ('1' matchesRegex: '[^01]'). "[^abc] means that everything except abc is matche" self assert: ('^' matchesRegex: '[^01]'). ! ----- Method: RxParserTest>>testStarPlusQuestionMark (in category 'tests') ----- testStarPlusQuestionMark "self debug: #testStarPlusQuestionMark" "Two other operators similar to `*' are `+' and `?'. `+' (positive closure, or simply `plus') matches one or more occurrences of the original expression. `?' (`optional') matches zero or one, but never more, occurrences." self assert: ('ac' matchesRegex: 'ab*c'). self deny: ('ac' matchesRegex: 'ab+c'). "-- false: need at least one b" self assert: ('abbc' matchesRegex: 'ab+c'). self assert: ('abbbbbbc' matchesRegex: 'ab+c'). self deny: ('abbc' matchesRegex: 'ab?c') "-- false: too many b's"! ----- Method: RxParserTest>>testStarPrecedence (in category 'tests') ----- testStarPrecedence "self debug: #testStarPrecedence" "A star's precedence is higher than that of sequencing. A star applies to the shortest possible subexpression that precedes it. For example, 'ab*' means `a followed by zero or more occurrences of b', not `zero or more occurrences of ab':" self assert: ('abbb' matchesRegex: 'ab*'). self deny: ('abab' matchesRegex: 'ab*'). "To actually make a regex matching `zero or more occurrences of ab', `ab' is enclosed in parentheses:" self assert: ('abab' matchesRegex: '(ab)*'). self deny: ('abcab' matchesRegex: '(ab)*')! ----- Method: RxParserTest>>testTranslatingMatchesUsing (in category 'tests') ----- testTranslatingMatchesUsing "self debug: #testTranslatingMatchesUsing" self assert: ('\>toDotestSpecialCharacterInSetRange (in category 'tests') ----- toDotestSpecialCharacterInSetRange "self debug: #testSpecialCharacterInSetRange" "Special characters within a set are `^', `-', and `]' that closes the set. Below are the examples of how to literally use them in a set: [01^] -- put the caret anywhere except the beginning [01-] -- put the dash as the last character []01] -- put the closing bracket as the first character [^]01] (thus, empty and universal sets cannot be specified)" self assert: ('0' matchesRegex: '[01^]'). self assert: ('0' matchesRegex: '[0-9]'). ! From commits at source.squeak.org Sat Aug 22 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 22 21:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150822215502.23727.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-August/008871.html Name: Tests-ul.325 Ancestors: Tests-topa.324 Increased maxLiterals in CompilerTest's #testMaxLiterals and #testMaxLiteralsWithClassReferenceInClosure to make them pass again. In theory Spur supports literals up to 65535, but I think the compiler will have to be changed to be able to use that many. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008872.html Name: Tests-ul.326 Ancestors: Tests-ul.325 PointTest's #testNormal and #testTheta seem to get decompiled correctly. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008873.html Name: Collections-ul.644 Ancestors: Collections-ul.643 Extracted and enhanced Bitset from WideCharacterSet. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008874.html Name: CollectionsTests-ul.247 Ancestors: CollectionsTests-ul.246 Added BitSetTest. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008875.html Name: Collections-ul.645 Ancestors: Collections-ul.644 Use the extracted Bitset in WideCharacterSet: - decreased chunk size from 65536 to 256. This should give a purpose to use a dictionary instread of an array for map, because its size will have a chance to be larger than 64. - byteArrayMap is always initialized, so there's no need to use the method to reference it, nor to check if it's initialized - moved #remove: behavior to #remove:ifAbsent:, just like it's done by most collections. Kept the existing behavior of #remove: to not signal an error when the character is not in the collection. - use #atAllPut: to clear the byteArrayMap in #removeAll, because it should be faster than allocating a new instance - improved #size's performance - migrate instances on-the-fly - migrate any unmigrated instaces during the postscript - removed the unused methods ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008876.html Name: Collections-ul.646 Ancestors: Collections-ul.645 - removed migration code from WideCharacterSet ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008877.html Name: Tools-eem.631 Ancestors: Tools-ul.630 Remove the become[Un]Compact messages from MethodFinder as these are going away. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008878.html Name: System-eem.758 Ancestors: System-ul.757 Reimplement the post-load enumeration of loaded objects to use the revised primitive available in the VMMaker.oscog-eem.1441 /3427 VMs that becomes the loaded segment into an Array of the loaded objects. Hence endMarker disappears and allObjectsDo: is trivially implemented as do: sent to the segment. This change requires users to upgrade their VMs but as the alternative is crashes in ImageSegment loads this is acceptable. AFAIA this fixes ImageSegments in Spur but they clearly need pounding on. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008879.html Name: SMBase-eem.134 Ancestors: SMBase-bf.133 Reimplement the post-load enumeration of loaded objects to use the revised primitive available in the VMMaker.oscog-eem.1441 /3427 VMs that becomes the loaded segment into an Array of the loaded objects. Hence endMarker disappears and allObjectsDo: is trivially implemented as do: sent to the segment. This change requires users to upgrade their VMs but as the alternative is crashes in ImageSegment loads this is acceptable. AFAIA this fixes ImageSegments in Spur but they clearly need pounding on. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008880.html Name: KernelTests-eem.297 Ancestors: KernelTests-ul.296 Remove the compact class index tests from LargeNegativeInteger as the compact class code is going away. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008881.html Name: Kernel-eem.944 Ancestors: Kernel-ul.943 Nuke the compact class support in Kernel and the ClassBuilder. Spur has a regular 64-bit object header format with no special cases. Fix CompiledMethod>>at:ifAbsent: to work with the initialPC to endPC range and run the ifAbsent: block for indices outside this range. Categorize isCompiledMethodClass correctly. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008882.html Name: Collections-ul.647 Ancestors: Collections-ul.646 - in Spur we can speed up Character >> #sameAs: by using #== ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008883.html Name: Regex-Core-ul.40 Ancestors: Regex-Core-ul.39 RxsPredicate: - added \t \n escapes for tab and lf - unified all single character predicates as #beCharacter: - postscript reinitializes the dictionary RxMatchOptimizer: - removed lookarounds, because they were never used, just collected - all collections get initialized lazily - CharacterSet are used for storing characters - IdentitySets are used where unique objects are stored (e.g. symbols) - use #== and #~~ for character comparison (Spur-specific change) RxMatcher: - reuse previous markerPositions - use String >> #new:streamContents: where possible - use #== and #~~ for character comparison (Spur-specific change) - quick returns in #tryMatch General: - renamed RxmLookahaed to RxmLookahead - in RxmPredicate >> #matchAgainst: use the fact that aMatcher is providing a ReadStream of characters, so nil means end of stream - reimplemented RxmSubstring ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008884.html Name: Regex-Tests-Core-ul.1 Ancestors: - tests from Pharo ============================================= From commits at source.squeak.org Sat Aug 22 22:08:01 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 22 22:08:02 2015 Subject: [squeak-dev] The Trunk: Temp-update-stream-migration-dtl.1.mcz Message-ID: David T. Lewis uploaded a new version of Temp-update-stream-migration to project The Trunk: http://source.squeak.org/trunk/Temp-update-stream-migration-dtl.1.mcz ==================== Summary ==================== Name: Temp-update-stream-migration-dtl.1 Author: dtl Time: 22 August 2015, 11:48:59.798 am UUID: d7fb25f5-ac27-45ce-a58e-14cb6e904689 Ancestors: The Squeak trunk development stream is transitioning to Spur image format. Existing V3 images that update from trunk need to avoid loading Spur-specific methods. Move the update preference for those images to the squeak46 maintenance repository. This class is intended to be loadedfrom a single update map in order to perform a one time update for V3 images, after which is serves no ongoing purpose. Therefore, following its initialization, it will delete itself from the system. ==================== Snapshot ==================== SystemOrganization addCategory: #'Temp-update-stream-migration'! Object subclass: #MoveTrunkEndToSqueak46RepoForV3Images instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Temp-update-stream-migration'! !MoveTrunkEndToSqueak46RepoForV3Images commentStamp: 'dtl 8/21/2015 19:31' prior: 0! The Squeak trunk development stream is transitioning to Spur image format. Existing V3 images that update from trunk need to avoid loading Spur-specific methods. Move the update preference for those images to the squeak46 maintenance repository. This class is intended to be loadedfrom a single update map in order to perform a one time update for V3 images, after which is serves no ongoing purpose. Therefore, following its initialization, it will delete itself from the system. "MoveTrunkEndToSqueak46RepoForV3Images checkAndChangeUpdateStream" ! ----- Method: MoveTrunkEndToSqueak46RepoForV3Images class>>checkAndChangeUpdateStream (in category 'update stream migration') ----- checkAndChangeUpdateStream "Change the update stream preference to squeak46 if this image cannot follow Spur updates." (((self isSqueakV3 and: [self isUsingTrunkUpdateStream])) and: [self isAtEndOfV3Updates]) ifTrue: ["change from trunk to http://source.squeak.org/squeak46" MCMcmUpdater defaultUpdateURL: 'http://source.squeak.org/squeak46']. ^ 'updates from ', MCMcmUpdater updateMapName, ' at ', MCMcmUpdater defaultUpdateURL ! ----- Method: MoveTrunkEndToSqueak46RepoForV3Images class>>destroy (in category 'class initialization') ----- destroy "Remove this class from the system after it has served its purpose" | category | category := self category. self removeFromSystem. SystemOrganization futureDo: #removeCategory: at: 1000 args: { category } ! ----- Method: MoveTrunkEndToSqueak46RepoForV3Images class>>initialize (in category 'class initialization') ----- initialize "This class is intended to be loaded and initialized from a specific update map. After performing the update stream check, remove this class from the system." self checkAndChangeUpdateStream. self destroy ! ----- Method: MoveTrunkEndToSqueak46RepoForV3Images class>>isAtEndOfV3Updates (in category 'testing') ----- isAtEndOfV3Updates "The update number for the Squeak 4.6 release image is 15102. Answer true if this image is at that level or greater." ^ SystemVersion current highestUpdate >= 15102! ----- Method: MoveTrunkEndToSqueak46RepoForV3Images class>>isSqueakV3 (in category 'testing') ----- isSqueakV3 "True if this image is in a pre-Spur object format" | formats | formats := #( 6504 "32-bit V3 with traditional float ordering" 6505 "32-bit V3 with platform float ordering (Cog VM)" 68002 "64-bit V3 with traditional float ordering" 68003 "64-bit V3 with platform float ordering (mythical)" ).. ^ formats includes: Smalltalk imageFormatVersion! ----- Method: MoveTrunkEndToSqueak46RepoForV3Images class>>isUsingTrunkUpdateStream (in category 'testing') ----- isUsingTrunkUpdateStream "True if the update preferences specify the trunk stream" ^ ( 'http://source.squeak.org/trunk' = MCMcmUpdater defaultUpdateURL ) and: [ 'update' = MCMcmUpdater updateMapName ]! From lewis at mail.msen.com Sun Aug 23 01:34:44 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Aug 23 01:34:47 2015 Subject: [squeak-dev] Update stream transition In-Reply-To: References: <20150806040235.GA62405@shell.msen.com> <20150822141544.GA8111@shell.msen.com> Message-ID: <20150823013444.GA14098@shell.msen.com> On Sat, Aug 22, 2015 at 08:12:40AM -0700, Eliot Miranda wrote: > Hi David, > > Sent from my iPhone > > > On Aug 22, 2015, at 7:15 AM, David T. Lewis wrote: > > > > Currently we have the problem that an existing trunk image from prior > > to the Squeak 4.6 release will lock up if the user does a normal > > "update from server". A knowledgeable user can work around this, as > > with the script that Nicolas provides. But a year from now our tribal > > knowledge is likely to dissipate, so I don't really like the idea of > > having the original trunk update stream end in a frozen image. > > > > I think I have come up with a way to have the update stream switch > > automatically from trunk to squeak46 for existing images, see attached > > change set. The idea is to add this class into a separate package > > "Temp-update-strean-migration" in the trunk repository, and add that > > package to the last update map that worked for V3 images (I think this > > is update-eem.321.mcm, is that right?). The package loads a class that > > checks to see if the image needs to be switched from trunk to squeak46, > > and changes the update preference accordingly. It then removes itself > > from the system. > > > > Does this seem reasonable? > > Oh yes! Looks a v good idea. The only thing I could think of was adding a preamble to trunk Kernel & System to have them error on non Sour. But your proposal above is /much/ better. > This seemed like a good idea, but I tried it and unfortunately it does not work. There are two problems with this approach: 1) The updater does not load the new (temporary) package, because it will not load anything that does not already have a working copy in the image. So just adding the new package to the update map did not cause it to be loaded. 2) Changing the update preference is not sufficient to change an update that is already in progress, because it will already have loaded the list of updates that it expects to process (including the spur ones). So even if #1 had worked, it still would not have prevented the update from proceeding, which still would end in an error (32-bit image) or image freeze (64-bit image). So ... sorry for the noise. I will try to think of a better approach. I will also delete Temp-update-stream-migration-dtl.1 from trunk and remove the dependency for it that I had added to the update-topa.322.mcm configuration map. Back to the drawing board :-/ Dave From maxleske at gmail.com Sun Aug 23 11:34:32 2015 From: maxleske at gmail.com (Max Leske) Date: Sun Aug 23 11:34:38 2015 Subject: [Pharo-dev] [squeak-dev] #instSize in Squeak 5 seems to be broken for Traits In-Reply-To: References: <5DFA10FA-2A89-4898-94DB-156C4DD25AF0@gmail.com> Message-ID: <1C22E03E-628F-42AF-AAA8-10C86122FA93@gmail.com> > On 22 Aug 2015, at 19:21, Eliot Miranda wrote: > > Hi Max, > > On Fri, Aug 21, 2015 at 2:11 PM, Max Leske > wrote: > >> On 21 Aug 2015, at 19:31, Eliot Miranda > wrote: >> >> Hi Max, >> >> On Fri, Aug 21, 2015 at 8:57 AM, Max Leske > wrote: >> Hi folks >> >> I?ve been trying to load Fuel into Squeak 5 but can?t because I get errors when loading Traits (they have not instance variables). The reason for this error seems to be that #instSize answers 2 for Traits when it should answer 0. >> >> The current implementation is: >> >> ^format bitAnd: 16rFFFF >> >> The comment in the 4.6 version says: >> >> " >> NOTE: This code supports the backward-compatible extension to 8 bits of instSize. >> When we revise the image format, it should become... >> ^ ((format bitShift: -1) bitAnd: 16rFF) - 1 >> Note also that every other method in this category will require >> 2 bits more of right shift after the change. >> ? >> >> When I use that version in TraitBehaviour>>instSize in Squeak 5 I get 0 as expected and I can load Fuel without problems. >> >> So Spur has a different layout for format than V3. The above implementation (format bitAnd: 16rFFFF) is correct for Spur. In loading classes or traits via Fuel from 4.6 to 5.0 you're going to have to convert the format inst var to reflect its usage in Spur. So we need to be clear here. >> >> Is the issue that you're trying to load classes and/or traits from a Fuel file written by 4.6 or is it that as part of the Fuel load a new Trait gets created which has a format of 2? > > The latter. This is reproducible by simply creating a new Trait: > > Trait named: #NewTrait > uses: #() > category: ?new cat?. > NewTrait instSize ??> 2? > > I just took a look at this and it doesn't reproduce. I'm using a trunk Squeak 5 image and I get 0 and required. ? Thanks Eliot. You?re right. The problem is not with #instSize, I don?t know how I managed to get the above? The problem is actually, that TApplyingOnClassSide (which is already present) has a format of 2: TApplyingOnClassSide instSize ??> 2? Also, all Traits in the image have format 2, while new Traits have format 0: format2 := Smalltalk allTraits select: [ :e | e format = 2 ]. Smalltalk allTraits size = format2 size ??> true" Trait named: #NewTrait uses: #() category: 'new cat?. NewTrait instSize ??> 0" format2 := Smalltalk allTraits select: [ :e | e format = 2 ]. Smalltalk allTraits size = format2 size ??> false? This is with build 15113 (which is trunk I suppose). Cheers, Max > > Cheers, > Max > >> >> >> Cheers, >> Max >> >> >> >> -- >> _,,,^..^,,,_ >> best, Eliot > > > > > -- > _,,,^..^,,,_ > best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150823/47f56386/attachment.htm From commits at source.squeak.org Sun Aug 23 13:21:15 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Aug 23 13:21:16 2015 Subject: [squeak-dev] The Trunk: Regex-Tests-Core-ul.2.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Tests-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Tests-Core-ul.2.mcz ==================== Summary ==================== Name: Regex-Tests-Core-ul.2 Author: ul Time: 23 August 2015, 3:20:40.256 pm UUID: f3dac194-a7e9-4ae1-a9be-4359591421c2 Ancestors: Regex-Tests-Core-ul.1 - added a test for the the bug caused by (aa)?{2} - added #groupsDo: to RxMatcherTest>>runRegex: to make it easier to see what's being tested =============== Diff against Regex-Tests-Core-ul.1 =============== Item was changed: ----- Method: RxMatcherTest>>runRegex: (in category 'utilties') ----- runRegex: anArray "Run a clause anArray against a set of tests. Each clause is an array with a regex source string followed by sequence of 3-tuples. Each three-element group is one test to try against the regex, and includes: 1) test string; 2) expected result; 3) expected subexpression as an array of (index, substring), or nil." | source matcher | source := anArray first. matcher := self compileRegex: source. matcher isNil ifTrue: [ (anArray at: 2) isNil ifFalse: [ self signalFailure: 'Compilation failed, should have succeeded: ' , source printString ] ] ifFalse: [ (anArray at: 2) isNil ifTrue: [ self signalFailure: 'Compilation succeeded, should have failed: ' , source printString ] ifFalse: [ + anArray allButFirst groupsDo: [ :input :shouldMatch :expectedOutput | - 2 to: anArray size by: 3 do: [ :index | self runMatcher: matcher + with: input + expect: shouldMatch + withSubexpressions: expectedOutput ] ] ]! - with: (anArray at: index) - expect: (anArray at: index + 1) - withSubexpressions: (anArray at: index + 2) ] ] ]! Item was added: + ----- Method: RxMatcherTest>>testOptionalNestedIntoMultipleQuantified (in category 'testing') ----- + testOptionalNestedIntoMultipleQuantified + + + self runRegex: #('(aa?){2}' + '' false nil + 'a' false nil + 'aa' true (1 'aa') + 'baaa' true (2 'aaa'))! From commits at source.squeak.org Sun Aug 23 13:21:36 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Aug 23 13:21:37 2015 Subject: [squeak-dev] The Trunk: Regex-Core-ul.41.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Core-ul.41.mcz ==================== Summary ==================== Name: Regex-Core-ul.41 Author: ul Time: 23 August 2015, 2:03:57.377 am UUID: b2a59557-016e-41f5-86ab-3dcd33ce0954 Ancestors: Regex-Core-ul.40 Got rid of the reversal of the OrderedCollections in RxMatcher's markerPositions. =============== Diff against Regex-Core-ul.40 =============== Item was changed: ----- Method: RxMatcher>>copyStream:to:replacingMatchesWith: (in category 'match enumeration') ----- copyStream: aStream to: writeStream replacingMatchesWith: aString "Copy the contents of on the , except for the matches. Replace each match with ." | searchStart matchStart matchEnd | stream := aStream. oldMarkerPositions := markerPositions := nil. [searchStart := aStream position. self proceedSearchingStream: aStream] whileTrue: + [matchStart := (self subBeginning: 1) last. + matchEnd := (self subEnd: 1) last. - [matchStart := (self subBeginning: 1) first. - matchEnd := (self subEnd: 1) first. aStream position: searchStart. searchStart to: matchStart - 1 do: [:ignoredPos | writeStream nextPut: aStream next]. writeStream nextPutAll: aString. aStream position: matchEnd. "Be extra careful about successful matches which consume no input. After those, make sure to advance or finish if already at end." matchEnd = searchStart ifTrue: [aStream atEnd ifTrue: [^self "rest after end of whileTrue: block is a no-op if atEnd"] ifFalse: [writeStream nextPut: aStream next]]]. aStream position: searchStart. [aStream atEnd] whileFalse: [writeStream nextPut: aStream next]! Item was changed: ----- Method: RxMatcher>>copyStream:to:translatingMatchesUsing: (in category 'match enumeration') ----- copyStream: aStream to: writeStream translatingMatchesUsing: aBlock "Copy the contents of on the , except for the matches. For each match, evaluate passing the matched substring as the argument. Expect the block to answer a String, and write the answer to in place of the match." | searchStart matchStart matchEnd match | stream := aStream. oldMarkerPositions := markerPositions := nil. [searchStart := aStream position. self proceedSearchingStream: aStream] whileTrue: + [matchStart := (self subBeginning: 1) last. + matchEnd := (self subEnd: 1) last. - [matchStart := (self subBeginning: 1) first. - matchEnd := (self subEnd: 1) first. aStream position: searchStart. searchStart to: matchStart - 1 do: [:ignoredPos | writeStream nextPut: aStream next]. match := (String new: matchEnd - matchStart + 1) writeStream. matchStart to: matchEnd - 1 do: [:ignoredPos | match nextPut: aStream next]. writeStream nextPutAll: (aBlock value: match contents). "Be extra careful about successful matches which consume no input. After those, make sure to advance or finish if already at end." matchEnd = searchStart ifTrue: [aStream atEnd ifTrue: [^self "rest after end of whileTrue: block is a no-op if atEnd"] ifFalse: [writeStream nextPut: aStream next]]]. aStream position: searchStart. [aStream atEnd] whileFalse: [writeStream nextPut: aStream next]! Item was changed: ----- Method: RxMatcher>>markerPositionAt:add: (in category 'privileged') ----- markerPositionAt: anIndex add: position "Remember position of another instance of the given marker." + (markerPositions at: anIndex) addLast: position! - (markerPositions at: anIndex) addFirst: position! Item was changed: ----- Method: RxMatcher>>subexpressions: (in category 'accessing') ----- subexpressions: subIndex "Answer an array of all matches of the subexpression at the given index. The answer is always an array; it is empty if there are no matches." | originalPosition startPositions stopPositions reply | originalPosition := stream position. startPositions := self subBeginning: subIndex. stopPositions := self subEnd: subIndex. (startPositions isEmpty or: [stopPositions isEmpty]) ifTrue: [^Array new]. reply := Array new: startPositions size. 1 to: reply size do: [ :index | | start stop | start := startPositions at: index. stop := stopPositions at: index. stream position: start. + reply at: reply size - index + 1 put: (stream next: stop - start) ]. - reply at: index put: (stream next: stop - start) ]. stream position: originalPosition. ^reply! Item was changed: ----- Method: RxMatcher>>tryMatch (in category 'private') ----- tryMatch "Match thyself against the current stream." | newMarkerPositions | newMarkerPositions := oldMarkerPositions. oldMarkerPositions := markerPositions. markerPositions := newMarkerPositions. markerPositions ifNil: [ markerPositions := Array new: markerCount. 1 to: markerCount do: [ :i | + "There are usually 0 or 1 objects to store." + markerPositions at: i put: (OrderedCollection new: 2) ] ] - | collection | - collection := OrderedCollection new: 2. "There are usually 0 or 1 objects to store." - collection resetTo: 3. "We'll add elements to the beginning, so make room there." - markerPositions at: i put: collection ] ] ifNotNil: [ 1 to: markerCount do: [ :i | + (markerPositions at: i) resetTo: 1 ] ]. - | collection | - collection := markerPositions at: i. - collection resetTo: collection capacity + 1 ] ]. lastResult := startOptimizer ifNil: [ matcher matchAgainst: self] ifNotNil: [ (startOptimizer canStartMatch: stream peek in: self) and: [ matcher matchAgainst: self ] ]. "check for duplicates" lastResult ifFalse: [ ^false ]. oldMarkerPositions ifNil: [ ^true ]. (oldMarkerPositions hasEqualElements: markerPositions) ifFalse: [ ^true ]. + "this is a duplicate match" - "this is a duplicate" ^ lastResult := false! From commits at source.squeak.org Sun Aug 23 13:21:47 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Aug 23 13:21:48 2015 Subject: [squeak-dev] The Trunk: Regex-Core-ul.42.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Core-ul.42.mcz ==================== Summary ==================== Name: Regex-Core-ul.42 Author: ul Time: 23 August 2015, 3:19:11.269 pm UUID: dff1489c-4eb8-4a81-bd5d-7f1918006603 Ancestors: Regex-Core-ul.41 - added RxmBranch >> #postCopy to copy the alternative as well, so that the compilation on (aa?){2} doesn't get into infinite recursion. Note that the compilation is still buggy, but it doesn't crash the image. - added RxmLink >> #printOn: to make it easier to follow the matcher chain =============== Diff against Regex-Core-ul.41 =============== Item was added: + ----- Method: RxmBranch>>postCopy (in category 'copying') ----- + postCopy + + super postCopy. + alternative := alternative copy! Item was added: + ----- Method: RxmLink>>printOn: (in category 'as yet unclassified') ----- + printOn: stream + + super printOn: stream. + stream + nextPut: $(; + print: self identityHash; + nextPutAll: ', '; + print: (next ifNotNil: [ next identityHash ]); + nextPut: $)! From brasspen at gmail.com Sun Aug 23 16:02:46 2015 From: brasspen at gmail.com (Chris Cunnington) Date: Sun Aug 23 16:02:55 2015 Subject: [squeak-dev] Re: scripts to update the all-in-one In-Reply-To: <17A9E16F-BDB0-45D4-8153-9BFFA7F90DB6@gmail.com> References: <17A9E16F-BDB0-45D4-8153-9BFFA7F90DB6@gmail.com> Message-ID: <2F58DFE1-B999-4A12-A9F2-485111D4917F@gmail.com> > https://github.com/pdebruic/Squeak-All-In-One Paul has created a great script for creating an all-in-one. He made it for a purpose other than the Squeak release process, but I think this is interesting, useful, and could be a great piece of ?code as documentation? for people to see. Chris > On Aug 23, 2015, at 8:48 AM, Paul DeBruicker wrote: > > Hi Chris > > > Here eliot mentions updating the all-in-one and making that process easier: > > http://forum.world.st/New-Cog-VMs-available-td4845025.html > > > > > A couple years ago I made a set of scripts that would do it here: > > > https://github.com/pdebruic/Squeak-All-In-One > > > Maybe the scripts and what you did for the last one could be combined to make it easier > > From asqueaker at gmail.com Sun Aug 23 17:51:06 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sun Aug 23 17:51:08 2015 Subject: [squeak-dev] Corrupt MCZ files in the squeak46 repo In-Reply-To: <20150822010606.GA81384@shell.msen.com> References: <20150822010606.GA81384@shell.msen.com> Message-ID: I don't know exactly how or why, but I know its related to saving two different versions of the same package (with different UUID's) but with the same exact filename (e.g., same package, author and version #). On Fri, Aug 21, 2015 at 8:06 PM, David T. Lewis wrote: > We apparently have some corrupt MCZ files in the squeak46 archive. I think we have > seen this problem before, so before I try to "fix" it, does anyone recognize this > or know the source of the problem? > > The corrupt archives that I see so far are in category System. The files are good > in trunk, but empty in squeak46. On the server, it looks like this: > > > davidlewis@squeak-box4:/srv/box2/home/squeaksource/ss$ find . -name System-\*.75[13].mcz | xargs ls -ltd > -rw-r--r-- 1 davidlewis davidlewis 79468 Jul 6 17:59 ./squeak46/System-topa.753.mcz > -rw-r--r-- 1 davidlewis davidlewis 926999 Jul 6 16:52 ./trunk/System-topa.753.mcz > -rw-r--r-- 1 davidlewis davidlewis 79870 Jul 2 20:27 ./squeak46/System-cmm.751.mcz > -rw-r--r-- 1 davidlewis davidlewis 926651 Jul 2 18:24 ./trunk/System-cmm.751.mcz > > > Presumably we can copy the good MCZ files from trunk to squeak46, but before > I do that does anyone recognize what the problem might be? > > Dave > > From commits at source.squeak.org Sun Aug 23 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Aug 23 21:55:03 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150823215502.26364.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-August/008885.html Name: Temp-update-stream-migration-dtl.1 Ancestors: The Squeak trunk development stream is transitioning to Spur image format. Existing V3 images that update from trunk need to avoid loading Spur-specific methods. Move the update preference for those images to the squeak46 maintenance repository. This class is intended to be loadedfrom a single update map in order to perform a one time update for V3 images, after which is serves no ongoing purpose. Therefore, following its initialization, it will delete itself from the system. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008886.html Name: Regex-Tests-Core-ul.2 Ancestors: Regex-Tests-Core-ul.1 - added a test for the the bug caused by (aa)?{2} - added #groupsDo: to RxMatcherTest>>runRegex: to make it easier to see what's being tested ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008887.html Name: Regex-Core-ul.41 Ancestors: Regex-Core-ul.40 Got rid of the reversal of the OrderedCollections in RxMatcher's markerPositions. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008888.html Name: Regex-Core-ul.42 Ancestors: Regex-Core-ul.41 - added RxmBranch >> #postCopy to copy the alternative as well, so that the compilation on (aa?){2} doesn't get into infinite recursion. Note that the compilation is still buggy, but it doesn't crash the image. - added RxmLink >> #printOn: to make it easier to follow the matcher chain ============================================= From commits at source.squeak.org Mon Aug 24 01:35:28 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Aug 24 01:35:30 2015 Subject: [squeak-dev] The Trunk: Morphic-dtl.997.mcz Message-ID: David T. Lewis uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-dtl.997.mcz ==================== Summary ==================== Name: Morphic-dtl.997 Author: dtl Time: 23 August 2015, 9:32:02.122 pm UUID: e66cf3fd-1cd2-42c6-9fe2-c745eb1f688c Ancestors: Morphic-topa.996 Workspace "Send contents to printer" works in MVC, not in Morphic, due to missing implementation in the new Editor hierarchy. Add TextEditor>>sendContentsToPrinterWithLabel: for use with PluggableTextMorph. =============== Diff against Morphic-topa.996 =============== Item was changed: ----- Method: PluggableTextMorph>>sendContentsToPrinter (in category 'menu commands') ----- sendContentsToPrinter + self handleEdit: [textMorph editor sendContentsToPrinterWithLabel: owner knownName]! - self handleEdit: [textMorph editor sendContentsToPrinter]! Item was added: + ----- Method: TextEditor>>sendContentsToPrinterWithLabel: (in category 'menu messages') ----- + sendContentsToPrinterWithLabel: label + | textToPrint printer | + textToPrint := paragraph text. + textToPrint size = 0 ifTrue: [^self inform: 'nothing to print.']. + printer := TextPrinter defaultTextPrinter. + printer documentTitle: (label ifNil: ['Untitled']). + printer printText: textToPrint! From leves at elte.hu Mon Aug 24 09:42:58 2015 From: leves at elte.hu (Levente Uzonyi) Date: Mon Aug 24 09:43:03 2015 Subject: [squeak-dev] The Trunk: Morphic-dtl.997.mcz In-Reply-To: References: Message-ID: Hi Dave, I think this method belongs to Editor instead of TextEditor. Levente On Mon, 24 Aug 2015, commits@source.squeak.org wrote: > David T. Lewis uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-dtl.997.mcz > > ==================== Summary ==================== > > Name: Morphic-dtl.997 > Author: dtl > Time: 23 August 2015, 9:32:02.122 pm > UUID: e66cf3fd-1cd2-42c6-9fe2-c745eb1f688c > Ancestors: Morphic-topa.996 > > Workspace "Send contents to printer" works in MVC, not in Morphic, due to missing implementation in the new Editor hierarchy. Add TextEditor>>sendContentsToPrinterWithLabel: for use with PluggableTextMorph. > > =============== Diff against Morphic-topa.996 =============== > > Item was changed: > ----- Method: PluggableTextMorph>>sendContentsToPrinter (in category 'menu commands') ----- > sendContentsToPrinter > + self handleEdit: [textMorph editor sendContentsToPrinterWithLabel: owner knownName]! > - self handleEdit: [textMorph editor sendContentsToPrinter]! > > Item was added: > + ----- Method: TextEditor>>sendContentsToPrinterWithLabel: (in category 'menu messages') ----- > + sendContentsToPrinterWithLabel: label > + | textToPrint printer | > + textToPrint := paragraph text. > + textToPrint size = 0 ifTrue: [^self inform: 'nothing to print.']. > + printer := TextPrinter defaultTextPrinter. > + printer documentTitle: (label ifNil: ['Untitled']). > + printer printText: textToPrint! > > > From lewis at mail.msen.com Mon Aug 24 11:41:52 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Aug 24 11:41:55 2015 Subject: [squeak-dev] The Trunk: Morphic-dtl.997.mcz In-Reply-To: References: Message-ID: <20150824114152.GA73219@shell.msen.com> On Mon, Aug 24, 2015 at 11:42:58AM +0200, Levente Uzonyi wrote: > Hi Dave, > > I think this method belongs to Editor instead of TextEditor. > > Levente I was not sure which was best. Most of the "menu messages" are in TextEditor, so I added the new one there for consistency. But as you say, Editor seems like a better place for them. Dave > > On Mon, 24 Aug 2015, commits@source.squeak.org wrote: > > >David T. Lewis uploaded a new version of Morphic to project The Trunk: > >http://source.squeak.org/trunk/Morphic-dtl.997.mcz > > > >==================== Summary ==================== > > > >Name: Morphic-dtl.997 > >Author: dtl > >Time: 23 August 2015, 9:32:02.122 pm > >UUID: e66cf3fd-1cd2-42c6-9fe2-c745eb1f688c > >Ancestors: Morphic-topa.996 > > > >Workspace "Send contents to printer" works in MVC, not in Morphic, due to > >missing implementation in the new Editor hierarchy. Add > >TextEditor>>sendContentsToPrinterWithLabel: for use with > >PluggableTextMorph. > > > >=============== Diff against Morphic-topa.996 =============== > > > >Item was changed: > > ----- Method: PluggableTextMorph>>sendContentsToPrinter (in category > > 'menu commands') ----- > > sendContentsToPrinter > >+ self handleEdit: [textMorph editor sendContentsToPrinterWithLabel: > >owner knownName]! > >- self handleEdit: [textMorph editor sendContentsToPrinter]! > > > >Item was added: > >+ ----- Method: TextEditor>>sendContentsToPrinterWithLabel: (in category > >'menu messages') ----- > >+ sendContentsToPrinterWithLabel: label > >+ | textToPrint printer | > >+ textToPrint := paragraph text. > >+ textToPrint size = 0 ifTrue: [^self inform: 'nothing to print.']. > >+ printer := TextPrinter defaultTextPrinter. > >+ printer documentTitle: (label ifNil: ['Untitled']). > >+ printer printText: textToPrint! > > > > > > From lewis at mail.msen.com Mon Aug 24 11:55:57 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Aug 24 11:55:58 2015 Subject: [squeak-dev] The Trunk: Morphic-dtl.997.mcz In-Reply-To: <20150824114152.GA73219@shell.msen.com> References: <20150824114152.GA73219@shell.msen.com> Message-ID: <20150824115557.GA75365@shell.msen.com> On Mon, Aug 24, 2015 at 07:41:52AM -0400, David T. Lewis wrote: > On Mon, Aug 24, 2015 at 11:42:58AM +0200, Levente Uzonyi wrote: > > Hi Dave, > > > > I think this method belongs to Editor instead of TextEditor. > > > > Levente > > I was not sure which was best. Most of the "menu messages" are in > TextEditor, so I added the new one there for consistency. But as you > say, Editor seems like a better place for them. > Sorry for replying to my own post, but I should note also that the class comment of Editor suggests that the original design intent was to support a variety of things that might be quite different from TextEditor (SimpleEditor? CellStyleEditor? what became of these?). So maybe the menu messages were put in TextEditor for that reason. The class comment is: New text editors. TextEditor provides most of the functionality that used to be in TextMorphEditor. SmalltalkEditor is has (sic) Smalltalk code specific features. SimpleEditor provides basic functionality for single line text editing. It does not handle fonts and styles, aligning and Smalltalk utilities. It handles one single line. CellStyleEditor allows entering alphabetic characters using only number keys, like many cell phones do. Dave > > > > > On Mon, 24 Aug 2015, commits@source.squeak.org wrote: > > > > >David T. Lewis uploaded a new version of Morphic to project The Trunk: > > >http://source.squeak.org/trunk/Morphic-dtl.997.mcz > > > > > >==================== Summary ==================== > > > > > >Name: Morphic-dtl.997 > > >Author: dtl > > >Time: 23 August 2015, 9:32:02.122 pm > > >UUID: e66cf3fd-1cd2-42c6-9fe2-c745eb1f688c > > >Ancestors: Morphic-topa.996 > > > > > >Workspace "Send contents to printer" works in MVC, not in Morphic, due to > > >missing implementation in the new Editor hierarchy. Add > > >TextEditor>>sendContentsToPrinterWithLabel: for use with > > >PluggableTextMorph. > > > > > >=============== Diff against Morphic-topa.996 =============== > > > > > >Item was changed: > > > ----- Method: PluggableTextMorph>>sendContentsToPrinter (in category > > > 'menu commands') ----- > > > sendContentsToPrinter > > >+ self handleEdit: [textMorph editor sendContentsToPrinterWithLabel: > > >owner knownName]! > > >- self handleEdit: [textMorph editor sendContentsToPrinter]! > > > > > >Item was added: > > >+ ----- Method: TextEditor>>sendContentsToPrinterWithLabel: (in category > > >'menu messages') ----- > > >+ sendContentsToPrinterWithLabel: label > > >+ | textToPrint printer | > > >+ textToPrint := paragraph text. > > >+ textToPrint size = 0 ifTrue: [^self inform: 'nothing to print.']. > > >+ printer := TextPrinter defaultTextPrinter. > > >+ printer documentTitle: (label ifNil: ['Untitled']). > > >+ printer printText: textToPrint! > > > > > > > > > From juanlists at jvuletich.org Mon Aug 24 13:28:17 2015 From: juanlists at jvuletich.org (J. Vuletich (mail lists)) Date: Mon Aug 24 13:28:22 2015 Subject: [squeak-dev] Re: [Vm-dev] New Cog VMs available... In-Reply-To: References: Message-ID: <20150824132817.Horde.7mj1UgJfqgatW2PykGELgg7@gator3294.hostgator.com> Thanks Eliot! It works great, and indeed it fixes the issue with AndreasSystemProfiler I had reported. Cheers, Juan Vuletich Quoting Eliot Miranda : > From commits at source.squeak.org Mon Aug 24 15:43:17 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Aug 24 15:43:18 2015 Subject: [squeak-dev] The Trunk: Installer-Core-cmm.399.mcz Message-ID: Chris Muller uploaded a new version of Installer-Core to project The Trunk: http://source.squeak.org/trunk/Installer-Core-cmm.399.mcz ==================== Summary ==================== Name: Installer-Core-cmm.399 Author: cmm Time: 24 August 2015, 10:43:08.114 am UUID: 2c2b974d-235b-45e5-8f70-430a3092a7e7 Ancestors: Installer-Core-ul.398 - Ma-Installer was moved back to squeaksource.com. - SqueakSSL and WebClient are now part of the base image and maintained at source.squeak.org. =============== Diff against Installer-Core-ul.398 =============== Item was changed: ----- Method: Installer>>maInstaller (in category 'package-definitions') ----- maInstaller "Select from a family of related packages for application development." + ^ { #ss -> 'Ma-Installer'. - ^ { #ss3 -> 'Ma-Installer'. 'Ma-Installer-Core' }! Item was removed: - ----- Method: Installer>>squeakSslCore (in category 'package-definitions') ----- - squeakSslCore - "SSL implementation on top of WebClient. Requires the SqueakSSL VM plugin." - ^ { self webClientCore. - #ss -> 'SqueakSSL'. - 'SqueakSSL-Core' }! Item was removed: - ----- Method: Installer>>squeakSslTests (in category 'package-definitions') ----- - squeakSslTests - "SqueakSSL test package." - ^ { self webClientTests. - self squeakSslCore. - 'SqueakSSL-Tests' }! Item was removed: - ----- Method: Installer>>webClientCore (in category 'package-definitions') ----- - webClientCore - "Simple, compact, and easy to use HTTP client implementation from Andreas Raab." - ^ { #ss3 -> 'WebClient'. - 'WebClient-Core' }! Item was changed: ----- Method: Installer>>webClientSsp (in category 'package-definitions') ----- webClientSsp "WebClient supports NTLM/SPNEGO authentication via the Microsoft SSP interface (Windows only)." ^ { self ffiTests. + #ss3 -> 'WebClient'. - self webClientTests. 'WebClient-SSP' }! Item was removed: - ----- Method: Installer>>webClientTests (in category 'package-definitions') ----- - webClientTests - "Help documentation and tests for Web Client." - ^ { self webClientCore. - 'WebClient-Tests'. - 'WebClient-Help' }! From brasspen at gmail.com Mon Aug 24 15:58:13 2015 From: brasspen at gmail.com (Chris Cunnington) Date: Mon Aug 24 15:58:16 2015 Subject: [squeak-dev] PDX -- a quick and dirty roundup Message-ID: News (from my perspective): - Dolphin ST is still alive and available (link below) - Ken Dickey has a nifty morph control gui kit called Emergence on Cuis that looks Maui-esque (link below) - Camp Smalltalk Vanisle is intended to go in October even though they have not announced yet - No Cincom people were here. - Dale and Paul worked on Metacello. This: (Installer repository: ' http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main') install: 'ConfigurationOfSeaside3'. ((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) load: #('Development' 'Welcome' 'RSS-Examples' 'Seaside-Email' 'Seaside-Examples' 'Seaside-Tools-Web' 'WebClient') will fail in Squeak for the time being until Metacello adds some kind of recognition parameters for Squeak 5.0. It will choke by asking for OmniBrowser. - Paul is trying to connect to LMDB via BerkeleyDB plugin which he has code for on his Github (links below) - There are pictures below of the Sat. evening dinner (link below) - Chris Thorgrimsson is about to release to the VW Store a package called PCAPNG which slices and dices Wireshark data down to the header level and lets you write your own filters. Alexander Bergel is expected to port it to Pharo. I made noises saying I might do bring it to Squeak but likely need to walk back from that position - I presented about Orange, a wiki I'm working on in Altitude inspired by TinyWiki that uses Xtreams PEG parsing - Sean presented about Gamour and gt toolkit - Martin presented about Mist and Fog his Smalltalk implementation that will never know C in any form - Seth of Instantiations presented about in-Workspace any-language code highlighting - I finally understood why Richie down in Buenos Aires sounded like he was speaking Mayan when I asked him about the kind of Smalltalk he was using when I saw him present at ESUG in 2011. If I recall correctly, he was using Visual Smalltalk Enterprise which is derived from Digitalk and was bought by Cincom, which made the image unavailable to anybody, but sold the rights to the VM to a company called Seagull, which sells the source code to anybody for $50,000. This made sense only to people who already had the image (i.e. Richie and LabWare) and looked like perversity to anybody else. You see why I didn't (and probably still don't) understand. - There is a company in Delaware called LabWare. They like Smalltalk. They have the above mentioned VM which a woman I met here (I think her name is Diane) has been upgrading by adding UTF8 and such. Their VM developer team was here at PDX (Boris, Andreas, Diane and Dave) and they are designing a VM from scratch. They tell me they will open source it. This was followed by the irritating news that they don't have any idea when they will even start a blog on the topic. It's sounds fascinating, so here's hoping they do. - James Foster presented a Gemstone to SQL database at ESUG that uses PetitParser and showed it here at PDX - The CSS and JavaScript libraries of the week mentioned at PDX included AngularJS, FlexBox, Google Materials, Angular Materials, Polymer, Ember and React - Some young programers are working on a new Smalltalk from an 80s paper by Wirfs-Brock called ModTalk (link below). It's modular and I don't think it has #become: - I learned more about #become: from a patient Martin by showing him code in VMMaker. The struggle is ongoing. That's the broad strokes for me. I imagine other people had different impressions. Chris https://github.com/dalehenrich https://github.com/pdebruic?tab=repositories https://github.com/KenDickey/Cuis-Smalltalk-BabySteps http://symas.com/mdb/ http://object-arts.com/ https://photos.google.com/share/AF1QipOo-uf19ceGHiRRa6Qv_GyU4hDfPVVuwIFhKku93QTydzbnWCOUeDmeanKGrWtPJQ?key=dzFVLTJvN19iSTZrYWRXNE82Y3Z5Slk4bWVOWTdn http://www.modtalk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150824/208f46ff/attachment.htm From commits at source.squeak.org Mon Aug 24 16:11:05 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Aug 24 16:11:07 2015 Subject: [squeak-dev] The Trunk: Collections-ul.648.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.648.mcz ==================== Summary ==================== Name: Collections-ul.648 Author: ul Time: 23 August 2015, 11:56:36.78 pm UUID: 03127fe2-feda-47f9-ba11-984377a172ff Ancestors: Collections-ul.647 CharacterSet: - store the size in an instance variable - moved removal logic to #remove:ifAbsent:, while kept the behavior of #remove: - migrate existing instances by sending #size in the postscript =============== Diff against Collections-ul.647 =============== Item was changed: Collection subclass: #CharacterSet + instanceVariableNames: 'map tally' - instanceVariableNames: 'map' classVariableNames: 'CrLf NonSeparators Separators' poolDictionaries: '' category: 'Collections-Support'! !CharacterSet commentStamp: '' prior: 0! A set of characters. Lookups for inclusion are very fast.! Item was changed: ----- Method: CharacterSet>>= (in category 'comparison') ----- = anObject + + self species == anObject species ifFalse: [ ^false ]. + self size. "to migrate existing instances" + anObject size = tally ifFalse: [ ^false ]. + ^self byteArrayMap = anObject byteArrayMap! - ^self species == anObject species and: [ - self byteArrayMap = anObject byteArrayMap ]! Item was changed: ----- Method: CharacterSet>>add: (in category 'collection ops') ----- add: aCharacter "I automatically become a WideCharacterSet if you add a wide character to myself" + | index | + (index := aCharacter asInteger + 1) <= 256 ifFalse: [ + | wide | + wide := WideCharacterSet new. + wide addAll: self. + wide add: aCharacter. + self becomeForward: wide. + ^aCharacter ]. + (map at: index) = 1 ifTrue: [ ^aCharacter ]. + self size. "to migrate existing instances." + map at: index put: 1. + tally := tally + 1. - aCharacter asciiValue >= 256 - ifTrue: [| wide | - wide := WideCharacterSet new. - wide addAll: self. - wide add: aCharacter. - self becomeForward: wide. - ^aCharacter]. - map at: aCharacter asciiValue + 1 put: 1. ^aCharacter! Item was changed: ----- Method: CharacterSet>>do: (in category 'collection ops') ----- do: aBlock "evaluate aBlock with each character in the set" + | index | + self size. "to migrate existing instances" + tally >= 128 ifTrue: [ "dense" + index := 0. + [ (index := index + 1) <= 256 ] whileTrue: [ + (map at: index) = 1 ifTrue: [ + aBlock value: (Character value: index - 1) ] ]. + ^self ]. + "sparse" + index := 0. + [ (index := map indexOf: 1 startingAt: index + 1) = 0 ] whileFalse: [ + aBlock value: (Character value: index - 1) ]. + ! - Character allByteCharacters do: [ :c | - (self includes: c) ifTrue: [ aBlock value: c ] ] - ! Item was changed: ----- Method: CharacterSet>>initialize (in category 'private') ----- initialize + + map := ByteArray new: 256. + tally := 0! - map := ByteArray new: 256 withAll: 0.! Item was changed: ----- Method: CharacterSet>>remove: (in category 'collection ops') ----- remove: aCharacter + + ^self remove: aCharacter ifAbsent: aCharacter! - aCharacter asciiValue >= 256 - ifFalse: ["Guard against wide characters" - map at: aCharacter asciiValue + 1 put: 0]. - ^aCharacter! Item was changed: ----- Method: CharacterSet>>remove:ifAbsent: (in category 'collection ops') ----- remove: aCharacter ifAbsent: aBlock + + | index | + (index := aCharacter asciiValue + 1) <= 256 ifFalse: [ ^aBlock value ]. + (map at: index) = 0 ifTrue: [ ^aBlock value ]. + self size. "to migrate existing instances." + map at: index put: 0. + tally := tally - 1. + ^aCharacter! - (self includes: aCharacter) ifFalse: [^aBlock value]. - ^self remove: aCharacter! Item was changed: ----- Method: CharacterSet>>removeAll (in category 'removing') ----- removeAll + map atAllPut: 0. + tally := 0! - map atAllPut: 0! Item was changed: ----- Method: CharacterSet>>size (in category 'collection ops') ----- size + + ^tally ifNil: [ + | index count | + index := count := 0. + [ (index := map indexOf: 1 startingAt: index + 1) = 0 ] whileFalse: [ + count := count + 1 ]. + tally := count ]! - ^map sum! Item was changed: + (PackageInfo named: 'Collections') postscript: 'CharacterSet allInstancesDo: #size'! - (PackageInfo named: 'Collections') postscript: 'WideCharacterSet allInstancesDo: #migrate'! From commits at source.squeak.org Mon Aug 24 16:11:18 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Aug 24 16:11:20 2015 Subject: [squeak-dev] The Trunk: Regex-Core-ul.43.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Core-ul.43.mcz ==================== Summary ==================== Name: Regex-Core-ul.43 Author: ul Time: 23 August 2015, 11:52:59.334 pm UUID: 7d13e585-1608-426d-8849-1c46a09bc5cf Ancestors: Regex-Core-ul.42 A few more tweaks here and there: - keep all marker positions in RxMatcher - optimize the case of one sized character set in RxsCharSet>>enumerablePartPredicateIgnoringCase: - avoid collection copies in RxMatchOptimizer when possible =============== Diff against Regex-Core-ul.42 =============== Item was added: + ----- Method: RxMatchOptimizer>>addNonPrefixes: (in category 'private') ----- + addNonPrefixes: aSet + + ^nonPrefixes + ifNil: [ nonPrefixes := aSet ] + ifNotNil: [ nonPrefixes addAll: aSet ]! Item was added: + ----- Method: RxMatchOptimizer>>addPrefixes: (in category 'private') ----- + addPrefixes: aSet + + ^prefixes + ifNil: [ prefixes := aSet ] + ifNotNil: [ prefixes addAll: aSet ]! Item was changed: ----- Method: RxMatchOptimizer>>syntaxCharSet: (in category 'double dispatch') ----- syntaxCharSet: charSetNode "All these (or none of these) characters is the prefix." (charSetNode enumerableSetIgnoringCase: ignoreCase) ifNotNil: [ :enumerableSet | charSetNode isNegated + ifTrue: [ self addNonPrefixes: enumerableSet ] + ifFalse: [ self addPrefixes: enumerableSet ] ]. - ifTrue: [ enumerableSet do: [ :each | self addNonPrefix: each ] ] - ifFalse: [ enumerableSet do: [ :each | self addPrefix: each ] ] ]. charSetNode predicates ifNotNil: [ :charsetPredicates | charSetNode isNegated ifTrue: [ charsetPredicates do: [ :each | self addNonPredicate: each ] ] ifFalse: [ charsetPredicates do: [ :each | self addPredicate: each ] ] ]! Item was changed: Object subclass: #RxMatcher + instanceVariableNames: 'matcher ignoreCase startOptimizer stream markerPositions markerCount lastResult oldMarkerPositions firstTry' - instanceVariableNames: 'matcher ignoreCase startOptimizer stream markerPositions markerCount lastResult oldMarkerPositions' classVariableNames: 'Cr Lf' poolDictionaries: '' category: 'Regex-Core'! !RxMatcher commentStamp: 'Tbn 11/12/2010 23:13' prior: 0! -- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov -- This is a recursive regex matcher. Not strikingly efficient, but simple. Also, keeps track of matched subexpressions. The life cycle goes as follows: 1. Initialization. Accepts a syntax tree (presumably produced by RxParser) and compiles it into a matcher built of other classes in this category. 2. Matching. Accepts a stream or a string and returns a boolean indicating whether the whole stream or its prefix -- depending on the message sent -- matches the regex. 3. Subexpression query. After a successful match, and before any other match, the matcher may be queried about the range of specific stream (string) positions that matched to certain parenthesized subexpressions of the original expression. Any number of queries may follow a successful match, and any number or matches may follow a successful initialization. Note that `matcher' is actually a sort of a misnomer. The actual matcher is a web of Rxm* instances built by RxMatcher during initialization. RxMatcher is just the interface facade of this network. It is also a builder of it, and also provides a stream-like protocol to easily access the stream being matched. Instance variables: matcher The entry point into the actual matcher. stream The stream currently being matched against. markerPositions Positions of markers' matches. markerCount Number of markers. lastResult Whether the latest match attempt succeeded or not. lastChar character last seen in the matcher stream! Item was changed: ----- Method: RxMatcher>>copyStream:to:replacingMatchesWith: (in category 'match enumeration') ----- copyStream: aStream to: writeStream replacingMatchesWith: aString "Copy the contents of on the , except for the matches. Replace each match with ." | searchStart matchStart matchEnd | stream := aStream. + self resetMarkerPositions. - oldMarkerPositions := markerPositions := nil. [searchStart := aStream position. self proceedSearchingStream: aStream] whileTrue: [matchStart := (self subBeginning: 1) last. matchEnd := (self subEnd: 1) last. aStream position: searchStart. searchStart to: matchStart - 1 do: [:ignoredPos | writeStream nextPut: aStream next]. writeStream nextPutAll: aString. aStream position: matchEnd. "Be extra careful about successful matches which consume no input. After those, make sure to advance or finish if already at end." matchEnd = searchStart ifTrue: [aStream atEnd ifTrue: [^self "rest after end of whileTrue: block is a no-op if atEnd"] ifFalse: [writeStream nextPut: aStream next]]]. aStream position: searchStart. [aStream atEnd] whileFalse: [writeStream nextPut: aStream next]! Item was changed: ----- Method: RxMatcher>>copyStream:to:translatingMatchesUsing: (in category 'match enumeration') ----- copyStream: aStream to: writeStream translatingMatchesUsing: aBlock "Copy the contents of on the , except for the matches. For each match, evaluate passing the matched substring as the argument. Expect the block to answer a String, and write the answer to in place of the match." | searchStart matchStart matchEnd match | stream := aStream. + self resetMarkerPositions. - oldMarkerPositions := markerPositions := nil. [searchStart := aStream position. self proceedSearchingStream: aStream] whileTrue: [matchStart := (self subBeginning: 1) last. matchEnd := (self subEnd: 1) last. aStream position: searchStart. searchStart to: matchStart - 1 do: [:ignoredPos | writeStream nextPut: aStream next]. match := (String new: matchEnd - matchStart + 1) writeStream. matchStart to: matchEnd - 1 do: [:ignoredPos | match nextPut: aStream next]. writeStream nextPutAll: (aBlock value: match contents). "Be extra careful about successful matches which consume no input. After those, make sure to advance or finish if already at end." matchEnd = searchStart ifTrue: [aStream atEnd ifTrue: [^self "rest after end of whileTrue: block is a no-op if atEnd"] ifFalse: [writeStream nextPut: aStream next]]]. aStream position: searchStart. [aStream atEnd] whileFalse: [writeStream nextPut: aStream next]! Item was changed: ----- Method: RxMatcher>>matchesStreamPrefix: (in category 'accessing') ----- matchesStreamPrefix: theStream "Match thyself against a positionable stream." stream := theStream. + self resetMarkerPositions. - oldMarkerPositions := markerPositions := nil. ^self tryMatch! Item was added: + ----- Method: RxMatcher>>resetMarkerPositions (in category 'private') ----- + resetMarkerPositions + "This method should be sent before the first #tryMatch send." + + firstTry := true. + markerPositions ifNotNil: [ + markerPositions do: [ :each | each resetTo: 1 ] ]! Item was changed: ----- Method: RxMatcher>>searchStream: (in category 'accessing') ----- searchStream: aStream "Search the stream for occurrence of something matching myself. After the search has occurred, stop positioned after the end of the matched substring. Answer a Boolean indicating success." | position | stream := aStream. position := aStream position. + self resetMarkerPositions. - oldMarkerPositions := markerPositions := nil. [aStream atEnd] whileFalse: [self tryMatch ifTrue: [^true]. aStream position: position; next. position := aStream position]. "Try match at the very stream end too!!" ^self tryMatch! Item was changed: ----- Method: RxMatcher>>tryMatch (in category 'private') ----- tryMatch "Match thyself against the current stream." + | newMarkerPositions wasFirstTry | + wasFirstTry := firstTry. + firstTry := false. - | newMarkerPositions | newMarkerPositions := oldMarkerPositions. oldMarkerPositions := markerPositions. markerPositions := newMarkerPositions. markerPositions ifNil: [ markerPositions := Array new: markerCount. 1 to: markerCount do: [ :i | "There are usually 0 or 1 objects to store." markerPositions at: i put: (OrderedCollection new: 2) ] ] ifNotNil: [ 1 to: markerCount do: [ :i | (markerPositions at: i) resetTo: 1 ] ]. lastResult := startOptimizer ifNil: [ matcher matchAgainst: self] ifNotNil: [ (startOptimizer canStartMatch: stream peek in: self) and: [ matcher matchAgainst: self ] ]. "check for duplicates" lastResult ifFalse: [ ^false ]. + wasFirstTry ifTrue: [ ^true ]. - oldMarkerPositions ifNil: [ ^true ]. (oldMarkerPositions hasEqualElements: markerPositions) ifFalse: [ ^true ]. "this is a duplicate match" ^ lastResult := false! Item was changed: ----- Method: RxsCharSet>>enumerablePartPredicateIgnoringCase: (in category 'privileged') ----- enumerablePartPredicateIgnoringCase: aBoolean + | set | + set := (self enumerableSetIgnoringCase: aBoolean) ifNil: [ ^nil ]. + set size = 1 ifTrue: [ + | p | + p := set anyOne. + negated ifTrue: [ ^[ :character | character ~~ p ] ]. + ^[ :character | character == p ] ]. + negated ifTrue: [ ^[ :char | (set includes: char) not ] ]. + ^[ :char | set includes: char ]! - | enumeration | - enumeration := (self enumerableSetIgnoringCase: aBoolean) ifNil: [ ^nil ]. - negated ifTrue: [ ^[ :char | (enumeration includes: char) not ] ]. - ^[ :char | enumeration includes: char ]! From commits at source.squeak.org Mon Aug 24 16:30:39 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Aug 24 16:30:41 2015 Subject: [squeak-dev] The Trunk: Collections-ul.649.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.649.mcz ==================== Summary ==================== Name: Collections-ul.649 Author: ul Time: 23 August 2015, 11:59:16.66 pm UUID: 4d8f9b81-5a5c-41b3-a466-a05df4a883ff Ancestors: Collections-ul.648 - removed migration code from CharacterSet =============== Diff against Collections-ul.648 =============== Item was changed: ----- Method: CharacterSet>>= (in category 'comparison') ----- = anObject self species == anObject species ifFalse: [ ^false ]. - self size. "to migrate existing instances" anObject size = tally ifFalse: [ ^false ]. ^self byteArrayMap = anObject byteArrayMap! Item was changed: ----- Method: CharacterSet>>add: (in category 'collection ops') ----- add: aCharacter "I automatically become a WideCharacterSet if you add a wide character to myself" | index | (index := aCharacter asInteger + 1) <= 256 ifFalse: [ | wide | wide := WideCharacterSet new. wide addAll: self. wide add: aCharacter. self becomeForward: wide. ^aCharacter ]. + (map at: index) = 1 ifFalse: [ + map at: index put: 1. + tally := tally + 1 ]. - (map at: index) = 1 ifTrue: [ ^aCharacter ]. - self size. "to migrate existing instances." - map at: index put: 1. - tally := tally + 1. ^aCharacter! Item was changed: ----- Method: CharacterSet>>do: (in category 'collection ops') ----- do: aBlock "evaluate aBlock with each character in the set" | index | - self size. "to migrate existing instances" tally >= 128 ifTrue: [ "dense" index := 0. [ (index := index + 1) <= 256 ] whileTrue: [ (map at: index) = 1 ifTrue: [ aBlock value: (Character value: index - 1) ] ]. ^self ]. "sparse" index := 0. [ (index := map indexOf: 1 startingAt: index + 1) = 0 ] whileFalse: [ aBlock value: (Character value: index - 1) ]. ! Item was changed: ----- Method: CharacterSet>>remove:ifAbsent: (in category 'collection ops') ----- remove: aCharacter ifAbsent: aBlock | index | (index := aCharacter asciiValue + 1) <= 256 ifFalse: [ ^aBlock value ]. (map at: index) = 0 ifTrue: [ ^aBlock value ]. - self size. "to migrate existing instances." map at: index put: 0. tally := tally - 1. ^aCharacter! Item was changed: ----- Method: CharacterSet>>size (in category 'collection ops') ----- size + ^tally! - ^tally ifNil: [ - | index count | - index := count := 0. - [ (index := map indexOf: 1 startingAt: index + 1) = 0 ] whileFalse: [ - count := count + 1 ]. - tally := count ]! From brasspen at gmail.com Mon Aug 24 18:22:41 2015 From: brasspen at gmail.com (Chris Cunnington) Date: Mon Aug 24 18:22:46 2015 Subject: [squeak-dev] correction [Re: PDX -- a quick and dirty yada yada] Message-ID: <5C89900C-1795-4259-8E44-C91F090893C6@gmail.com> >- Sean presented about Gamour and gt toolkit That should say "Glamour and gt toolkit?. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150824/5fc6a3bf/attachment.htm From commits at source.squeak.org Mon Aug 24 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Aug 24 21:55:03 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150824215502.24352.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-August/008889.html Name: Morphic-dtl.997 Ancestors: Morphic-topa.996 Workspace "Send contents to printer" works in MVC, not in Morphic, due to missing implementation in the new Editor hierarchy. Add TextEditor>>sendContentsToPrinterWithLabel: for use with PluggableTextMorph. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008890.html Name: Installer-Core-cmm.399 Ancestors: Installer-Core-ul.398 - Ma-Installer was moved back to squeaksource.com. - SqueakSSL and WebClient are now part of the base image and maintained at source.squeak.org. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008891.html Name: Collections-ul.648 Ancestors: Collections-ul.647 CharacterSet: - store the size in an instance variable - moved removal logic to #remove:ifAbsent:, while kept the behavior of #remove: - migrate existing instances by sending #size in the postscript ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008892.html Name: Regex-Core-ul.43 Ancestors: Regex-Core-ul.42 A few more tweaks here and there: - keep all marker positions in RxMatcher - optimize the case of one sized character set in RxsCharSet>>enumerablePartPredicateIgnoringCase: - avoid collection copies in RxMatchOptimizer when possible ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008893.html Name: Collections-ul.649 Ancestors: Collections-ul.648 - removed migration code from CharacterSet ============================================= From ma.chris.m at gmail.com Mon Aug 24 22:00:06 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Mon Aug 24 22:00:49 2015 Subject: [squeak-dev] What happened to Morph layering? Message-ID: My Maui applications are suffering greatly by a change to Morphic during the 4.6/5.0 cycle which is causing morphs to be layered in the opposite order than they were in 4.5. The result is, I have morphs of a Proportional layout covering other Morphs which I need to interact with. The order within the 'submorphs' collection is the same, however, the layering appears to be the opposite. Any ideas? From asqueaker at gmail.com Tue Aug 25 01:12:17 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Aug 25 01:12:19 2015 Subject: [squeak-dev] What happened to Morph layering? In-Reply-To: References: Message-ID: Found it. It was the removal of the call to #fullBounds (with a "Sigh" from Andreas about it) in Morph>>#layoutProportionallyIn:. ----------- Name: Morphic-mt.900 Author: mt Time: 19 April 2015, 11:27:22.653 am UUID: 950b4378-f3fe-db4c-b054-88b646a1feb0 Ancestors: Morphic-mt.899 Fix to avoid unnecessary layout computation for proportional layout. Note: Please report any visual glitches. Not 100% sure about the extent of this change... ------------- I think I found a place in my app where I can send a make-up #fullBounds to my Morph with a proportional layout. The challenging aspect of it is, I couldn't just send it upon creation, the morph must be installed in the world before it can do it. It makes sense that Layouts have to respond dynamically to surrounding Morphs to do their job, but the complexity can get overwhelming I've even had to put a guard in one place to avoid endless layout feedback.. On Mon, Aug 24, 2015 at 5:00 PM, Chris Muller wrote: > My Maui applications are suffering greatly by a change to Morphic > during the 4.6/5.0 cycle which is causing morphs to be layered in the > opposite order than they were in 4.5. The result is, I have morphs of > a Proportional layout covering other Morphs which I need to interact > with. > > The order within the 'submorphs' collection is the same, however, the > layering appears to be the opposite. Any ideas? > From tim at rowledge.org Tue Aug 25 01:27:23 2015 From: tim at rowledge.org (tim Rowledge) Date: Tue Aug 25 01:27:27 2015 Subject: [squeak-dev] Squeak 5 all-in-one OS X image saving/sources Message-ID: On my iMac, with the Squeak 5 all-in-one I get a rather annoying issue if I want to a) save an image other than buried deep in the package bowels; it would be nice if we could provide an option for saving an image outside the current home directory. b) after saving an image, extracting it + changes to where I wanted it to live, the system reported finding no sources file because it was expecting to find it at ?directory containing all-in-one package? and it was buried deep in the package bowels. That seems to me to be a rather infelicitous combination, especially for a new user; "hell I just saved this image thing and now I can?t find it anywhere!? I imagine we need to add another sources-path option to handle this but maybe there is some mac bundle magic involved too? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Dreams are free, but you get soaked on the connect time. From digit at sonic.net Tue Aug 25 01:36:36 2015 From: digit at sonic.net (Tm Jhnsn) Date: Tue Aug 25 01:36:47 2015 Subject: [squeak-dev] Squeak 5 all-in-one OS X image saving/sources In-Reply-To: References: Message-ID: Also notable perhaps is that if one chooses "save as new version" from the world menu, at next launch the all-in-one still loads the original image. Then one must try to extricate the "new version" from the all in one package, and run into the issues Tim mentions below. (Not that I just did this the other day. ;) ) Sent from a small device > On Aug 24, 2015, at 6:27 PM, tim Rowledge wrote: > > On my iMac, with the Squeak 5 all-in-one I get a rather annoying issue if I want to > a) save an image other than buried deep in the package bowels; it would be nice if we could provide an option for saving an image outside the current home directory. > b) after saving an image, extracting it + changes to where I wanted it to live, the system reported finding no sources file because it was expecting to find it at ?directory containing all-in-one package? and it was buried deep in the package bowels. > > That seems to me to be a rather infelicitous combination, especially for a new user; "hell I just saved this image thing and now I can?t find it anywhere!? I imagine we need to add another sources-path option to handle this but maybe there is some mac bundle magic involved too? > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Dreams are free, but you get soaked on the connect time. > > > > From garduino at gmail.com Tue Aug 25 02:06:33 2015 From: garduino at gmail.com (=?UTF-8?Q?Germ=C3=A1n_Arduino?=) Date: Tue Aug 25 02:06:36 2015 Subject: [squeak-dev] PDX -- a quick and dirty roundup In-Reply-To: References: Message-ID: Thanks you very much for the report Chris! El ago. 24, 2015 12:58 PM, "Chris Cunnington" escribi?: > News (from my perspective): > > > - Dolphin ST is still alive and available (link below) > > - Ken Dickey has a nifty morph control gui kit called Emergence on Cuis > that looks Maui-esque (link below) > > - Camp Smalltalk Vanisle is intended to go in October even though they > have not announced yet > > - No Cincom people were here. > > - Dale and Paul worked on Metacello. This: > > > (Installer repository: ' > http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main') > > install: 'ConfigurationOfSeaside3'. > > ((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) load: > #('Development' 'Welcome' 'RSS-Examples' 'Seaside-Email' 'Seaside-Examples' > 'Seaside-Tools-Web' 'WebClient') > > will fail in Squeak for the time being until Metacello adds some kind of > recognition parameters for Squeak 5.0. It will choke by asking for > OmniBrowser. > > - Paul is trying to connect to LMDB via BerkeleyDB plugin which he has > code for on his Github (links below) > > - There are pictures below of the Sat. evening dinner (link below) > > - Chris Thorgrimsson is about to release to the VW Store a package called > PCAPNG which slices and dices Wireshark data down to the header level and > lets you write your own filters. Alexander Bergel is expected to port it to > Pharo. I made noises saying I might do bring it to Squeak but likely need > to walk back from that position > > - I presented about Orange, a wiki I'm working on in Altitude inspired by > TinyWiki that uses Xtreams PEG parsing > > - Sean presented about Gamour and gt toolkit > > - Martin presented about Mist and Fog his Smalltalk implementation that > will never know C in any form > > - Seth of Instantiations presented about in-Workspace any-language code > highlighting > > - I finally understood why Richie down in Buenos Aires sounded like he was > speaking Mayan when I asked him about the kind of Smalltalk he was using > when I saw him present at ESUG in 2011. If I recall correctly, he was using > Visual Smalltalk Enterprise which is derived from Digitalk and was bought > by Cincom, which made the image unavailable to anybody, but sold the rights > to the VM to a company called Seagull, which sells the source code to > anybody for $50,000. This made sense only to people who already had the > image (i.e. Richie and LabWare) and looked like perversity to anybody else. > You see why I didn't (and probably still don't) understand. > > - There is a company in Delaware called LabWare. They like Smalltalk. They > have the above mentioned VM which a woman I met here (I think her name is > Diane) has been upgrading by adding UTF8 and such. Their VM developer team > was here at PDX (Boris, Andreas, Diane and Dave) and they are designing a > VM from scratch. They tell me they will open source it. This was followed > by the irritating news that they don't have any idea when they will even > start a blog on the topic. It's sounds fascinating, so here's hoping they > do. > > - James Foster presented a Gemstone to SQL database at ESUG that uses > PetitParser and showed it here at PDX > > - The CSS and JavaScript libraries of the week mentioned at PDX included > AngularJS, FlexBox, Google Materials, Angular Materials, Polymer, Ember and > React > > - Some young programers are working on a new Smalltalk from an 80s paper > by Wirfs-Brock called ModTalk (link below). It's modular and I don't think > it has #become: > > - I learned more about #become: from a patient Martin by showing him code > in VMMaker. The struggle is ongoing. > > > That's the broad strokes for me. I imagine other people had different > impressions. > > > Chris > > > https://github.com/dalehenrich > > https://github.com/pdebruic?tab=repositories > > https://github.com/KenDickey/Cuis-Smalltalk-BabySteps > > http://symas.com/mdb/ > > http://object-arts.com/ > > > https://photos.google.com/share/AF1QipOo-uf19ceGHiRRa6Qv_GyU4hDfPVVuwIFhKku93QTydzbnWCOUeDmeanKGrWtPJQ?key=dzFVLTJvN19iSTZrYWRXNE82Y3Z5Slk4bWVOWTdn > > http://www.modtalk.org > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150824/6090ae4e/attachment.htm From asqueaker at gmail.com Tue Aug 25 03:26:52 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Aug 25 03:26:54 2015 Subject: [squeak-dev] Squeak 5 all-in-one OS X image saving/sources In-Reply-To: References: Message-ID: I think of the All-in-One as analagous to the "Try Ubuntu" option on the Ubuntu boot CD. You can't really save anything, nor should it try to support that because its not a good way to use a computer. All-in-One is "Try Squeak", we should give them a "Install Squeak" so they can be properly set up and empowered. On Mon, Aug 24, 2015 at 8:27 PM, tim Rowledge wrote: > On my iMac, with the Squeak 5 all-in-one I get a rather annoying issue if I want to > a) save an image other than buried deep in the package bowels; it would be nice if we could provide an option for saving an image outside the current home directory. > b) after saving an image, extracting it + changes to where I wanted it to live, the system reported finding no sources file because it was expecting to find it at ?directory containing all-in-one package? and it was buried deep in the package bowels. > > That seems to me to be a rather infelicitous combination, especially for a new user; "hell I just saved this image thing and now I can?t find it anywhere!? I imagine we need to add another sources-path option to handle this but maybe there is some mac bundle magic involved too? > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Dreams are free, but you get soaked on the connect time. > > > From Marcel.Taeumel at hpi.de Tue Aug 25 07:14:20 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Aug 25 07:19:13 2015 Subject: [squeak-dev] Re: What happened to Morph layering? In-Reply-To: References: Message-ID: <1440486860447-4845449.post@n4.nabble.com> Hi Chris, does it affect event handling only or drawing, too? You problem description seems to have nothing to do with proportional layouts... Especially since the submorphs collection is in correct order. Layout policies set position and extent, nothing more. :) The layering effect comes due to correct drawing and event handling according to the submorphs collection order. Best, Marcel -- View this message in context: http://forum.world.st/What-happened-to-Morph-layering-tp4845404p4845449.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Tue Aug 25 08:34:00 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 08:34:02 2015 Subject: [squeak-dev] The Trunk: Graphics-mt.314.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.314.mcz ==================== Summary ==================== Name: Graphics-mt.314 Author: mt Time: 25 August 2015, 10:33:41.832 am UUID: 07278efc-1649-e345-aa5c-f90d220a5088 Ancestors: Graphics-mt.313 Fixes form scaling to always return a copy even if the extent does not change. Adds checks for zero-length edges to increase robustness. Updates argument name to make it clear that both numbers and points are accepted, which supports uniform and non-uniform scaling. =============== Diff against Graphics-mt.313 =============== Item was changed: ----- Method: Form>>scaledToSize: (in category 'scaling, rotation') ----- + scaledToSize: numberOrPoint - scaledToSize: newExtent + | scale newExtent | + newExtent := numberOrPoint asPoint. + + newExtent = self extent ifTrue: [^ self copy]. + + (self height isZero or: [self width isZero]) + ifTrue: [^ self species extent: newExtent depth: self depth]. + - | scale | - - newExtent = self extent ifTrue: [^self]. scale := newExtent x / self width min: newExtent y / self height. + ^ self magnify: self boundingBox by: scale smoothing: 2! - ^self magnify: self boundingBox by: scale smoothing: 2. - ! From craig at netjam.org Tue Aug 25 08:42:26 2015 From: craig at netjam.org (Craig Latta) Date: Tue Aug 25 08:42:38 2015 Subject: [squeak-dev] re: Squeak 5 all-in-one OS X image saving/sources In-Reply-To: References: Message-ID: Hi all-- Tim writes: > ...it would be nice if we could provide an option for saving an image > outside the current home directory. Indeed. As a new user I would expect the host platform's file-saving dialog to open at that point, especially since the host platform's file-opening dialog opens on system start, in situations where the system doesn't know which image to open. > ...after saving an image, extracting it + changes to where I wanted > it to live, the system reported finding no sources file because it > was expecting to find it at ?directory containing all-in-one package? > and it was buried deep in the package bowels. Hm, I don't see those words in the dialog that the system opens. Rather, it said it was expecting to find the sources file either in the same location as the image file, or as a sibling to the app folder. Now that the all-in-one structure has settled down, I would change the virtual machine to check instead for the sources file where it probably is (/Contents/Resources instead of ). I don't see much point in checking to see if it's in the same location as the image file. In any case, there's no host-dependent bundle magic involved; we just happen to have an all-in-one structure that satisfies the union of our host platform constraints. I think the all-in-one format can be useful generally, not just for initial tryouts as Chris suggests. -C p.s. Of course, in addition to getting the above right, I'll take this opportunity to advocate again for launching the system from a web browser. Make a host-dependent app which just starts a headless web server, and opens the user's preferred web browser on a site served by that server. On that site you can have good descriptions of available images, controls for starting and stopping them, what Squeak is in the first place, links to other sites for background, etc. This can be done as a host-dependent app that is one more layer around the all-in-one. I'm doing it for the Context distribution of Squeak. We'd get a lot of value from accommodating the new user's Favorite Web Browser and Favorite Text Editor. -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From commits at source.squeak.org Tue Aug 25 08:45:50 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 08:45:52 2015 Subject: [squeak-dev] The Trunk: Graphics-mt.315.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.315.mcz ==================== Summary ==================== Name: Graphics-mt.315 Author: mt Time: 25 August 2015, 10:45:30.972 am UUID: 60541125-855a-aa45-b942-241874613194 Ancestors: Graphics-mt.314 Let clients specify smoothing factor when scaling forms. =============== Diff against Graphics-mt.314 =============== Item was changed: ----- Method: Form>>scaledToSize: (in category 'scaling, rotation') ----- scaledToSize: numberOrPoint + ^ self scaledToSize: numberOrPoint smoothing: 2! - | scale newExtent | - newExtent := numberOrPoint asPoint. - - newExtent = self extent ifTrue: [^ self copy]. - - (self height isZero or: [self width isZero]) - ifTrue: [^ self species extent: newExtent depth: self depth]. - - scale := newExtent x / self width min: newExtent y / self height. - ^ self magnify: self boundingBox by: scale smoothing: 2! Item was added: + ----- Method: Form>>scaledToSize:smoothing: (in category 'scaling, rotation') ----- + scaledToSize: numberOrPoint smoothing: factor + + | scale newExtent | + newExtent := numberOrPoint asPoint. + + newExtent = self extent ifTrue: [^ self copy]. + + (self height isZero or: [self width isZero]) + ifTrue: [^ self species extent: newExtent depth: self depth]. + + scale := newExtent x / self width min: newExtent y / self height. + ^ self magnify: self boundingBox by: scale smoothing: factor! From commits at source.squeak.org Tue Aug 25 08:48:18 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 08:48:20 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.998.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.998.mcz ==================== Summary ==================== Name: Morphic-mt.998 Author: mt Time: 25 August 2015, 10:47:45.284 am UUID: 3f59a840-ebfc-984d-9764-b6b3f2702ffb Ancestors: Morphic-dtl.997 Let the extended form scaling use the basic scaling implementation. The purpose of this method is to always return a form of the given extent with a uniformly scaled form. =============== Diff against Morphic-dtl.997 =============== Item was changed: ----- Method: Form>>scaledIntoFormOfSize: (in category '*Morphic') ----- scaledIntoFormOfSize: aNumberOrPoint + + ^ self scaledIntoFormOfSize: aNumberOrPoint smoothing: 8! - "Scale and center the receiver into a form of a given size" - - | extent scale scaledForm result | - - extent := aNumberOrPoint asPoint. - extent = self extent ifTrue: [^ self]. - - (self height isZero or: [self width isZero]) - ifTrue: [^ Form extent: extent depth: self depth]. - - scale := extent y / self height min: extent x / self width. - scaledForm := self - magnify: self boundingBox - by: scale - smoothing: 8. - - result := Form extent: extent depth: 32. - result getCanvas - translucentImage: scaledForm - at: extent - scaledForm extent // 2. - - ^ result - ! Item was added: + ----- Method: Form>>scaledIntoFormOfSize:smoothing: (in category '*Morphic') ----- + scaledIntoFormOfSize: aNumberOrPoint smoothing: factor + "Scale and center the receiver into a form of a given size" + + | extent scaledForm result | + + extent := aNumberOrPoint asPoint. + extent = self extent ifTrue: [^ self copy]. + + scaledForm := self scaledToSize: extent smoothing: factor. + + result := self species extent: extent depth: 32. + result getCanvas + translucentImage: scaledForm + at: extent - scaledForm extent // 2. + + ^ result + ! From commits at source.squeak.org Tue Aug 25 08:56:55 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 08:56:58 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.149.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.149.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.149 Author: mt Time: 25 August 2015, 10:56:48.908 am UUID: a99ffbe0-4d17-0240-92ab-4265cf26bc36 Ancestors: ToolBuilder-Morphic-topa.148 Adds support for drag-type selectors in models for lists and trees instead of hardcoding #dragTransferPlus. Note that we might want to get rid of Object >> #dragTransferTypeForMorph: someday.... No one is implementing that anyway. Maybe also Object >> #dragPassengerFor:inMorph:. Using #dragItemSelector to let the model decide seems more appropriate. =============== Diff against ToolBuilder-Morphic-topa.148 =============== Item was changed: PluggableListMorph subclass: #PluggableListMorphPlus + instanceVariableNames: 'dragItemSelector dropItemSelector wantsDropSelector getHelpSelector dragTypeSelector' - instanceVariableNames: 'dragItemSelector dropItemSelector wantsDropSelector getHelpSelector' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Morphic'! !PluggableListMorphPlus commentStamp: 'ar 7/15/2005 11:10' prior: 0! Extensions for PluggableListMorph needed by ToolBuilder! Item was added: + ----- Method: PluggableListMorphPlus>>dragTypeSelector (in category 'accessing') ----- + dragTypeSelector + ^dragTypeSelector! Item was added: + ----- Method: PluggableListMorphPlus>>dragTypeSelector: (in category 'accessing') ----- + dragTypeSelector: aSymbol + dragTypeSelector := aSymbol.! Item was changed: ----- Method: PluggableListMorphPlus>>startDrag: (in category 'drag and drop') ----- startDrag: evt dragItemSelector ifNil:[^self]. evt hand hasSubmorphs ifTrue: [^ self]. [ | dragIndex draggedItem ddm | (self dragEnabled and: [model okToChange]) ifFalse: [^ self]. dragIndex := self rowAtLocation: evt position. dragIndex = 0 ifTrue:[^self]. draggedItem := model perform: dragItemSelector with: (self modelIndexFor: dragIndex). draggedItem ifNil:[^self]. ddm := TransferMorph withPassenger: draggedItem from: self. + ddm dragTransferType: (self dragTypeSelector + ifNil: [#dragTransferPlus] + ifNotNil: [:s | self model perform: s with: (self modelIndexFor: dragIndex)]). - ddm dragTransferType: #dragTransferPlus. evt hand grabMorph: ddm] ensure: [Cursor normal show. evt hand releaseMouseFocus: self]! Item was changed: SimpleHierarchicalListMorph subclass: #PluggableTreeMorph + instanceVariableNames: 'rootWrappers selectedWrapper getRootsSelector getChildrenSelector hasChildrenSelector getLabelSelector getIconSelector getSelectedPathSelector setSelectedParentSelector getHelpSelector dropItemSelector wantsDropSelector dragItemSelector dragTypeSelector nodeClass lastKeystrokeTime lastKeystrokes' - instanceVariableNames: 'rootWrappers selectedWrapper getRootsSelector getChildrenSelector hasChildrenSelector getLabelSelector getIconSelector getSelectedPathSelector setSelectedParentSelector getHelpSelector dropItemSelector wantsDropSelector dragItemSelector nodeClass lastKeystrokeTime lastKeystrokes' classVariableNames: 'FilterByLabelsOnly MaximumSearchDepth' poolDictionaries: '' category: 'ToolBuilder-Morphic'! !PluggableTreeMorph commentStamp: 'ar 2/12/2005 04:38' prior: 0! A pluggable tree morph.! Item was added: + ----- Method: PluggableTreeMorph>>dragTypeSelector (in category 'accessing') ----- + dragTypeSelector + ^dragTypeSelector! Item was added: + ----- Method: PluggableTreeMorph>>dragTypeSelector: (in category 'accessing') ----- + dragTypeSelector: aSymbol + dragTypeSelector := aSymbol.! Item was changed: ----- Method: PluggableTreeMorph>>startDrag: (in category 'morphic') ----- startDrag: evt | ddm itemMorph passenger | self dragEnabled ifTrue: [itemMorph := scroller submorphs detect: [:any | any highlightedForMouseDown] ifNone: []]. (itemMorph isNil or: [evt hand hasSubmorphs]) ifTrue: [^ self]. itemMorph highlightForMouseDown: false. itemMorph ~= self selectedMorph ifTrue: [self setSelectedMorph: itemMorph]. passenger := self model perform: dragItemSelector with: itemMorph withoutListWrapper. passenger ifNotNil: [ddm := TransferMorph withPassenger: passenger from: self. + ddm dragTransferType: (self dragTypeSelector + ifNil: [#dragTransferPlus] + ifNotNil: [:s | self model perform: s with: itemMorph withoutListWrapper]). - ddm dragTransferType: #dragTransferPlus. Preferences dragNDropWithAnimation ifTrue: [self model dragAnimationFor: itemMorph transferMorph: ddm]. evt hand grabMorph: ddm]. evt hand releaseMouseFocus: self! From bert at freudenbergs.de Tue Aug 25 09:03:15 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Aug 25 09:03:19 2015 Subject: [squeak-dev] Squeak 5 all-in-one OS X image saving/sources In-Reply-To: References: Message-ID: <6A46B613-DB1B-4F73-A244-6200D77AAAED@freudenbergs.de> On 25.08.2015, at 03:27, tim Rowledge wrote: > > On my iMac, with the Squeak 5 all-in-one I get a rather annoying issue if I want to > a) save an image other than buried deep in the package bowels; it would be nice if we could provide an option for saving an image outside the current home directory. > b) after saving an image, extracting it + changes to where I wanted it to live, the system reported finding no sources file because it was expecting to find it at ?directory containing all-in-one package? and it was buried deep in the package bowels. > > That seems to me to be a rather infelicitous combination, especially for a new user; "hell I just saved this image thing and now I can?t find it anywhere!? I imagine we need to add another sources-path option to handle this but maybe there is some mac bundle magic involved too? The way we handle that in Etoys is to treat the ?built-in? image as read-only. The working directory (FileDirectory default) is *not* the image directory, but (on a Mac at least) $HOME/Documents/Etoys. Saving the image will save to that directory. What we have not done on a Mac is that when you double-click the VM, it should load the last image saved. We did that on the OLPC XO though - its launcher shell script checks if there is an image in the documents directory (meaning the user saved it) and it launches that one. Otherwise it launches the bundled image. I?m pretty sure we can have our cake and eat it too ... - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150825/2048551f/smime.bin From craig at netjam.org Tue Aug 25 09:09:41 2015 From: craig at netjam.org (Craig Latta) Date: Tue Aug 25 09:09:59 2015 Subject: [squeak-dev] re: Squeak 5 all-in-one OS X image saving/sources In-Reply-To: <6A46B613-DB1B-4F73-A244-6200D77AAAED@freudenbergs.de> References: <6A46B613-DB1B-4F73-A244-6200D77AAAED@freudenbergs.de> Message-ID: Hi Bert-- > What we have not done on a Mac is that when you double-click the VM, > it should load the last image saved. I like that idea. > I?m pretty sure we can have our cake and eat it too ... Yes, although I'd like to make the all-in-one app as self-sufficient as possible (specifically, resistant to arbitrary changes in the filesystem outside the app folder). -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From commits at source.squeak.org Tue Aug 25 09:52:31 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 09:52:32 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.999.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.999.mcz ==================== Summary ==================== Name: Morphic-mt.999 Author: mt Time: 25 August 2015, 11:51:57.2 am UUID: 342432f2-3b6b-3a42-8c0e-3f58305354ad Ancestors: Morphic-mt.998 Fixes a bug with wrong Z order of morphs in system windows. There is no need to update pane order because retractable scroll bars got fixed. =============== Diff against Morphic-mt.998 =============== Item was changed: ----- Method: SystemWindow>>addMorph:fullFrame: (in category 'panes') ----- addMorph: aMorph fullFrame: aLayoutFrame "Add aMorph according to aLayoutFrame." super addMorph: aMorph fullFrame: aLayoutFrame. paneMorphs := paneMorphs copyReplaceFrom: 1 to: 0 with: (Array with: aMorph). + aMorph isImageMorph ifFalse: [aMorph adoptPaneColor: self paneColor].! - aMorph isImageMorph ifFalse: [aMorph adoptPaneColor: self paneColor]. - Preferences scrollBarsOnRight ifTrue:"reorder panes so flop-out right-side scrollbar is visible" - [self addMorphBack: aMorph].! From Marcel.Taeumel at hpi.de Tue Aug 25 09:48:20 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Aug 25 09:53:13 2015 Subject: [squeak-dev] Re: What happened to Morph layering? In-Reply-To: <1440486860447-4845449.post@n4.nabble.com> References: <1440486860447-4845449.post@n4.nabble.com> Message-ID: <1440496100020-4845515.post@n4.nabble.com> Hi Chris, does this fix your problem? http://forum.world.st/The-Trunk-Morphic-mt-999-mcz-td4845514.html Best, Marcel -- View this message in context: http://forum.world.st/What-happened-to-Morph-layering-tp4845404p4845515.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Tue Aug 25 12:54:34 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 12:54:36 2015 Subject: [squeak-dev] The Trunk: Kernel-mt.945.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-mt.945.mcz ==================== Summary ==================== Name: Kernel-mt.945 Author: mt Time: 25 August 2015, 2:54:06.221 pm UUID: 4f53691a-f79e-4e40-b46d-33a647b642dd Ancestors: Kernel-eem.944 Adds support for process stepping to watch out for other unhandled things. Adds a class for unhandled warnings. =============== Diff against Kernel-eem.944 =============== Item was changed: ----- Method: Process>>stepToHome: (in category 'changing suspended state') ----- stepToHome: aContext "Resume self until the home of top context is aContext. Top context may be a block context. Catch any UnhandledErrors that are created while stepping, answering the relevant signalerContext if so. Note that this will cause weird effects if using through to step through UnhandledError code, but as the doctor ordered, don't do that; use over or into instead." ^Processor activeProcess evaluate: [| home anError | home := aContext home. [suspendedContext := suspendedContext step. home == suspendedContext home or: [home isDead]] whileFalse: [(suspendedContext selector == #signalForException: + and: [(suspendedContext receiver isBehavior and: [ + suspendedContext receiver includesBehavior: UnhandledError]) - and: [suspendedContext receiver == UnhandledError and: [anError := suspendedContext tempAt: 1. ((suspendedContext objectClass: anError) includesBehavior: Exception) and: [anError canSearchForSignalerContext]]]) ifTrue: [anError signalerContext ifNotNil: [:unhandledErrorSignalerContext| [unhandledErrorSignalerContext == suspendedContext] whileFalse: [self completeStep: suspendedContext]. "Give a debugger a chance to update its title to reflect the new exception" Notification new tag: {unhandledErrorSignalerContext. anError}; signal. ^unhandledErrorSignalerContext]]]. suspendedContext] onBehalfOf: self! Item was changed: Exception subclass: #UnhandledError instanceVariableNames: 'exception' classVariableNames: '' poolDictionaries: '' category: 'Kernel-Exceptions'! + + !UnhandledError commentStamp: 'mt 8/25/2015 14:42' prior: 0! + This is a wrapper for an unhandled error. Having this, process stepping is able to correctly fire other unhandled errors. See Process >> #stepToHome: for further explanations.! Item was changed: ----- Method: UnhandledError class>>signalForException: (in category 'as yet unclassified') ----- signalForException: anError + "Very important entry point for analysis stack when stepping in a debugging session. See Process >> #stepToHome: for further explanations." + - ^ self new exception: anError; signal! Item was changed: + ----- Method: UnhandledError>>exception (in category 'accessing') ----- - ----- Method: UnhandledError>>exception (in category 'as yet unclassified') ----- exception ^ exception! Item was changed: + ----- Method: UnhandledError>>exception: (in category 'accessing') ----- - ----- Method: UnhandledError>>exception: (in category 'as yet unclassified') ----- exception: anError exception := anError! Item was added: + UnhandledError subclass: #UnhandledWarning + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Kernel-Exceptions'! From commits at source.squeak.org Tue Aug 25 12:55:28 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 12:55:30 2015 Subject: [squeak-dev] The Trunk: System-mt.759.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.759.mcz ==================== Summary ==================== Name: System-mt.759 Author: mt Time: 25 August 2015, 2:55:00.96 pm UUID: 4ebb649f-f70f-c042-9719-f1bd01f6245e Ancestors: System-eem.758 Adds support for unhandled warnings. =============== Diff against System-eem.758 =============== Item was changed: ----- Method: UnhandledError>>defaultAction (in category '*System-priv handling') ----- defaultAction "The current computation is terminated. The cause of the error should be logged or reported to the user. If the program is operating in an interactive debugging environment the computation should be suspended and the debugger activated." + ^ToolSet debugError: self exception! - ^ToolSet debugError: exception.! Item was added: + ----- Method: UnhandledWarning>>defaultAction (in category '*System-priv handling') ----- + defaultAction + + ^ ToolSet + debugContext: self exception signalerContext + label: 'Warning' + contents: self exception messageText , '\\Select Proceed to continue, or close this window to cancel the operation.' withCRs! Item was changed: ----- Method: Warning>>defaultAction (in category '*System-exceptionDescription') ----- defaultAction "Inform the user of a Warning, giving them the choice of ignoring the warning (proceeding), debugging, or terminating the computation." + UnhandledWarning signalForException: self! - UnhandledError signalForException: self! From commits at source.squeak.org Tue Aug 25 12:57:41 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 12:57:44 2015 Subject: [squeak-dev] The Trunk: Tools-mt.632.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.632.mcz ==================== Summary ==================== Name: Tools-mt.632 Author: mt Time: 25 August 2015, 2:57:23.277 pm UUID: 32a964b7-b4b9-8347-b230-278e62d7db33 Ancestors: Tools-eem.631 Removes the hack for the debugger's notifier window because it is not necessary anymore. Warnings work fine now. =============== Diff against Tools-eem.631 =============== Item was changed: ----- Method: Debugger>>openNotifierContents:label: (in category 'initialize') ----- openNotifierContents: msgString label: label "Create, schedule and answer a notifier view with the given label and message. A notifier view shows just the message or the first several lines of the stack, with a menu that allows the user to open a full debugger if so desired." "NOTE: When this method returns, a new process has been scheduled to run the windows, and thus this notifier, but the previous active process has not been suspended. The sender will do this." | msg builder spec | Sensor flushKeyboard. savedCursor := Cursor currentCursor. Cursor currentCursor: Cursor normal. msg := (label beginsWith: 'Space is low') ifTrue: [self lowSpaceChoices, (msgString ifNil: [String empty])] ifFalse: [msgString]. builder := ToolBuilder default. + spec := self buildNotifierWith: builder label: label message: msg. - spec := self buildNotifierWith: builder label: label message: (msg ifNil: [label]). self expandStack. ^[builder openDebugger: spec] ensure: [errorWasInUIProcess := Project current spawnNewProcessIfThisIsUI: interruptedProcess] ! From lewis at mail.msen.com Tue Aug 25 13:11:46 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Aug 25 13:11:47 2015 Subject: [squeak-dev] The Trunk: Tools-mt.632.mcz In-Reply-To: <201508251257.t7PCvltI020892@shell.msen.com> References: <201508251257.t7PCvltI020892@shell.msen.com> Message-ID: <20150825131146.GA23707@shell.msen.com> On Tue, Aug 25, 2015 at 12:57:27PM +0000, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-mt.632.mcz > > ==================== Summary ==================== > > Name: Tools-mt.632 > Author: mt > Time: 25 August 2015, 2:57:23.277 pm > UUID: 32a964b7-b4b9-8347-b230-278e62d7db33 > Ancestors: Tools-eem.631 > > Removes the hack for the debugger's notifier window because it is not necessary anymore. Warnings work fine now. > Yay! Very nice. Dave From commits at source.squeak.org Tue Aug 25 16:06:30 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 16:06:32 2015 Subject: [squeak-dev] The Trunk: Installer-Core-cmm.400.mcz Message-ID: Chris Muller uploaded a new version of Installer-Core to project The Trunk: http://source.squeak.org/trunk/Installer-Core-cmm.400.mcz ==================== Summary ==================== Name: Installer-Core-cmm.400 Author: cmm Time: 25 August 2015, 11:06:20.165 am UUID: 28706d1b-7c7a-46f9-be11-a9abdf855614 Ancestors: Installer-Core-cmm.399 Original squeaksource.com does not allow dash characters in project id's. =============== Diff against Installer-Core-cmm.399 =============== Item was changed: ----- Method: Installer>>maInstaller (in category 'package-definitions') ----- maInstaller "Select from a family of related packages for application development." + ^ { #ss -> 'MaInstaller'. - ^ { #ss -> 'Ma-Installer'. 'Ma-Installer-Core' }! From eliot.miranda at gmail.com Tue Aug 25 17:27:52 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Aug 25 17:27:58 2015 Subject: [squeak-dev] Daily Commit Log In-Reply-To: <20150822215502.23727.qmail@box4.squeakfoundation.org> References: <20150822215502.23727.qmail@box4.squeakfoundation.org> Message-ID: Hi Tobias, Sent from my iPhone > On Aug 22, 2015, at 2:55 PM, commits@source.squeak.org wrote: > > Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008871.html > > Name: Tests-ul.325 > Ancestors: Tests-topa.324 > > Increased maxLiterals in CompilerTest's #testMaxLiterals and #testMaxLiteralsWithClassReferenceInClosure to make them pass again. > In theory Spur supports literals up to 65535, but I think the compiler will have to be changed to be able to use that many. In the end I made the literal limit 32767, leaving bit 15 for a flag identifying methods generated by the dynamic optimizer, when we have one. Why do you think the compiler needs modifying to allow for more than 255 literals? I think it's a bytecode set issue, not a compiler issue. Both the Newspeak V4 and Sista V1 bytecode sets support 64k literals. > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008872.html > > Name: Tests-ul.326 > Ancestors: Tests-ul.325 > > PointTest's #testNormal and #testTheta seem to get decompiled correctly. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008873.html > > Name: Collections-ul.644 > Ancestors: Collections-ul.643 > > Extracted and enhanced Bitset from WideCharacterSet. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008874.html > > Name: CollectionsTests-ul.247 > Ancestors: CollectionsTests-ul.246 > > Added BitSetTest. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008875.html > > Name: Collections-ul.645 > Ancestors: Collections-ul.644 > > Use the extracted Bitset in WideCharacterSet: > - decreased chunk size from 65536 to 256. This should give a purpose to use a dictionary instread of an array for map, because its size will have a chance to be larger than 64. > - byteArrayMap is always initialized, so there's no need to use the method to reference it, nor to check if it's initialized > - moved #remove: behavior to #remove:ifAbsent:, just like it's done by most collections. Kept the existing behavior of #remove: to not signal an error when the character is not in the collection. > - use #atAllPut: to clear the byteArrayMap in #removeAll, because it should be faster than allocating a new instance > - improved #size's performance > - migrate instances on-the-fly > - migrate any unmigrated instaces during the postscript > - removed the unused methods > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008876.html > > Name: Collections-ul.646 > Ancestors: Collections-ul.645 > > - removed migration code from WideCharacterSet > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008877.html > > Name: Tools-eem.631 > Ancestors: Tools-ul.630 > > Remove the become[Un]Compact messages from MethodFinder as these are going away. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008878.html > > Name: System-eem.758 > Ancestors: System-ul.757 > > Reimplement the post-load enumeration of loaded objects to use the revised primitive available in the VMMaker.oscog-eem.1441 /3427 VMs that becomes the loaded segment into an Array of the loaded objects. Hence endMarker disappears and allObjectsDo: is trivially implemented as do: sent to the segment. > > This change requires users to upgrade their VMs but as the alternative is crashes in ImageSegment loads this is acceptable. AFAIA this fixes ImageSegments in Spur but they clearly need pounding on. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008879.html > > Name: SMBase-eem.134 > Ancestors: SMBase-bf.133 > > Reimplement the post-load enumeration of loaded objects to use the revised primitive available in the VMMaker.oscog-eem.1441 /3427 VMs that becomes the loaded segment into an Array of the loaded objects. Hence endMarker disappears and allObjectsDo: is trivially implemented as do: sent to the segment. > > This change requires users to upgrade their VMs but as the alternative is crashes in ImageSegment loads this is acceptable. AFAIA this fixes ImageSegments in Spur but they clearly need pounding on. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008880.html > > Name: KernelTests-eem.297 > Ancestors: KernelTests-ul.296 > > Remove the compact class index tests from LargeNegativeInteger as the compact class code is going away. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008881.html > > Name: Kernel-eem.944 > Ancestors: Kernel-ul.943 > > Nuke the compact class support in Kernel and the ClassBuilder. Spur has a regular 64-bit object header format with no special cases. > > Fix CompiledMethod>>at:ifAbsent: to work with the initialPC to endPC range and run the ifAbsent: block for indices outside this range. > > Categorize isCompiledMethodClass correctly. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008882.html > > Name: Collections-ul.647 > Ancestors: Collections-ul.646 > > - in Spur we can speed up Character >> #sameAs: by using #== > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008883.html > > Name: Regex-Core-ul.40 > Ancestors: Regex-Core-ul.39 > > RxsPredicate: > - added \t \n escapes for tab and lf > - unified all single character predicates as #beCharacter: > - postscript reinitializes the dictionary > > RxMatchOptimizer: > - removed lookarounds, because they were never used, just collected > - all collections get initialized lazily > - CharacterSet are used for storing characters > - IdentitySets are used where unique objects are stored (e.g. symbols) > - use #== and #~~ for character comparison (Spur-specific change) > > RxMatcher: > - reuse previous markerPositions > - use String >> #new:streamContents: where possible > - use #== and #~~ for character comparison (Spur-specific change) > - quick returns in #tryMatch > > General: > - renamed RxmLookahaed to RxmLookahead > - in RxmPredicate >> #matchAgainst: use the fact that aMatcher is providing a ReadStream of characters, so nil means end of stream > - reimplemented RxmSubstring > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008884.html > > Name: Regex-Tests-Core-ul.1 > Ancestors: > > - tests from Pharo > > ============================================= > From leves at elte.hu Tue Aug 25 17:40:56 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Aug 25 17:40:58 2015 Subject: [squeak-dev] Daily Commit Log In-Reply-To: References: <20150822215502.23727.qmail@box4.squeakfoundation.org> Message-ID: Hi Eliot, That was me who updated the method, because if was failing. CompilerTest >> #testMaxLiterals verifies a certain literal limit, and checks if adding one more literal will make the compilation fail. Levente On Tue, 25 Aug 2015, Eliot Miranda wrote: > Hi Tobias, > > Sent from my iPhone > >> On Aug 22, 2015, at 2:55 PM, commits@source.squeak.org wrote: >> >> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008871.html >> >> Name: Tests-ul.325 >> Ancestors: Tests-topa.324 >> >> Increased maxLiterals in CompilerTest's #testMaxLiterals and #testMaxLiteralsWithClassReferenceInClosure to make them pass again. >> In theory Spur supports literals up to 65535, but I think the compiler will have to be changed to be able to use that many. > > In the end I made the literal limit 32767, leaving bit 15 for a flag identifying methods generated by the dynamic optimizer, when we have one. > > Why do you think the compiler needs modifying to allow for more than 255 literals? I think it's a bytecode set issue, not a compiler issue. Both the Newspeak V4 and Sista V1 bytecode sets support 64k literals. > >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008872.html >> >> Name: Tests-ul.326 >> Ancestors: Tests-ul.325 >> >> PointTest's #testNormal and #testTheta seem to get decompiled correctly. >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008873.html >> >> Name: Collections-ul.644 >> Ancestors: Collections-ul.643 >> >> Extracted and enhanced Bitset from WideCharacterSet. >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008874.html >> >> Name: CollectionsTests-ul.247 >> Ancestors: CollectionsTests-ul.246 >> >> Added BitSetTest. >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008875.html >> >> Name: Collections-ul.645 >> Ancestors: Collections-ul.644 >> >> Use the extracted Bitset in WideCharacterSet: >> - decreased chunk size from 65536 to 256. This should give a purpose to use a dictionary instread of an array for map, because its size will have a chance to be larger than 64. >> - byteArrayMap is always initialized, so there's no need to use the method to reference it, nor to check if it's initialized >> - moved #remove: behavior to #remove:ifAbsent:, just like it's done by most collections. Kept the existing behavior of #remove: to not signal an error when the character is not in the collection. >> - use #atAllPut: to clear the byteArrayMap in #removeAll, because it should be faster than allocating a new instance >> - improved #size's performance >> - migrate instances on-the-fly >> - migrate any unmigrated instaces during the postscript >> - removed the unused methods >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008876.html >> >> Name: Collections-ul.646 >> Ancestors: Collections-ul.645 >> >> - removed migration code from WideCharacterSet >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008877.html >> >> Name: Tools-eem.631 >> Ancestors: Tools-ul.630 >> >> Remove the become[Un]Compact messages from MethodFinder as these are going away. >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008878.html >> >> Name: System-eem.758 >> Ancestors: System-ul.757 >> >> Reimplement the post-load enumeration of loaded objects to use the revised primitive available in the VMMaker.oscog-eem.1441 /3427 VMs that becomes the loaded segment into an Array of the loaded objects. Hence endMarker disappears and allObjectsDo: is trivially implemented as do: sent to the segment. >> >> This change requires users to upgrade their VMs but as the alternative is crashes in ImageSegment loads this is acceptable. AFAIA this fixes ImageSegments in Spur but they clearly need pounding on. >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008879.html >> >> Name: SMBase-eem.134 >> Ancestors: SMBase-bf.133 >> >> Reimplement the post-load enumeration of loaded objects to use the revised primitive available in the VMMaker.oscog-eem.1441 /3427 VMs that becomes the loaded segment into an Array of the loaded objects. Hence endMarker disappears and allObjectsDo: is trivially implemented as do: sent to the segment. >> >> This change requires users to upgrade their VMs but as the alternative is crashes in ImageSegment loads this is acceptable. AFAIA this fixes ImageSegments in Spur but they clearly need pounding on. >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008880.html >> >> Name: KernelTests-eem.297 >> Ancestors: KernelTests-ul.296 >> >> Remove the compact class index tests from LargeNegativeInteger as the compact class code is going away. >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008881.html >> >> Name: Kernel-eem.944 >> Ancestors: Kernel-ul.943 >> >> Nuke the compact class support in Kernel and the ClassBuilder. Spur has a regular 64-bit object header format with no special cases. >> >> Fix CompiledMethod>>at:ifAbsent: to work with the initialPC to endPC range and run the ifAbsent: block for indices outside this range. >> >> Categorize isCompiledMethodClass correctly. >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008882.html >> >> Name: Collections-ul.647 >> Ancestors: Collections-ul.646 >> >> - in Spur we can speed up Character >> #sameAs: by using #== >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008883.html >> >> Name: Regex-Core-ul.40 >> Ancestors: Regex-Core-ul.39 >> >> RxsPredicate: >> - added \t \n escapes for tab and lf >> - unified all single character predicates as #beCharacter: >> - postscript reinitializes the dictionary >> >> RxMatchOptimizer: >> - removed lookarounds, because they were never used, just collected >> - all collections get initialized lazily >> - CharacterSet are used for storing characters >> - IdentitySets are used where unique objects are stored (e.g. symbols) >> - use #== and #~~ for character comparison (Spur-specific change) >> >> RxMatcher: >> - reuse previous markerPositions >> - use String >> #new:streamContents: where possible >> - use #== and #~~ for character comparison (Spur-specific change) >> - quick returns in #tryMatch >> >> General: >> - renamed RxmLookahaed to RxmLookahead >> - in RxmPredicate >> #matchAgainst: use the fact that aMatcher is providing a ReadStream of characters, so nil means end of stream >> - reimplemented RxmSubstring >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008884.html >> >> Name: Regex-Tests-Core-ul.1 >> Ancestors: >> >> - tests from Pharo >> >> ============================================= >> > > From commits at source.squeak.org Tue Aug 25 17:46:08 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 17:46:09 2015 Subject: [squeak-dev] The Trunk: CollectionsTests-eem.248.mcz Message-ID: Eliot Miranda uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-eem.248.mcz ==================== Summary ==================== Name: CollectionsTests-eem.248 Author: eem Time: 25 August 2015, 10:45:57.272 am UUID: 9dec025e-011c-4cd7-919b-04219f750de1 Ancestors: CollectionsTests-ul.247 Remobe obsolete test for obsolete finalization mechanism =============== Diff against CollectionsTests-ul.247 =============== Item was removed: - ----- Method: WeakFinalizersTest>>expectedFailures (in category 'as yet unclassified') ----- - expectedFailures - - ^WeakFinalizationList hasNewFinalization - ifTrue: [ #() ] - ifFalse: [ #(testNewFinalizationSupported) ]! Item was removed: - ----- Method: WeakFinalizersTest>>testNewFinalizationSupported (in category 'as yet unclassified') ----- - testNewFinalizationSupported - | list item | - - list := WeakFinalizationList new. - - - item := WeakFinalizerItem new list: list object: Object new executor: nil. - - self assert: (list first isNil). - self assert: (item object notNil). - - Smalltalk garbageCollect. - - self assert: (item object isNil). - self assert: (list first == item). - self assert: (list first next == nil).! From commits at source.squeak.org Tue Aug 25 17:48:09 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 17:48:11 2015 Subject: [squeak-dev] The Trunk: System-eem.760.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.760.mcz ==================== Summary ==================== Name: System-eem.760 Author: eem Time: 25 August 2015, 10:47:43.942 am UUID: 82cc4d4b-562e-4fc6-b8d5-eddb3376678f Ancestors: System-mt.759 Remove all but the hasNewFinalization vestiges of the "new" (now obsolete) finalization mechanism. Removing the method requires restarting the finalization method, which we'll do in a preamble. =============== Diff against System-mt.759 =============== Item was changed: ----- Method: WeakArray class>>finalizationProcess (in category '*System-Finalization') ----- finalizationProcess - | initialized | - initialized := false. [FinalizationSemaphore wait. + FinalizationLock + critical: + [FinalizationDependents do: + [ :weakDependent | + weakDependent ifNotNil: + [weakDependent finalizeValues]]] - initialized ifFalse: ["check VM capability once at image startup time" - WeakFinalizationList initTestPair. - Smalltalk garbageCollect. - WeakFinalizationList checkTestPair. - initialized := true]. - FinalizationLock critical: - [FinalizationDependents do: - [ :weakDependent | - weakDependent ifNotNil: - [weakDependent finalizeValues]]] ifError: + [:msg :rcvr | rcvr error: msg]] repeat! - [:msg :rcvr | rcvr error: msg]] repeat! Item was changed: Object subclass: #WeakFinalizationList instanceVariableNames: 'first' + classVariableNames: '' - classVariableNames: 'HasNewFinalization TestItem TestList' poolDictionaries: '' category: 'System-Finalization'! !WeakFinalizationList commentStamp: 'Igor.Stasenko 9/22/2010 21:09' prior: 0! IMPORTANT!!!!!! This class is a special object, recognized by VM. Its only purpose is to a) identify a special kind of objects who usually having a weak references but also having an instance of me held by first non-weak fixed slot (instance variable). b) a 'first' instance variable points to the head of a list of items, reported by VM which has weak references which became garbage during last garbage collection At my class side, there are some public behavior, which is used by finalization process to detect if VM supports new finalization scheme or should use the old one. Weak registry using #hasNewFinalization for switching to correct finalization logic, depending on VM it currently runs on. ! Item was removed: - ----- Method: WeakFinalizationList class>>checkTestPair (in category 'vm capability test') ----- - checkTestPair - HasNewFinalization := TestList swapWithNil notNil.! Item was changed: ----- Method: WeakFinalizationList class>>hasNewFinalization (in category 'vm capability test') ----- hasNewFinalization + ^false! - ^ HasNewFinalization == true! Item was removed: - ----- Method: WeakFinalizationList class>>initTestPair (in category 'vm capability test') ----- - initTestPair - TestItem := WeakFinalizerItem new list: TestList object: Object new. - ! Item was removed: - ----- Method: WeakFinalizationList class>>initialize (in category 'class initialization') ----- - initialize - TestList := self new.! Item was changed: ----- Method: WeakRegistry>>finalizeValues (in category '*System-Finalization') ----- finalizeValues "Finalize any values, which happen to stocked in our list, due to some weak references become garbage" - - | finalizer | - WeakFinalizationList hasNewFinalization ifFalse: [ - self protected: [ - valueDictionary finalizeValues. - finalizer := executors. - executors := nil ]. - finalizer ifNotNil: [ - finalizer do: [ :each | each finalizeValues ] ]. - ^ self ]. + | finalizer | + self protected: + [valueDictionary finalizeValues. + finalizer := executors. + executors := nil ]. + finalizer ifNotNil: [finalizer do: [ :each | each finalizeValues]]! - finalizer := self protected: [ list swapWithNil ]. - - "We don't need to protect a following loop from concurrent access, - because at the moment we're finalizing values, - only we can access this list of finalizers, because valueDictionary already see them - as an unused slots, because they're associated with key == nil" - - [ finalizer notNil ] whileTrue: [ - | next | - next := finalizer next. - finalizer finalizeValues. - finalizer := next ]. - ! Item was changed: ----- Method: WeakRegistry>>installFinalizer (in category 'initialize-release') ----- installFinalizer + valueDictionary finalizer: + [:executor| + (executors ifNil: [executors := OrderedCollection new]) add: executor]! - valueDictionary finalizer: [ :executor | - WeakFinalizationList hasNewFinalization - ifTrue: [ executor finalizeValues ] - ifFalse: [ - (executors ifNil: [ executors := OrderedCollection new ]) add: executor ] ]! From bert at freudenbergs.de Tue Aug 25 19:19:50 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Aug 25 19:19:54 2015 Subject: [squeak-dev] The Trunk: SMLoader-ul.83.mcz In-Reply-To: References: <48A6619A-0CCF-4BCB-9AF1-EEC6E7341345@gmx.de> Message-ID: On 15.08.2015, at 11:16, Levente Uzonyi wrote: > > Hi Tobias, > > Thanks for pointing it out. I thought Bert made some changes which ensure that such dependencies don't require a separate update map. I tested the update process on my machine, and it worked for me. What I did is that if a method/class is moved between packages, it will do that independent of the order of the packages. What happened here I don?t quite understand, surely Collections would come before SMLoader in the update map? - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150825/026d5b78/smime.bin From eliot.miranda at gmail.com Tue Aug 25 19:33:12 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Aug 25 19:33:16 2015 Subject: [squeak-dev] Daily Commit Log In-Reply-To: References: <20150822215502.23727.qmail@box4.squeakfoundation.org> Message-ID: On Tue, Aug 25, 2015 at 10:40 AM, Levente Uzonyi wrote: > Hi Eliot, > > That was me who updated the method, because if was failing. CompilerTest > >> #testMaxLiterals verifies a certain literal limit, and checks if adding >>> >> one more literal will make the compilation fail. Ah, OK. I just wanted to point out that the limit is 32767, not 65535. > > > Levente > > > On Tue, 25 Aug 2015, Eliot Miranda wrote: > > Hi Tobias, >> >> Sent from my iPhone >> >> On Aug 22, 2015, at 2:55 PM, commits@source.squeak.org wrote: >>> >>> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 >>> hours: >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008871.html >>> >>> Name: Tests-ul.325 >>> Ancestors: Tests-topa.324 >>> >>> Increased maxLiterals in CompilerTest's #testMaxLiterals and >>> #testMaxLiteralsWithClassReferenceInClosure to make them pass again. >>> In theory Spur supports literals up to 65535, but I think the compiler >>> will have to be changed to be able to use that many. >>> >> >> In the end I made the literal limit 32767, leaving bit 15 for a flag >> identifying methods generated by the dynamic optimizer, when we have one. >> >> Why do you think the compiler needs modifying to allow for more than 255 >> literals? I think it's a bytecode set issue, not a compiler issue. Both >> the Newspeak V4 and Sista V1 bytecode sets support 64k literals. >> >> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008872.html >>> >>> Name: Tests-ul.326 >>> Ancestors: Tests-ul.325 >>> >>> PointTest's #testNormal and #testTheta seem to get decompiled correctly. >>> >>> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008873.html >>> >>> Name: Collections-ul.644 >>> Ancestors: Collections-ul.643 >>> >>> Extracted and enhanced Bitset from WideCharacterSet. >>> >>> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008874.html >>> >>> Name: CollectionsTests-ul.247 >>> Ancestors: CollectionsTests-ul.246 >>> >>> Added BitSetTest. >>> >>> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008875.html >>> >>> Name: Collections-ul.645 >>> Ancestors: Collections-ul.644 >>> >>> Use the extracted Bitset in WideCharacterSet: >>> - decreased chunk size from 65536 to 256. This should give a purpose to >>> use a dictionary instread of an array for map, because its size will have a >>> chance to be larger than 64. >>> - byteArrayMap is always initialized, so there's no need to use the >>> method to reference it, nor to check if it's initialized >>> - moved #remove: behavior to #remove:ifAbsent:, just like it's done by >>> most collections. Kept the existing behavior of #remove: to not signal an >>> error when the character is not in the collection. >>> - use #atAllPut: to clear the byteArrayMap in #removeAll, because it >>> should be faster than allocating a new instance >>> - improved #size's performance >>> - migrate instances on-the-fly >>> - migrate any unmigrated instaces during the postscript >>> - removed the unused methods >>> >>> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008876.html >>> >>> Name: Collections-ul.646 >>> Ancestors: Collections-ul.645 >>> >>> - removed migration code from WideCharacterSet >>> >>> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008877.html >>> >>> Name: Tools-eem.631 >>> Ancestors: Tools-ul.630 >>> >>> Remove the become[Un]Compact messages from MethodFinder as these are >>> going away. >>> >>> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008878.html >>> >>> Name: System-eem.758 >>> Ancestors: System-ul.757 >>> >>> Reimplement the post-load enumeration of loaded objects to use the >>> revised primitive available in the VMMaker.oscog-eem.1441 /3427 VMs that >>> becomes the loaded segment into an Array of the loaded objects. Hence >>> endMarker disappears and allObjectsDo: is trivially implemented as do: sent >>> to the segment. >>> >>> This change requires users to upgrade their VMs but as the alternative >>> is crashes in ImageSegment loads this is acceptable. AFAIA this fixes >>> ImageSegments in Spur but they clearly need pounding on. >>> >>> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008879.html >>> >>> Name: SMBase-eem.134 >>> Ancestors: SMBase-bf.133 >>> >>> Reimplement the post-load enumeration of loaded objects to use the >>> revised primitive available in the VMMaker.oscog-eem.1441 /3427 VMs that >>> becomes the loaded segment into an Array of the loaded objects. Hence >>> endMarker disappears and allObjectsDo: is trivially implemented as do: sent >>> to the segment. >>> >>> This change requires users to upgrade their VMs but as the alternative >>> is crashes in ImageSegment loads this is acceptable. AFAIA this fixes >>> ImageSegments in Spur but they clearly need pounding on. >>> >>> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008880.html >>> >>> Name: KernelTests-eem.297 >>> Ancestors: KernelTests-ul.296 >>> >>> Remove the compact class index tests from LargeNegativeInteger as the >>> compact class code is going away. >>> >>> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008881.html >>> >>> Name: Kernel-eem.944 >>> Ancestors: Kernel-ul.943 >>> >>> Nuke the compact class support in Kernel and the ClassBuilder. Spur has >>> a regular 64-bit object header format with no special cases. >>> >>> Fix CompiledMethod>>at:ifAbsent: to work with the initialPC to endPC >>> range and run the ifAbsent: block for indices outside this range. >>> >>> Categorize isCompiledMethodClass correctly. >>> >>> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008882.html >>> >>> Name: Collections-ul.647 >>> Ancestors: Collections-ul.646 >>> >>> - in Spur we can speed up Character >> #sameAs: by using #== >>> >>> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008883.html >>> >>> Name: Regex-Core-ul.40 >>> Ancestors: Regex-Core-ul.39 >>> >>> RxsPredicate: >>> - added \t \n escapes for tab and lf >>> - unified all single character predicates as #beCharacter: >>> - postscript reinitializes the dictionary >>> >>> RxMatchOptimizer: >>> - removed lookarounds, because they were never used, just collected >>> - all collections get initialized lazily >>> - CharacterSet are used for storing characters >>> - IdentitySets are used where unique objects are stored (e.g. symbols) >>> - use #== and #~~ for character comparison (Spur-specific change) >>> >>> RxMatcher: >>> - reuse previous markerPositions >>> - use String >> #new:streamContents: where possible >>> - use #== and #~~ for character comparison (Spur-specific change) >>> - quick returns in #tryMatch >>> >>> General: >>> - renamed RxmLookahaed to RxmLookahead >>> - in RxmPredicate >> #matchAgainst: use the fact that aMatcher is >>> providing a ReadStream of characters, so nil means end of stream >>> - reimplemented RxmSubstring >>> >>> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008884.html >>> >>> Name: Regex-Tests-Core-ul.1 >>> Ancestors: >>> >>> - tests from Pharo >>> >>> ============================================= >>> >>> >> >> > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150825/a2259e1f/attachment.htm From eliot.miranda at gmail.com Tue Aug 25 19:48:24 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Aug 25 19:48:27 2015 Subject: [squeak-dev] Menus in the PointerFinder are broken Message-ID: Hi Tobias, the new menu scheme (as of March this year?) isn't working for PointerFinder. Only StringHolder understands #menu:for:shifted: but it is sent from PointerFinder>>menu:shifted: and PointerFinder inherits from Model. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150825/ecac973b/attachment.htm From commits at source.squeak.org Tue Aug 25 20:48:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 20:48:05 2015 Subject: [squeak-dev] The Inbox: Compiler-ul.307.mcz Message-ID: Levente Uzonyi uploaded a new version of Compiler to project The Inbox: http://source.squeak.org/inbox/Compiler-ul.307.mcz ==================== Summary ==================== Name: Compiler-ul.307 Author: ul Time: 25 August 2015, 10:47:14.444 pm UUID: ace15cac-5bbf-48de-ac98-0254d5b8ff17 Ancestors: Compiler-ul.306 Set literal limit to 32767. =============== Diff against Compiler-ul.306 =============== Item was changed: ----- Method: Encoder>>allLiterals (in category 'results') ----- allLiterals addedSelectorAndMethodClassLiterals ifFalse: [addedSelectorAndMethodClassLiterals := true. "Put the optimized selectors in literals so as to browse senders more easily" optimizedSelectors := optimizedSelectors reject: [:e| literalStream originalContents hasLiteral: e]. optimizedSelectors isEmpty ifFalse: [ "Use one entry per literal if enough room, else make anArray" + literalStream position + optimizedSelectors size + 2 > 32767 - literalStream position + optimizedSelectors size + 2 > 255 ifTrue: [self litIndex: optimizedSelectors asArray] ifFalse: [optimizedSelectors do: [:e | self litIndex: e]]]. "Add a slot for selector or MethodProperties" self litIndex: nil. self litIndex: self associationForClass]. ^literalStream contents! Item was changed: ----- Method: Encoder>>litIndex: (in category 'encoding') ----- litIndex: literal | p | p := literalStream position. + p = 32767 ifTrue: + [self notify: 'More than 32767 literals referenced. - p = 256 ifTrue: - [self notify: 'More than 256 literals referenced. You must split or otherwise simplify this method. + The 32768th literal is: ', literal printString. ^nil]. - The 257th literal is: ', literal printString. ^nil]. "Would like to show where it is in the source code, but that info is hard to get." literalStream nextPut: literal. ^ p! From commits at source.squeak.org Tue Aug 25 20:48:29 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 20:48:30 2015 Subject: [squeak-dev] The Inbox: Kernel-ul.946.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Inbox: http://source.squeak.org/inbox/Kernel-ul.946.mcz ==================== Summary ==================== Name: Kernel-ul.946 Author: ul Time: 25 August 2015, 10:47:28.554 pm UUID: eb783de8-bef8-4cb9-9805-b7ed930df782 Ancestors: Kernel-mt.945 Set literal limit to 32767. =============== Diff against Kernel-mt.945 =============== Item was changed: ----- Method: CompiledMethod class>>newBytes:trailerBytes:nArgs:nTemps:nStack:nLits:primitive: (in category 'instance creation') ----- newBytes: numberOfBytes trailerBytes: trailer nArgs: nArgs nTemps: nTemps nStack: stackSize nLits: nLits primitive: primitiveIndex "Answer an instance of me. The header is specified by the message arguments. The remaining parts are not as yet determined." | method pc | nArgs > 15 ifTrue: [^self error: 'Cannot compile -- too many arguments']. nTemps > 63 ifTrue: [^self error: 'Cannot compile -- too many temporary variables']. + nLits > 32767 ifTrue: - nLits > 65535 ifTrue: [^self error: 'Cannot compile -- too many literals']. method := trailer createMethod: numberOfBytes class: self header: (nArgs bitShift: 24) + (nTemps bitShift: 18) + ((nTemps + stackSize) > SmallFrame ifTrue: [1 bitShift: 17] ifFalse: [0]) + nLits + (primitiveIndex > 0 ifTrue: [1 bitShift: 16] ifFalse: [0]). primitiveIndex > 0 ifTrue: [pc := method initialPC. method at: pc + 0 put: method encoderClass callPrimitiveCode; at: pc + 1 put: (primitiveIndex bitAnd: 16rFF); at: pc + 2 put: (primitiveIndex bitShift: -8)]. ^method! Item was changed: ----- Method: CompiledMethod class>>newBytes:trailerBytes:nArgs:nTemps:nStack:nLits:primitive:flag: (in category 'instance creation') ----- newBytes: numberOfBytes trailerBytes: trailer nArgs: nArgs nTemps: nTemps nStack: stackSize nLits: nLits primitive: primitiveIndex flag: flag "Answer an instance of me. The header is specified by the message arguments. The remaining parts are not as yet determined." | method pc | nArgs > 15 ifTrue: [^self error: 'Cannot compile -- too many arguments']. nTemps > 63 ifTrue: [^self error: 'Cannot compile -- too many temporary variables']. + nLits > 32767 ifTrue: - nLits > 65535 ifTrue: [^self error: 'Cannot compile -- too many literals']. method := trailer createMethod: numberOfBytes class: self header: (nArgs bitShift: 24) + (nTemps bitShift: 18) + ((nTemps + stackSize) > SmallFrame ifTrue: [1 bitShift: 17] ifFalse: [0]) + nLits + (primitiveIndex > 0 ifTrue: [1 bitShift: 16] ifFalse: [0]) + (flag ifTrue: [1 bitShift: 29] ifFalse: [0]). primitiveIndex > 0 ifTrue: [pc := method initialPC. method at: pc + 0 put: method encoderClass callPrimitiveCode; at: pc + 1 put: (primitiveIndex bitAnd: 16rFF); at: pc + 2 put: (primitiveIndex bitShift: -8)]. ^method! From leves at elte.hu Tue Aug 25 20:50:17 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Aug 25 20:50:22 2015 Subject: MaxLiterals (was: Re: [squeak-dev] Daily Commit Log) In-Reply-To: References: <20150822215502.23727.qmail@box4.squeakfoundation.org> Message-ID: I guess then we should change a few 255s and 65535s to 32767. I've uploaded Compiler-ul.307, and Kernel-ul.946 to the Inbox with some changes. There may be more methods with the obsolete limit in the image, and my changes may not be correct. Please review them! Levente On Tue, 25 Aug 2015, Eliot Miranda wrote: > > > On Tue, Aug 25, 2015 at 10:40 AM, Levente Uzonyi wrote: > Hi Eliot, > > That was me who updated the method, because if was failing. CompilerTest > #testMaxLiterals verifies a certain literal limit, and checks if adding > > one more literal will make the compilation fail. > > > Ah, OK.? I just wanted to point out that the limit is 32767, not 65535. > ? > > > Levente > > On Tue, 25 Aug 2015, Eliot Miranda wrote: > > Hi Tobias, > > Sent from my iPhone > > On Aug 22, 2015, at 2:55 PM, commits@source.squeak.org wrote: > > Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008871.html > > Name: Tests-ul.325 > Ancestors: Tests-topa.324 > > Increased maxLiterals in CompilerTest's #testMaxLiterals and #testMaxLiteralsWithClassReferenceInClosure to make them pass again. > In theory Spur supports literals up to 65535, but I think the compiler will have to be changed to be able to use that many. > > > In the end I made the literal limit 32767, leaving bit 15 for a flag identifying methods generated by the dynamic optimizer, when we have one. > > Why do you think the compiler needs modifying to allow for more than 255 literals?? I think it's a bytecode set issue, not a compiler issue.? Both the Newspeak V4 and Sista V1 bytecode > sets support 64k literals. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008872.html > > Name: Tests-ul.326 > Ancestors: Tests-ul.325 > > PointTest's #testNormal and #testTheta seem to get decompiled correctly. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008873.html > > Name: Collections-ul.644 > Ancestors: Collections-ul.643 > > Extracted and enhanced Bitset from WideCharacterSet. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008874.html > > Name: CollectionsTests-ul.247 > Ancestors: CollectionsTests-ul.246 > > Added BitSetTest. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008875.html > > Name: Collections-ul.645 > Ancestors: Collections-ul.644 > > Use the extracted Bitset in WideCharacterSet: > - decreased chunk size from 65536 to 256. This should give a purpose to use a dictionary instread of an array for map, because its size will have a chance to be larger than > 64. > - byteArrayMap is always initialized, so there's no need to use the method to reference it, nor to check if it's initialized > - moved #remove: behavior to #remove:ifAbsent:, just like it's done by most collections. Kept the existing behavior of #remove: to not signal an error when the character is > not in the collection. > - use #atAllPut: to clear the byteArrayMap in #removeAll, because it should be faster than allocating a new instance > - improved #size's performance > - migrate instances on-the-fly > - migrate any unmigrated instaces during the postscript > - removed the unused methods > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008876.html > > Name: Collections-ul.646 > Ancestors: Collections-ul.645 > > - removed migration code from WideCharacterSet > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008877.html > > Name: Tools-eem.631 > Ancestors: Tools-ul.630 > > Remove the become[Un]Compact messages from MethodFinder as these are going away. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008878.html > > Name: System-eem.758 > Ancestors: System-ul.757 > > Reimplement the post-load enumeration of loaded objects to use the revised primitive available in the VMMaker.oscog-eem.1441 /3427 VMs that becomes the loaded segment into > an Array of the loaded objects.? Hence endMarker disappears and allObjectsDo: is trivially implemented as do: sent to the segment. > > This change requires users to upgrade their VMs but as the alternative is crashes in ImageSegment loads this is acceptable.? AFAIA this fixes ImageSegments in Spur but they > clearly need pounding on. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008879.html > > Name: SMBase-eem.134 > Ancestors: SMBase-bf.133 > > Reimplement the post-load enumeration of loaded objects to use the revised primitive available in the VMMaker.oscog-eem.1441 /3427 VMs that becomes the loaded segment into > an Array of the loaded objects.? Hence endMarker disappears and allObjectsDo: is trivially implemented as do: sent to the segment. > > This change requires users to upgrade their VMs but as the alternative is crashes in ImageSegment loads this is acceptable.? AFAIA this fixes ImageSegments in Spur but they > clearly need pounding on. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008880.html > > Name: KernelTests-eem.297 > Ancestors: KernelTests-ul.296 > > Remove the compact class index tests from LargeNegativeInteger as the compact class code is going away. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008881.html > > Name: Kernel-eem.944 > Ancestors: Kernel-ul.943 > > Nuke the compact class support in Kernel and the ClassBuilder.? Spur has a regular 64-bit object header format with no special cases. > > Fix CompiledMethod>>at:ifAbsent: to work with the initialPC to endPC range and run the ifAbsent: block for indices outside this range. > > Categorize isCompiledMethodClass correctly. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008882.html > > Name: Collections-ul.647 > Ancestors: Collections-ul.646 > > - in Spur we can speed up Character >> #sameAs: by using #== > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008883.html > > Name: Regex-Core-ul.40 > Ancestors: Regex-Core-ul.39 > > RxsPredicate: > - added \t \n escapes for tab and lf > - unified all single character predicates as #beCharacter: > - postscript reinitializes the dictionary > > RxMatchOptimizer: > - removed lookarounds, because they were never used, just collected > - all collections get initialized lazily > - CharacterSet are used for storing characters > - IdentitySets are used where unique objects are stored (e.g. symbols) > - use #== and #~~ for character comparison (Spur-specific change) > > RxMatcher: > - reuse previous markerPositions > - use String >> #new:streamContents: where possible > - use #== and #~~ for character comparison (Spur-specific change) > - quick returns in #tryMatch > > General: > - renamed RxmLookahaed to RxmLookahead > - in RxmPredicate >> #matchAgainst: use the fact that? aMatcher is providing a ReadStream of characters, so nil means end of stream > - reimplemented RxmSubstring > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2015-August/008884.html > > Name: Regex-Tests-Core-ul.1 > Ancestors: > > - tests from Pharo > > ============================================= > > > > > > > > -- > _,,,^..^,,,_ > best,?Eliot > > From asqueaker at gmail.com Tue Aug 25 21:01:34 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Aug 25 21:01:37 2015 Subject: [squeak-dev] Re: What happened to Morph layering? In-Reply-To: <1440496100020-4845515.post@n4.nabble.com> References: <1440486860447-4845449.post@n4.nabble.com> <1440496100020-4845515.post@n4.nabble.com> Message-ID: Thanks Marcel, unfortunately, no, the problem I'm having has nothing to do with SystemWindows, just plain Morphs. I found a way you can see the problem yourself. If you would be willing to install the head release of Maui into a 5.0 trunk image, and then in a workspace: | morph | morph := FileDirectory default entries maui. World doOneCycleNow. morph regenerateHeading. World doOneCycleNow. "<--- Argh, need this 2nd one now for it to fully update! Why?" If you try the above once each for the two different versions of Morph>>#layoutProportionallyIn:, with (mt 4/19/2015 11:06), each subsequent column header is above the one to its left, as it should be. However, with (mt 4/24/2015 10:11), the z-order is reversed, causing my column sort buttons to be covered up, inaccessible for application users. Best, Chris On Tue, Aug 25, 2015 at 4:48 AM, marcel.taeumel wrote: > Hi Chris, > > does this fix your problem? > http://forum.world.st/The-Trunk-Morphic-mt-999-mcz-td4845514.html > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/What-happened-to-Morph-layering-tp4845404p4845515.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From commits at source.squeak.org Tue Aug 25 21:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 21:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150825215503.16328.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-August/008894.html Name: Graphics-mt.314 Ancestors: Graphics-mt.313 Fixes form scaling to always return a copy even if the extent does not change. Adds checks for zero-length edges to increase robustness. Updates argument name to make it clear that both numbers and points are accepted, which supports uniform and non-uniform scaling. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008895.html Name: Graphics-mt.315 Ancestors: Graphics-mt.314 Let clients specify smoothing factor when scaling forms. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008896.html Name: Morphic-mt.998 Ancestors: Morphic-dtl.997 Let the extended form scaling use the basic scaling implementation. The purpose of this method is to always return a form of the given extent with a uniformly scaled form. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008897.html Name: ToolBuilder-Morphic-mt.149 Ancestors: ToolBuilder-Morphic-topa.148 Adds support for drag-type selectors in models for lists and trees instead of hardcoding #dragTransferPlus. Note that we might want to get rid of Object >> #dragTransferTypeForMorph: someday.... No one is implementing that anyway. Maybe also Object >> #dragPassengerFor:inMorph:. Using #dragItemSelector to let the model decide seems more appropriate. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008898.html Name: Morphic-mt.999 Ancestors: Morphic-mt.998 Fixes a bug with wrong Z order of morphs in system windows. There is no need to update pane order because retractable scroll bars got fixed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008899.html Name: Kernel-mt.945 Ancestors: Kernel-eem.944 Adds support for process stepping to watch out for other unhandled things. Adds a class for unhandled warnings. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008900.html Name: System-mt.759 Ancestors: System-eem.758 Adds support for unhandled warnings. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008901.html Name: Tools-mt.632 Ancestors: Tools-eem.631 Removes the hack for the debugger's notifier window because it is not necessary anymore. Warnings work fine now. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008902.html Name: Installer-Core-cmm.400 Ancestors: Installer-Core-cmm.399 Original squeaksource.com does not allow dash characters in project id's. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008903.html Name: CollectionsTests-eem.248 Ancestors: CollectionsTests-ul.247 Remobe obsolete test for obsolete finalization mechanism ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008904.html Name: System-eem.760 Ancestors: System-mt.759 Remove all but the hasNewFinalization vestiges of the "new" (now obsolete) finalization mechanism. Removing the method requires restarting the finalization method, which we'll do in a preamble. ============================================= From commits at source.squeak.org Tue Aug 25 22:20:47 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 22:20:48 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.946.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.946.mcz ==================== Summary ==================== Name: Kernel-ul.946 Author: ul Time: 25 August 2015, 10:47:28.554 pm UUID: eb783de8-bef8-4cb9-9805-b7ed930df782 Ancestors: Kernel-mt.945 Set literal limit to 32767. =============== Diff against Kernel-mt.945 =============== Item was changed: ----- Method: CompiledMethod class>>newBytes:trailerBytes:nArgs:nTemps:nStack:nLits:primitive: (in category 'instance creation') ----- newBytes: numberOfBytes trailerBytes: trailer nArgs: nArgs nTemps: nTemps nStack: stackSize nLits: nLits primitive: primitiveIndex "Answer an instance of me. The header is specified by the message arguments. The remaining parts are not as yet determined." | method pc | nArgs > 15 ifTrue: [^self error: 'Cannot compile -- too many arguments']. nTemps > 63 ifTrue: [^self error: 'Cannot compile -- too many temporary variables']. + nLits > 32767 ifTrue: - nLits > 65535 ifTrue: [^self error: 'Cannot compile -- too many literals']. method := trailer createMethod: numberOfBytes class: self header: (nArgs bitShift: 24) + (nTemps bitShift: 18) + ((nTemps + stackSize) > SmallFrame ifTrue: [1 bitShift: 17] ifFalse: [0]) + nLits + (primitiveIndex > 0 ifTrue: [1 bitShift: 16] ifFalse: [0]). primitiveIndex > 0 ifTrue: [pc := method initialPC. method at: pc + 0 put: method encoderClass callPrimitiveCode; at: pc + 1 put: (primitiveIndex bitAnd: 16rFF); at: pc + 2 put: (primitiveIndex bitShift: -8)]. ^method! Item was changed: ----- Method: CompiledMethod class>>newBytes:trailerBytes:nArgs:nTemps:nStack:nLits:primitive:flag: (in category 'instance creation') ----- newBytes: numberOfBytes trailerBytes: trailer nArgs: nArgs nTemps: nTemps nStack: stackSize nLits: nLits primitive: primitiveIndex flag: flag "Answer an instance of me. The header is specified by the message arguments. The remaining parts are not as yet determined." | method pc | nArgs > 15 ifTrue: [^self error: 'Cannot compile -- too many arguments']. nTemps > 63 ifTrue: [^self error: 'Cannot compile -- too many temporary variables']. + nLits > 32767 ifTrue: - nLits > 65535 ifTrue: [^self error: 'Cannot compile -- too many literals']. method := trailer createMethod: numberOfBytes class: self header: (nArgs bitShift: 24) + (nTemps bitShift: 18) + ((nTemps + stackSize) > SmallFrame ifTrue: [1 bitShift: 17] ifFalse: [0]) + nLits + (primitiveIndex > 0 ifTrue: [1 bitShift: 16] ifFalse: [0]) + (flag ifTrue: [1 bitShift: 29] ifFalse: [0]). primitiveIndex > 0 ifTrue: [pc := method initialPC. method at: pc + 0 put: method encoderClass callPrimitiveCode; at: pc + 1 put: (primitiveIndex bitAnd: 16rFF); at: pc + 2 put: (primitiveIndex bitShift: -8)]. ^method! From commits at source.squeak.org Tue Aug 25 23:06:16 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 23:06:19 2015 Subject: [squeak-dev] The Trunk: Kernel-eem.947.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.947.mcz ==================== Summary ==================== Name: Kernel-eem.947 Author: eem Time: 25 August 2015, 4:04:50.097 pm UUID: 1fd40c5c-0559-47a0-9a1d-1f634d652a28 Ancestors: Kernel-ul.946 Provide an accessor for Compiledmethod's max num literals. Recategorize the frame size accessors under accessing to join it. =============== Diff against Kernel-ul.946 =============== Item was changed: + ----- Method: CompiledMethod class>>fullFrameSize (in category 'constants') ----- - ----- Method: CompiledMethod class>>fullFrameSize (in category 'class initialization') ----- fullFrameSize "CompiledMethod fullFrameSize" ^ LargeFrame! Item was added: + ----- Method: CompiledMethod class>>maxNumLiterals (in category 'constants') ----- + maxNumLiterals + "The current header format and the VM's interpretation of it allows for a maximum of 32767 literals." + ^32767! Item was changed: + ----- Method: CompiledMethod class>>smallFrameSize (in category 'constants') ----- - ----- Method: CompiledMethod class>>smallFrameSize (in category 'class initialization') ----- smallFrameSize ^ SmallFrame! From commits at source.squeak.org Tue Aug 25 23:11:20 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 23:11:22 2015 Subject: [squeak-dev] The Trunk: Compiler-eem.307.mcz Message-ID: Eliot Miranda uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-eem.307.mcz ==================== Summary ==================== Name: Compiler-eem.307 Author: eem Time: 25 August 2015, 4:08:43.685 pm UUID: 01d3dbd8-8e6e-49b4-9a85-abdfdb847729 Ancestors: Compiler-ul.306 Make the literal limit in the compiler a funciton of both the bytecode set and CompiledMethod's implementation limit. =============== Diff against Compiler-ul.306 =============== Item was changed: ----- Method: Encoder>>allLiterals (in category 'results') ----- allLiterals addedSelectorAndMethodClassLiterals ifFalse: [addedSelectorAndMethodClassLiterals := true. "Put the optimized selectors in literals so as to browse senders more easily" optimizedSelectors := optimizedSelectors reject: [:e| literalStream originalContents hasLiteral: e]. optimizedSelectors isEmpty ifFalse: [ "Use one entry per literal if enough room, else make anArray" + literalStream position + optimizedSelectors size + 2 >= self maxNumLiterals - literalStream position + optimizedSelectors size + 2 > 255 ifTrue: [self litIndex: optimizedSelectors asArray] ifFalse: [optimizedSelectors do: [:e | self litIndex: e]]]. "Add a slot for selector or MethodProperties" self litIndex: nil. self litIndex: self associationForClass]. ^literalStream contents! Item was changed: ----- Method: Encoder>>litIndex: (in category 'encoding') ----- litIndex: literal | p | p := literalStream position. + p = self maxNumLiterals ifTrue: + [self notify: 'More than ', self maxNumLiterals printString, ' literals referenced.\You must split or otherwise simplify this method.\The ' withCRs, (self maxNumLiterals + 1) printString, 'th literal is: ', literal printString. ^nil]. + "Would like to show where it is in the source code, + but that info is hard to get." - p = 256 ifTrue: - [self notify: 'More than 256 literals referenced. - You must split or otherwise simplify this method. - The 257th literal is: ', literal printString. ^nil]. - "Would like to show where it is in the source code, - but that info is hard to get." literalStream nextPut: literal. + ^p! - ^ p! Item was added: + ----- Method: Encoder>>maxIndexableLiterals (in category 'accessing') ----- + maxIndexableLiterals + "Answer the maximum number of literals supported by the receiver's + bytecode set. This is a nominal value based on the Blue Book bytecode + set; subclasses answer a more accurate value." + ^63! Item was added: + ----- Method: Encoder>>maxNumLiterals (in category 'accessing') ----- + maxNumLiterals + ^CompiledMethod maxNumLiterals min: self maxIndexableLiterals! Item was added: + ----- Method: EncoderForV3>>maxIndexableLiterals (in category 'bytecode generation') ----- + maxIndexableLiterals + "This bytecode set can index up to 256 literals." + ^256! From commits at source.squeak.org Tue Aug 25 23:21:40 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 23:21:42 2015 Subject: [squeak-dev] The Trunk: Tests-eem.327.mcz Message-ID: Eliot Miranda uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-eem.327.mcz ==================== Summary ==================== Name: Tests-eem.327 Author: eem Time: 25 August 2015, 4:21:25.745 pm UUID: 40649464-54c2-4aab-b4a4-9df95952958d Ancestors: Tests-ul.326 Revise the maxLiterals test given the bytecode set specific facilities in Encoder and CompiledMethod. =============== Diff against Tests-ul.326 =============== Item was changed: ----- Method: CompilerTest>>testMaxLiterals (in category 'limits') ----- testMaxLiterals "Document the maximum number of literals in a compiled method" | maxLiterals stringThatCanBeCompiled stringWithOneTooManyLiterals | + "Why 6? It's rather implementation dependent. But the {... construct is compiled as + (Array braceStream: size) + nextPut: expr; + ...; + braceArray + where nextPut: is a special selector. So one each for Array binding, #braceStream, #braceArray and the size, + one for the selector and one for the methodClass makes 6." + maxLiterals := thisContext method encoderClass new maxNumLiterals - 6. - maxLiterals := 250. stringThatCanBeCompiled := '{ ', (String streamContents: [:strm | 1 to: maxLiterals do: [:e | strm nextPutAll: '''', e asString, '''', ' . ']]), '}'. stringWithOneTooManyLiterals := '{ ', (String streamContents: [:strm | 1 to: maxLiterals + 1 do: [:e | strm nextPutAll: '''', e asString, '''', ' . ']]), '}'. self assert: ((1 to: maxLiterals) collect: #printString) equals: (Compiler evaluate: stringThatCanBeCompiled). "If the following test fails, it means that the limit has been raised or eliminated, and this test should be updated to reflect the improvement." self should: [Compiler evaluate: stringWithOneTooManyLiterals] raise: Error. ! From btc at openinworld.com Tue Aug 25 23:34:25 2015 From: btc at openinworld.com (Ben Coman) Date: Tue Aug 25 23:34:49 2015 Subject: MaxLiterals (was: Re: [squeak-dev] Daily Commit Log) In-Reply-To: References: <20150822215502.23727.qmail@box4.squeakfoundation.org> Message-ID: Would it be benficial/possible to have a primtive returning a dictionary of limits compiled into the VM? I am thinking of a case where the VM might be compiled to run in an embedded environment (e.g. robotics). Then these limits would only need changing in one spot. How big would such a list be? cheers -ben On Wed, Aug 26, 2015 at 4:50 AM, Levente Uzonyi wrote: > I guess then we should change a few 255s and 65535s to 32767. I've uploaded > Compiler-ul.307, and Kernel-ul.946 to the Inbox with some changes. There may > be more methods with the obsolete limit in the image, and my changes may not > be correct. Please review them! > > Levente > > On Tue, 25 Aug 2015, Eliot Miranda wrote: > >> >> >> On Tue, Aug 25, 2015 at 10:40 AM, Levente Uzonyi wrote: >> Hi Eliot, >> >> That was me who updated the method, because if was failing. >> CompilerTest #testMaxLiterals verifies a certain literal limit, and >> checks if adding one more literal will make the compilation fail. >> >> >> Ah, OK. I just wanted to point out that the limit is 32767, not 65535. >> >> >> >> Levente >> >> On Tue, 25 Aug 2015, Eliot Miranda wrote: >> >> Hi Tobias, >> >> Sent from my iPhone >> >> On Aug 22, 2015, at 2:55 PM, commits@source.squeak.org >> wrote: >> >> Changes to Trunk (http://source.squeak.org/trunk.html) >> in the last 24 hours: >> >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008871.html >> >> Name: Tests-ul.325 >> Ancestors: Tests-topa.324 >> >> Increased maxLiterals in CompilerTest's #testMaxLiterals >> and #testMaxLiteralsWithClassReferenceInClosure to make them pass again. >> In theory Spur supports literals up to 65535, but I >> think the compiler will have to be changed to be able to use that many. >> >> >> In the end I made the literal limit 32767, leaving bit 15 for >> a flag identifying methods generated by the dynamic optimizer, when we have >> one. >> >> Why do you think the compiler needs modifying to allow for >> more than 255 literals? I think it's a bytecode set issue, not a compiler >> issue. Both the Newspeak V4 and Sista V1 bytecode >> sets support 64k literals. >> >> ============================================= >> >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008872.html >> >> Name: Tests-ul.326 >> Ancestors: Tests-ul.325 >> >> PointTest's #testNormal and #testTheta seem to get >> decompiled correctly. >> >> ============================================= >> >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008873.html >> >> Name: Collections-ul.644 >> Ancestors: Collections-ul.643 >> >> Extracted and enhanced Bitset from WideCharacterSet. >> >> ============================================= >> >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008874.html >> >> Name: CollectionsTests-ul.247 >> Ancestors: CollectionsTests-ul.246 >> >> Added BitSetTest. >> >> ============================================= >> >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008875.html >> >> Name: Collections-ul.645 >> Ancestors: Collections-ul.644 >> >> Use the extracted Bitset in WideCharacterSet: >> - decreased chunk size from 65536 to 256. This should >> give a purpose to use a dictionary instread of an array for map, because its >> size will have a chance to be larger than >> 64. >> - byteArrayMap is always initialized, so there's no need >> to use the method to reference it, nor to check if it's initialized >> - moved #remove: behavior to #remove:ifAbsent:, just >> like it's done by most collections. Kept the existing behavior of #remove: >> to not signal an error when the character is >> not in the collection. >> - use #atAllPut: to clear the byteArrayMap in >> #removeAll, because it should be faster than allocating a new instance >> - improved #size's performance >> - migrate instances on-the-fly >> - migrate any unmigrated instaces during the postscript >> - removed the unused methods >> >> ============================================= >> >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008876.html >> >> Name: Collections-ul.646 >> Ancestors: Collections-ul.645 >> >> - removed migration code from WideCharacterSet >> >> ============================================= >> >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008877.html >> >> Name: Tools-eem.631 >> Ancestors: Tools-ul.630 >> >> Remove the become[Un]Compact messages from MethodFinder >> as these are going away. >> >> ============================================= >> >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008878.html >> >> Name: System-eem.758 >> Ancestors: System-ul.757 >> >> Reimplement the post-load enumeration of loaded objects >> to use the revised primitive available in the VMMaker.oscog-eem.1441 /3427 >> VMs that becomes the loaded segment into >> an Array of the loaded objects. Hence endMarker >> disappears and allObjectsDo: is trivially implemented as do: sent to the >> segment. >> >> This change requires users to upgrade their VMs but as >> the alternative is crashes in ImageSegment loads this is acceptable. AFAIA >> this fixes ImageSegments in Spur but they >> clearly need pounding on. >> >> ============================================= >> >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008879.html >> >> Name: SMBase-eem.134 >> Ancestors: SMBase-bf.133 >> >> Reimplement the post-load enumeration of loaded objects >> to use the revised primitive available in the VMMaker.oscog-eem.1441 /3427 >> VMs that becomes the loaded segment into >> an Array of the loaded objects. Hence endMarker >> disappears and allObjectsDo: is trivially implemented as do: sent to the >> segment. >> >> This change requires users to upgrade their VMs but as >> the alternative is crashes in ImageSegment loads this is acceptable. AFAIA >> this fixes ImageSegments in Spur but they >> clearly need pounding on. >> >> ============================================= >> >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008880.html >> >> Name: KernelTests-eem.297 >> Ancestors: KernelTests-ul.296 >> >> Remove the compact class index tests from >> LargeNegativeInteger as the compact class code is going away. >> >> ============================================= >> >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008881.html >> >> Name: Kernel-eem.944 >> Ancestors: Kernel-ul.943 >> >> Nuke the compact class support in Kernel and the >> ClassBuilder. Spur has a regular 64-bit object header format with no >> special cases. >> >> Fix CompiledMethod>>at:ifAbsent: to work with the >> initialPC to endPC range and run the ifAbsent: block for indices outside >> this range. >> >> Categorize isCompiledMethodClass correctly. >> >> ============================================= >> >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008882.html >> >> Name: Collections-ul.647 >> Ancestors: Collections-ul.646 >> >> - in Spur we can speed up Character >> #sameAs: by using >> #== >> >> ============================================= >> >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008883.html >> >> Name: Regex-Core-ul.40 >> Ancestors: Regex-Core-ul.39 >> >> RxsPredicate: >> - added \t \n escapes for tab and lf >> - unified all single character predicates as >> #beCharacter: >> - postscript reinitializes the dictionary >> >> RxMatchOptimizer: >> - removed lookarounds, because they were never used, >> just collected >> - all collections get initialized lazily >> - CharacterSet are used for storing characters >> - IdentitySets are used where unique objects are stored >> (e.g. symbols) >> - use #== and #~~ for character comparison >> (Spur-specific change) >> >> RxMatcher: >> - reuse previous markerPositions >> - use String >> #new:streamContents: where possible >> - use #== and #~~ for character comparison >> (Spur-specific change) >> - quick returns in #tryMatch >> >> General: >> - renamed RxmLookahaed to RxmLookahead >> - in RxmPredicate >> #matchAgainst: use the fact that >> aMatcher is providing a ReadStream of characters, so nil means end of stream >> - reimplemented RxmSubstring >> >> ============================================= >> >> >> http://lists.squeakfoundation.org/pipermail/packages/2015-August/008884.html >> >> Name: Regex-Tests-Core-ul.1 >> Ancestors: >> >> - tests from Pharo >> >> ============================================= >> >> >> >> >> >> >> >> -- >> _,,,^..^,,,_ >> best, Eliot >> > > > From commits at source.squeak.org Tue Aug 25 23:46:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Aug 25 23:46:05 2015 Subject: [squeak-dev] The Trunk: Kernel-eem.948.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.948.mcz ==================== Summary ==================== Name: Kernel-eem.948 Author: eem Time: 25 August 2015, 4:45:37.484 pm UUID: 45d1146b-9349-4519-9108-af1e414c58dc Ancestors: Kernel-eem.947 Implement Ephemeron class creation, e.g. Association ephemeronSubclass: #Ephemeron instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Collections-Weak' =============== Diff against Kernel-eem.947 =============== Item was added: + ----- Method: Class>>ephemeronSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- + ephemeronSubclass: 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 ephemeron semantics, i.e. where the object will be queued for + finalization when the key (first) inst var is not reachable other than through + the other fields of ephemerons with unreachable keys." + ^ClassBuilder new + superclass: self + ephemeronSubclass: t + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat! Item was added: + ----- Method: ClassBuilder>>superclass:ephemeronSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- + superclass: aClass + ephemeronSubclass: 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 ephemeron semantics, i.e. where the object will be queued for + finalization when the key (first) inst var is not reachable other than through + the other fields of ephemerons with unreachable keys." + | env | + aClass isPointers ifFalse: + [^self error: 'cannot make a pointer subclass of a class with non-pointer fields']. + aClass instSize + (f subStrings: ' \' withCRs) size < 2 ifTrue: + [^self error: 'cannot make an ephemeron class with less than two named instance varaibles']. + env := CurrentEnvironment signal ifNil: [aClass environment]. + ^self + name: t + inEnvironment: env + subclassOf: aClass + type: #ephemeron + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat! From Marcel.Taeumel at hpi.de Wed Aug 26 09:29:05 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Aug 26 09:34:05 2015 Subject: [squeak-dev] Re: What happened to Morph layering? In-Reply-To: References: <1440486860447-4845449.post@n4.nabble.com> <1440496100020-4845515.post@n4.nabble.com> Message-ID: <1440581345848-4845868.post@n4.nabble.com> I will have a look... Btw: "ActiveWorld submorphs maui" raises an exception. Best, Marcel -- View this message in context: http://forum.world.st/What-happened-to-Morph-layering-tp4845404p4845868.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Wed Aug 26 09:30:49 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Aug 26 09:35:49 2015 Subject: [squeak-dev] Re: What happened to Morph layering? In-Reply-To: <1440581345848-4845868.post@n4.nabble.com> References: <1440486860447-4845449.post@n4.nabble.com> <1440496100020-4845515.post@n4.nabble.com> <1440581345848-4845868.post@n4.nabble.com> Message-ID: <1440581449396-4845870.post@n4.nabble.com> "FileDirectory default entries maui" does also raise an exception. headingMorphs is nil in MauiCollectionMorph >> #allMauiMorphsDo:ifNotIn: Best, Marcel -- View this message in context: http://forum.world.st/What-happened-to-Morph-layering-tp4845404p4845870.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Wed Aug 26 09:55:16 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Aug 26 10:00:16 2015 Subject: [squeak-dev] Re: What happened to Morph layering? In-Reply-To: <1440581449396-4845870.post@n4.nabble.com> References: <1440486860447-4845449.post@n4.nabble.com> <1440496100020-4845515.post@n4.nabble.com> <1440581345848-4845868.post@n4.nabble.com> <1440581449396-4845870.post@n4.nabble.com> Message-ID: <1440582916314-4845881.post@n4.nabble.com> Hi Chris, I could not find a place where headingMorphs is initialized in a useful way. Hmmm... Btw: You should not override MauiMorph >> minExtent: but rather #minimumWidth and #minimumHeight for the same effect. Best, Marcel -- View this message in context: http://forum.world.st/What-happened-to-Morph-layering-tp4845404p4845881.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From karlramberg at gmail.com Wed Aug 26 11:10:37 2015 From: karlramberg at gmail.com (karl ramberg) Date: Wed Aug 26 11:10:39 2015 Subject: [squeak-dev] Missing menu entry to inspect instance class Message-ID: Hi, There is no menu item to inspect or explore the class of the inspected instance. Many constants hide in class variables and are harder to get to when there are no menu short cuts. Karl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150826/4f09d3c5/attachment.htm From lecteur at zogotounga.net Wed Aug 26 11:42:06 2015 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Wed Aug 26 11:42:10 2015 Subject: [squeak-dev] [OT][ANN] Some new music composed in muO Message-ID: <55DDA60E.6060903@zogotounga.net> Hello, Hopefully it is not inappropriate for me to announce here three new music pieces entirely composed in Squeak with muO, synthesized on-the-fly via Squeak MIDI output by VST plug-ins hosted in Cantabile, all from these last weeks: http://www.zogotounga.net/zik/Suspension%20of%20Belief.ogg http://www.zogotounga.net/zik/Busy%20Claude%20is%20late%20again.ogg http://www.zogotounga.net/zik/Flying%20Bugs.ogg Stef From Das.Linux at gmx.de Wed Aug 26 12:05:29 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Aug 26 12:05:35 2015 Subject: [Vm-dev] [squeak-dev] SqueakSSL + SAN certificates In-Reply-To: References: <20150601235713.GA68046@shell.msen.com> <5D97A777-231F-4047-9A58-CC6D47BAFB96@gmx.de> Message-ID: <0B4F4717-50AC-46B1-BB30-BBCEB5DBD950@gmx.de> Hi all (psa: I'm on vacation and will only answer irregularly or not at all) On 21.08.2015, at 18:10, Levente Uzonyi wrote: > Hi Tobias, > > That sounds like a good plan. To sum it up, the only difference to the current version is that the plugin will verify server names as well (this is something OpenSSL doesn't support out of box, but it has all the tools necessary to do). No, the plugin will verify everything; server name, certificate validity, cert chain validity, etc. etc. > So a), b) and c) are all image-side changes. The way I intended this is to make a, b, and c all plugin- and image-side changes. Currently, validation is disabled manually: - Windows: https://github.com/itsmeront/squeakssl/blob/fb6262a66ee9b6a17b5cd95fb228658499747f81/src/Win32/sqWin32SSL.c#L179 - OS X: https://github.com/itsmeront/squeakssl/blob/fb6262a66ee9b6a17b5cd95fb228658499747f81/src/Mac%20OS/sqMacSSL.c#L154 or just not present: - Well, OpenSSL: https://github.com/itsmeront/squeakssl/blob/96618367c18b5d0faea7869036c3255a0a8bcad8/src/unix/sqUnixOpenSSL.c#L47 Windows and OS X naturally can do the whole and the kitchen sink in validation for us. And that's a good thing?. Really. So, for OpenSSL. It's really complex, actually. So the OpenBSD people (who ? IMHO ? know what they are doing) provide a new API atop LibreSSL (ie, OpenSSL for that matter), that makes thinks less error prone: http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/tls_accept_fds.3?query=tls_init&sec=3 Essentially: tls_init tls_client (or tls_server, for that matter) tls_connect_fds (or tls_accept_fds) tls_read/tls_write tls_close_fds tls_free As wit Schannel (win) and SecureTransport (OSX), it is possible to disable checking upfront: tls_config_insecure_noverifycert tls_config_insecure_noverifyname (note the names) So the scheme ?Always verify except when explicitly asked not to? would work for all platforms. > I'm not sure if we need c) at all, because we can simply signal a resumable error when the certificate chain fails to be verified by the plugin, and let you, the user, handle that error when necessary. That's what I want to avoid. If the user did not say upfront they want not verification, there will be no way forward if verification fails (from plugin perspective). A user-level error handler could then retry with verification disabled (after asking the user, of course) Best regards -Tobias (back to vacation ;)) > > Levente > > On Thu, 20 Aug 2015, Tobias Pape wrote: > >> Hi again >> (hi sven) >> >> On 02.06.2015, at 05:56, Levente Uzonyi wrote: >> >>> Hi David, >>> >>> There's a debate about how SAN certificates - and server name verification in general - should be handled[1][2]. >>> I tend to agree with Tobias on verifying the server name in the plugin, but getting there will require further efforts - especially on the unix platform. >>> >>> While this version solves a particular case, and is backwards compatible on the image side, I think we should look for a better, more general solution. >> >> I have sketched an Idea how to handle verification in SqueakSSL in general (and briefly presented to Bert), >> I'm not yet sure, however, and I'm on vacation the next two weeks. But after >> that I'd like to spark a discussion (hoepfully including Sven, for Zodiac) that will involve: >> >> a) no manual verification. Period. >> b) fail on non-verification. >> c) optional 'unverified' mode that has to be requested explicitly >> d) Moving the Unix platform code to libtls (easier to understand) >> >> That's my 2ct for now, more in September. >> >> Best regards >> -Tobias >> >> >> >>> >>> Levente >>> >>> [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2015-May/184613.html >>> [2] http://lists.squeakfoundation.org/pipermail/squeak-dev/2015-May/184631.html >>> >>> On Mon, 1 Jun 2015, David T. Lewis wrote: >>> >>>> >>>> Hi Levente, >>>> >>>> Regarding your VM changes for SqueakSSL, shall I commit these to the SVN >>>> trunk repository? Ian delegated access to platforms/unix so that I can do >>>> that for you if you like. >>>> >>>> We have several Mantis entries to track your SqueakSSL work: >>>> >>>> http://bugs.squeak.org/view.php?id=7751 (Add SSL plugin) >>>> http://bugs.squeak.org/view.php?id=7793 (Memory leak in the SqueakSSL plugin on unix) >>>> http://bugs.squeak.org/view.php?id=7824 (Add TLS SNI Server Name Indication support to SqueakSSL plugin) >>>> >>>> Your latest version http://leves.web.elte.hu/squeak/SqueakSSL/ adds >>>> the SAN certificates support, so I think we should commit your latest >>>> version and close the Mantis issues. >>>> >>>> If you agree I will update the SVN files. >>>> >>>> Thanks, >>>> Dave >>>> >>>> p.s. There are still issues in SqueakSSL when sizeof(sqInt) is 8 >>>> (64 bit images) but that is a separate discussion. >>>> >>>> >>>> >>>> On Tue, May 26, 2015 at 11:55:42PM +0200, Levente Uzonyi wrote: >>>>> Hi All, >>>>> >>>>> I've implemented support for reading the domain names from the >>>>> certificate's SAN extension[1] in SqueakSSL. >>>>> The image side code is in the Inbox[2]. It is backwards compatible -- >>>>> everything works as before without the VM changes. >>>>> I've also uploaded the modified files[3][4] for the unix platform, and a >>>>> diff[5] (which somehow doesn't include the changes of the .h file). >>>>> >>>>> The VM support code for other platforms are to be done. >>>>> >>>>> These changes fix the failing SqueakSSL test in the Trunk, so I suggest >>>>> including the .mcz file in the 4.6 release. >>>>> >>>>> Levente >>>>> >>>>> [1] https://en.wikipedia.org/wiki/SubjectAltName >>>>> [2] >>>>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2015-May/184581.html >>>>> [3] http://leves.web.elte.hu/squeak/SqueakSSL/SqueakSSL.h >>>>> [4] http://leves.web.elte.hu/squeak/SqueakSSL/sqUnixOpenSSL.c >>>>> [5] http://leves.web.elte.hu/squeak/SqueakSSL/diff.txt From craig at netjam.org Wed Aug 26 12:53:13 2015 From: craig at netjam.org (Craig Latta) Date: Wed Aug 26 12:53:26 2015 Subject: [squeak-dev] re: [OT][ANN] Some new music composed in muO In-Reply-To: <55DDA60E.6060903@zogotounga.net> References: <55DDA60E.6060903@zogotounga.net> Message-ID: Excellent! -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From Das.Linux at gmx.de Wed Aug 26 13:06:45 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Aug 26 13:06:50 2015 Subject: [squeak-dev] Menus in the PointerFinder are broken In-Reply-To: References: Message-ID: <28F0C5A4-37CB-407B-BCE4-75FD29302319@gmx.de> Hi Eliot On 25.08.2015, at 21:48, Eliot Miranda wrote: > Hi Tobias, > > the new menu scheme (as of March this year?) isn't working for PointerFinder. Only StringHolder understands #menu:for:shifted: but it is sent from PointerFinder>>menu:shifted: and PointerFinder inherits from Model. Oh well. Thanks for pointing this out. I'll go for it once I return from vacation. Best regards -Tobias From asqueaker at gmail.com Wed Aug 26 15:31:48 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Aug 26 15:31:51 2015 Subject: [squeak-dev] Re: What happened to Morph layering? In-Reply-To: <1440582916314-4845881.post@n4.nabble.com> References: <1440486860447-4845449.post@n4.nabble.com> <1440496100020-4845515.post@n4.nabble.com> <1440581345848-4845868.post@n4.nabble.com> <1440581449396-4845870.post@n4.nabble.com> <1440582916314-4845881.post@n4.nabble.com> Message-ID: Rats! The BrpExtensions package was not included in my update map, sorry! I've just added it and retested, its working and showing the problem, could you please try it again? On Wed, Aug 26, 2015 at 4:55 AM, marcel.taeumel wrote: > Hi Chris, > > I could not find a place where headingMorphs is initialized in a useful way. > Hmmm... > > Btw: You should not override MauiMorph >> minExtent: but rather > #minimumWidth and #minimumHeight for the same effect. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/What-happened-to-Morph-layering-tp4845404p4845881.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From karlramberg at gmail.com Wed Aug 26 16:07:56 2015 From: karlramberg at gmail.com (karl ramberg) Date: Wed Aug 26 16:07:58 2015 Subject: [squeak-dev] Problems downloading Message-ID: http://ftp.squeak.org/5.0/Squeak5.0-15113.zip Download fails at 3.6MB :-( Is it just me or a general error? Karl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150826/f88f4535/attachment.htm From Marcel.Taeumel at hpi.de Wed Aug 26 16:50:12 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Aug 26 16:55:15 2015 Subject: [squeak-dev] Re: Problems downloading In-Reply-To: References: Message-ID: <1440607812962-4846080.post@n4.nabble.com> Works for me. Best, Marcel -- View this message in context: http://forum.world.st/Problems-downloading-tp4846059p4846080.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Wed Aug 26 19:39:27 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Aug 26 19:39:30 2015 Subject: [squeak-dev] Missing menu entry to inspect instance class In-Reply-To: References: Message-ID: It's not much "harder" to get to in terms of number of gestures. You can select "browse class" and, voila, there are your ClassVars, ready for printing or inspection. IMO, we should consider and encourage the idea that interacting with code in the browsers is as much a part of the IDE as the menus and buttons. This seems like a good opportunity to express my views about what Squeak is, or at least can be. It seems like there are two prevailing ideas in the community; one that Squeak should be like an "app" where the goal is to insulate the user from ever seeing code or the debugger, and therefore we need a widget (button or menu) for every action the user might ever want to do. The other prevailing idea is that Squeak is devevlopers-tool (like Eclipse, etc.) and should regard its users as full-on developers. It seems like every software out there wants to cater to one of those two groups, but not anyone who is looking for something else. Squeak has the chance to be that something else that empowers regular people who are not programmers, but very intelligent and wanting to use their computer for useful purposes -- if only they had an empowering software "application" other than, at one end, some kind of Office package (usable but not capable) and, at the other, Emacs and a C-compiler (capable but inaccessible to them). As another example, hiding the debugger to put up a generic error message in an alert box totally subverts the strengths and even the original vision of the Dynabook. It's supposed to be a personal computing system, the Debugger is the most useful and empowering browser in the system. The Squeak environment should never swallow its own bugs. Another example is breakpoints vs. "self halt". We have all this.... crazy stuff to support them; swapping out CompiledMethods, restoring them under certain circumstances, and even creating a new soft-dependency from Compiler to Tools! All this, just so the user can select "breakpoint" from a menu instead typing "self halt" in a method? IMO, "sparing" the user from interacting directly with the code is not helping them in the long run.. On Wed, Aug 26, 2015 at 6:10 AM, karl ramberg wrote: > Hi, > There is no menu item to inspect or explore the class of the inspected > instance. Many constants hide in class variables and are harder to get to > when there are no menu short cuts. > > Karl > > > From karlramberg at gmail.com Wed Aug 26 21:10:39 2015 From: karlramberg at gmail.com (karl ramberg) Date: Wed Aug 26 21:10:42 2015 Subject: [squeak-dev] Missing menu entry to inspect instance class In-Reply-To: References: Message-ID: On Wed, Aug 26, 2015 at 9:39 PM, Chris Muller wrote: > It's not much "harder" to get to in terms of number of gestures. You > can select "browse class" and, voila, there are your ClassVars, ready > for printing or inspection. > > IMO, we should consider and encourage the idea that interacting with > code in the browsers is as much a part of the IDE as the menus and > buttons. > > > This seems like a good opportunity to express my views about what > Squeak is, or at least can be. It seems like there are two prevailing > ideas in the community; one that Squeak should be like an "app" where > the goal is to insulate the user from ever seeing code or the > debugger, and therefore we need a widget (button or menu) for every > action the user might ever want to do. > > The other prevailing idea is that Squeak is devevlopers-tool (like > Eclipse, etc.) and should regard its users as full-on developers. > > It seems like every software out there wants to cater to one of those > two groups, but not anyone who is looking for something else. Squeak > has the chance to be that something else that empowers regular people > who are not programmers, but very intelligent and wanting to use their > computer for useful purposes -- if only they had an empowering > software "application" other than, at one end, some kind of Office > package (usable but not capable) and, at the other, Emacs and a > C-compiler (capable but inaccessible to them). > > As another example, hiding the debugger to put up a generic error > message in an alert box totally subverts the strengths and even the > original vision of the Dynabook. It's supposed to be a personal > computing system, the Debugger is the most useful and empowering > browser in the system. The Squeak environment should never swallow > its own bugs. > > Another example is breakpoints vs. "self halt". We have all > this.... crazy stuff to support them; swapping out CompiledMethods, > restoring them under certain circumstances, and even creating a new > soft-dependency from Compiler to Tools! All this, just so the user > can select "breakpoint" from a menu instead typing "self halt" in a > method? IMO, "sparing" the user from interacting directly with the > code is not helping them in the long run.. > > It's not so much isolating the user from the system as making a practical system that group somewhat similar issues together. When I inspect a running instance I know I can browse it's class and get to the class variables. One of the biggest failures of Smalltalk is hidden state. When code behaves strangely and you are looking for clues, easy access is a prime quality. Look at this issue where you yourself missed a error because a class variable was nilled: http://forum.world.st/Etoys-specialist-needed-td4739904.html Sometimes it is ok to dig into the underpinnings of a system, and get the whole developing environment. Sometimes you can't be bothered with a debugger, you just want to get the stuff you are working on done. To get somewhere you have to stand on the shoulders of giants and trust that they made the right choices. You can't always go down the rabbit hole. When I write this mail I don't want to debug TCP or know why the cursor change was lagging while I moused over a hyperlink. Karl > > On Wed, Aug 26, 2015 at 6:10 AM, karl ramberg > wrote: > > Hi, > > There is no menu item to inspect or explore the class of the inspected > > instance. Many constants hide in class variables and are harder to get to > > when there are no menu short cuts. > > > > Karl > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150826/ccbe2052/attachment.htm From commits at source.squeak.org Wed Aug 26 21:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Aug 26 21:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150826215503.25036.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-August/008905.html Name: Kernel-ul.946 Ancestors: Kernel-mt.945 Set literal limit to 32767. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008906.html Name: Kernel-eem.947 Ancestors: Kernel-ul.946 Provide an accessor for Compiledmethod's max num literals. Recategorize the frame size accessors under accessing to join it. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008907.html Name: Compiler-eem.307 Ancestors: Compiler-ul.306 Make the literal limit in the compiler a funciton of both the bytecode set and CompiledMethod's implementation limit. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008908.html Name: Tests-eem.327 Ancestors: Tests-ul.326 Revise the maxLiterals test given the bytecode set specific facilities in Encoder and CompiledMethod. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008909.html Name: Kernel-eem.948 Ancestors: Kernel-eem.947 Implement Ephemeron class creation, e.g. Association ephemeronSubclass: #Ephemeron instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Collections-Weak' ============================================= From lewis at mail.msen.com Wed Aug 26 23:54:37 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Aug 26 23:54:39 2015 Subject: [squeak-dev] [OT][ANN] Some new music composed in muO In-Reply-To: <55DDA60E.6060903@zogotounga.net> References: <55DDA60E.6060903@zogotounga.net> Message-ID: <20150826235437.GA54270@shell.msen.com> On Wed, Aug 26, 2015 at 01:42:06PM +0200, St??phane Rollandin wrote: > Hello, > > Hopefully it is not inappropriate for me to announce here three new > music pieces entirely composed in Squeak with muO, synthesized > on-the-fly via Squeak MIDI output by VST plug-ins hosted in Cantabile, > all from these last weeks: > > http://www.zogotounga.net/zik/Suspension%20of%20Belief.ogg > http://www.zogotounga.net/zik/Busy%20Claude%20is%20late%20again.ogg > http://www.zogotounga.net/zik/Flying%20Bugs.ogg Stef, Thanks for posting this :-) Dave From commits at source.squeak.org Thu Aug 27 08:54:12 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 27 08:54:14 2015 Subject: [squeak-dev] The Trunk: Tests-mt.328.mcz Message-ID: Marcel Taeumel uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-mt.328.mcz ==================== Summary ==================== Name: Tests-mt.328 Author: mt Time: 27 August 2015, 10:54:02.079 am UUID: 2b490fe8-250d-2e48-84c2-41d50b1ae410 Ancestors: Tests-eem.327 New tests for preferences. =============== Diff against Tests-eem.327 =============== Item was changed: SystemOrganization addCategory: #'Tests-Bugs'! SystemOrganization addCategory: #'Tests-Compiler'! SystemOrganization addCategory: #'Tests-Dependencies'! SystemOrganization addCategory: #'Tests-Digital Signatures'! SystemOrganization addCategory: #'Tests-Environments'! SystemOrganization addCategory: #'Tests-Exceptions'! SystemOrganization addCategory: #'Tests-FilePackage'! SystemOrganization addCategory: #'Tests-Files'! SystemOrganization addCategory: #'Tests-Finalization'! SystemOrganization addCategory: #'Tests-Hex'! SystemOrganization addCategory: #'Tests-Installer-Core'! SystemOrganization addCategory: #'Tests-Localization'! SystemOrganization addCategory: #'Tests-Monticello'! SystemOrganization addCategory: #'Tests-Monticello-Mocks'! SystemOrganization addCategory: #'Tests-Monticello-Utils'! SystemOrganization addCategory: #'Tests-Object Events'! SystemOrganization addCategory: #'Tests-ObjectsAsMethods'! SystemOrganization addCategory: #'Tests-PrimCallController'! SystemOrganization addCategory: #'Tests-Release'! SystemOrganization addCategory: #'Tests-System-Object Storage'! SystemOrganization addCategory: #'Tests-System-Support'! SystemOrganization addCategory: #'Tests-Utilities'! SystemOrganization addCategory: #'Tests-VM'! SystemOrganization addCategory: #'Tests-System-Digital Signatures'! + SystemOrganization addCategory: #'Tests-System-Preferences'! Item was added: + TestCase subclass: #PreferencesTest + instanceVariableNames: 'sut' + classVariableNames: '' + poolDictionaries: '' + category: 'Tests-System-Preferences'! Item was added: + ----- Method: PreferencesTest>>setUp (in category 'running') ----- + setUp + + super setUp. + sut := PreferencesTestPreferences.! Item was added: + ----- Method: PreferencesTest>>tearDown (in category 'running') ----- + tearDown + + sut allPreferences do: [:pref | sut removePreference: pref id]. + sut class organization removeEmptyCategories. + + super tearDown.! Item was added: + ----- Method: PreferencesTest>>test01Empty (in category 'tests') ----- + test01Empty + + self assert: sut dictionaryOfPreferences isEmpty.! Item was added: + ----- Method: PreferencesTest>>test02AddSetRemovePreference (in category 'tests') ----- + test02AddSetRemovePreference + + self assert: (sut valueOfPreference: #foo ifAbsent: []) isNil. + self assert: (sut respondsTo: #foo) not. "auto-generated accessor" + + sut addPreference: #foo category: #bar default: false. + self assert: (sut valueOfPreference: #foo ifAbsent: []) = false. + self assert: (sut perform: #foo) = false. + + sut setPreference: #foo toValue: true. + self assert: (sut valueOfPreference: #foo ifAbsent: []) = true. + self assert: (sut perform: #foo) = true. + + sut removePreference: #foo. + self assert: (sut valueOfPreference: #foo ifAbsent: []) isNil. + self assert: (sut respondsTo: #foo) not.! Item was added: + ----- Method: PreferencesTest>>test03Type (in category 'tests') ----- + test03Type + + sut addPreference: #foo default: true. + self assert: (sut preferenceAt: #foo) type == #Boolean. + + sut addPreference: #foo default: 123. + self assert: (sut preferenceAt: #foo) type == #Number. + + sut addPreference: #foo default: 'Hello, World'. + self assert: (sut preferenceAt: #foo) type == #String. + + sut addPreference: #foo default: Color red. + self assert: (sut preferenceAt: #foo) type == #Color. + + sut addPreference: #foo default: 1@5. + self assert: (sut preferenceAt: #foo) type == #Object. + ! Item was added: + ----- Method: PreferencesTest>>test04TypeNoUpdate (in category 'tests') ----- + test04TypeNoUpdate + + sut addPreference: #foo default: true. + sut setPreference: #foo toValue: 123. + + self assert: (sut preferenceAt: #foo) type == #Boolean.! Item was added: + ----- Method: PreferencesTest>>test05AutoAdd (in category 'tests') ----- + test05AutoAdd + + | pref | + self assert: (sut valueOfPreference: #foo ifAbsent: []) isNil. + pref := sut setPreference: #foo toValue: 123. + + self assert: pref preferenceValue = 123.! Item was added: + ----- Method: PreferencesTest>>test06Flags (in category 'tests') ----- + test06Flags + "Flags are boolean preferences." + + self assert: (sut valueOfFlag: #isHappy) == false. "Not known but false for default." + + sut setFlag: #isHappy toValue: true. + self assert: (sut valueOfFlag: #isHappy) == true. + self assert: (sut perform: #isHappy) == true. + + sut disable: #useIt. + self assert: (sut valueOfFlag: #useIt) == false. + self assert: (sut perform: #useIt) == false. + + sut enable: #useIt. + self assert: (sut valueOfFlag: #useIt) == true. + self assert: (sut perform: #useIt) == true. + + sut toggle: #useIt. + self assert: (sut valueOfFlag: #useIt) == false. ! Item was added: + ----- Method: PreferencesTest>>test07UnknownPreference (in category 'tests') ----- + test07UnknownPreference + + self assert: (sut valueOfPreference: #notKnown) isNil. + self assert: (sut valueOfPreference: #notKnown ifAbsent: [#default]) = #default.! Item was added: + ----- Method: PreferencesTest>>test08DNUFallback (in category 'tests') ----- + test08DNUFallback + + sut setPreference: #foo toValue: 123. + sut class removeSelectorSilently: #foo. + + self assert: (sut perform: #foo) = 123. + self assert: (sut perform: #unknownSelector) isNil.! Item was added: + ----- Method: PreferencesTest>>test09AddSetRemovePragmaPreference (in category 'tests') ----- + test09AddSetRemovePragmaPreference + + | id pref | + id := PreferencesTestExample name, '>>', #textPref. + pref := sut addPragmaPreference: (PreferencesTestExample class >> #textPref) pragmas first. + + self assert: id equals: pref id. + self assert: (sut preferenceAt: pref id) == pref. + + "Reset the preference explicitely." + PreferencesTestExample textPref: ''. + self assert: '' equals: PreferencesTestExample textPref. + + sut setPreference: pref id toValue: 'foo'. + self assert: 'foo' equals: (sut valueOfPreference: pref id). + self assert: 'foo' equals: PreferencesTestExample textPref. + + sut removePreference: pref id. + self assert: (sut preferenceAt: pref id ifAbsent: []) isNil.! Item was added: + ----- Method: PreferencesTest>>test10Unclassified (in category 'tests') ----- + test10Unclassified + + | pref | + pref := sut addPreference: #foobar default: 123. + self assert: sut unclassifiedCategory equals: pref categoryList first.! Item was added: + ----- Method: PreferencesTest>>test11CategoryList (in category 'tests') ----- + test11CategoryList + + sut addPreference: #foo category: #blubb default: 123. + self assert: #(blubb) equals: (sut categoryListOfPreference: #foo). ! Item was added: + ----- Method: PreferencesTest>>test12HardCodedPreference (in category 'tests') ----- + test12HardCodedPreference + + self assert: (sut respondsTo: #someStaticFoo) not. + sut compileAccessorForPreferenceNamed: #someStaticFoo value: 42. + self assert: 42 equals: (sut perform: #someStaticFoo). + self assert: (sut valueOfPreference: #someStaticFoo ifAbsent: []) isNil. + + "Hard-coded preferences have their value only in the source code. We must leave them in the same package." + self deny: ((sut class organization categoryOfElement: #someStaticFoo) beginsWith: '*'). + + sut class removeSelectorSilently: #someStaticFoo.! Item was added: + Object subclass: #PreferencesTestExample + instanceVariableNames: '' + classVariableNames: 'BooleanPref ColorPref NumericPref TextPref' + poolDictionaries: '' + category: 'Tests-System-Preferences'! + + !PreferencesTestExample commentStamp: 'ar 3/3/2009 22:40' prior: 0! + This class provides an example for how to use preference pragmas.! Item was added: + ----- Method: PreferencesTestExample class>>booleanPref (in category 'preferences') ----- + booleanPref + >booleanPref)' + type: #Boolean> + ^BooleanPref! Item was added: + ----- Method: PreferencesTestExample class>>booleanPref: (in category 'preferences') ----- + booleanPref: aBool + BooleanPref := aBool. + self inform: 'The new preference value is: ', aBool asString.! Item was added: + ----- Method: PreferencesTestExample class>>colorPref (in category 'preferences') ----- + colorPref + >colorPref)' + type: #Color> + ^ColorPref! Item was added: + ----- Method: PreferencesTestExample class>>colorPref: (in category 'preferences') ----- + colorPref: aColor + ColorPref := aColor. + self inform: 'The new preference value is: ', aColor asString.! Item was added: + ----- Method: PreferencesTestExample class>>initialize (in category 'preferences') ----- + initialize "PreferenceExample initialize" + "Initialize the default values and register preferences" + TextPref := 'Hello World'. + NumericPref := 1234. + BooleanPref := true. + ColorPref := Color green.! Item was added: + ----- Method: PreferencesTestExample class>>numericPref (in category 'preferences') ----- + numericPref + >numericPref)' + type: #Number> + ^NumericPref! Item was added: + ----- Method: PreferencesTestExample class>>numericPref: (in category 'preferences') ----- + numericPref: aNumber + NumericPref := aNumber. + self inform: 'The new preference value is: ', aNumber asString.! Item was added: + ----- Method: PreferencesTestExample class>>textPref (in category 'preferences') ----- + textPref + >textPref)' + type: #String> + ^TextPref! Item was added: + ----- Method: PreferencesTestExample class>>textPref: (in category 'preferences') ----- + textPref: aString + TextPref := aString.! Item was added: + Preferences subclass: #PreferencesTestPreferences + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Tests-System-Preferences'! From commits at source.squeak.org Thu Aug 27 08:55:01 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 27 08:55:02 2015 Subject: [squeak-dev] The Trunk: Services-Base-mt.57.mcz Message-ID: Marcel Taeumel uploaded a new version of Services-Base to project The Trunk: http://source.squeak.org/trunk/Services-Base-mt.57.mcz ==================== Summary ==================== Name: Services-Base-mt.57 Author: mt Time: 27 August 2015, 10:54:56.806 am UUID: 6ba0b05d-5eb6-4244-9fbd-8595dacbc6aa Ancestors: Services-Base-eem.56 Some adjustments for cleaned-up preferences interface. =============== Diff against Services-Base-eem.56 =============== Item was removed: - ----- Method: ServicePreferences class>>compileAccessMethodForPreference: (in category 'accessing') ----- - compileAccessMethodForPreference: aPreference - "do nothing"! Item was added: + ----- Method: ServicePreferences class>>compileAccessorForPreference: (in category 'accessing') ----- + compileAccessorForPreference: aPreference + "do nothing"! From commits at source.squeak.org Thu Aug 27 08:55:38 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 27 08:55:39 2015 Subject: [squeak-dev] The Trunk: ST80-mt.185.mcz Message-ID: Marcel Taeumel uploaded a new version of ST80 to project The Trunk: http://source.squeak.org/trunk/ST80-mt.185.mcz ==================== Summary ==================== Name: ST80-mt.185 Author: mt Time: 27 August 2015, 10:55:27.275 am UUID: 6b3d698d-14db-bb47-bf6c-49300227562c Ancestors: ST80-mt.184 Some adjustments for cleaned-up preferences interface. =============== Diff against ST80-mt.184 =============== Item was changed: ----- Method: ScreenController>>changeWindowPolicy (in category 'menu messages') ----- changeWindowPolicy + + Preferences toggle: #reverseWindowStagger.! - Preferences toggleWindowPolicy! From commits at source.squeak.org Thu Aug 27 08:56:23 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 27 08:56:25 2015 Subject: [squeak-dev] The Trunk: PreferenceBrowser-mt.54.mcz Message-ID: Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk: http://source.squeak.org/trunk/PreferenceBrowser-mt.54.mcz ==================== Summary ==================== Name: PreferenceBrowser-mt.54 Author: mt Time: 27 August 2015, 10:56:18.032 am UUID: 10b11ae8-a6bd-a445-a977-b30028b9e507 Ancestors: PreferenceBrowser-mt.53 Some adjustments for cleaned-up preferences interface. =============== Diff against PreferenceBrowser-mt.53 =============== Item was changed: ----- Method: PreferenceBrowser>>allPreferences (in category 'accessing') ----- allPreferences + ^ preferences allPreferences asSortedCollection: - ^ preferences allPreferenceObjects asSortedCollection: [:pref1 :pref2 | pref1 viewRegistry viewOrder >categoryList (in category 'accessing') ----- categoryList ^OrderedCollection new add: self allCategoryLabel; + addAll: preferences categoryList asSortedCollection; - addAll: preferences categoryNames asSortedCollection; add: self searchResultsCategoryLabel; yourself. ! Item was changed: ----- Method: PreferenceBrowser>>findCategoryFromPreference: (in category 'find') ----- findCategoryFromPreference: prefSymbol "Find all categories in which the preference occurs" | aMenu| aMenu := MenuMorph new defaultTarget: self. + (preferences categoryListOfPreference: prefSymbol) do: - (preferences categoriesContainingPreference: prefSymbol) do: [:aCategory | aMenu add: aCategory target: self selector: #selectedCategory: argument: aCategory]. aMenu popUpInWorld! Item was changed: ----- Method: PreferenceBrowser>>preferencesInCategory: (in category 'accessing') ----- preferencesInCategory: aCategory + ^(preferences preferencesInCategory: aCategory) asSortedCollection: - ^(preferences preferenceObjectsInCategory: aCategory) asSortedCollection: [:pref1 :pref2 | pref1 viewRegistry viewOrder Marcel Taeumel uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-mt.162.mcz ==================== Summary ==================== Name: Network-mt.162 Author: mt Time: 27 August 2015, 10:57:00.294 am UUID: 47e946cb-d8d5-014c-a43f-bae21eda3237 Ancestors: Network-cmm.161 Some adjustments for cleaned-up preferences interface. =============== Diff against Network-cmm.161 =============== Item was changed: ----- Method: ServerDirectory class>>releaseExternalSettings (in category 'server prefs') ----- releaseExternalSettings "Release for server configurations" "ServerDirectory releaseExternalSettings" + (Preferences valueOfFlag: #externalServerDefsOnly) - Preferences externalServerDefsOnly ifTrue: [ self resetLocalProjectDirectories. Servers := Dictionary new]! From commits at source.squeak.org Thu Aug 27 08:58:30 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 27 08:58:30 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.1000.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1000.mcz ==================== Summary ==================== Name: Morphic-mt.1000 Author: mt Time: 27 August 2015, 10:57:54.273 am UUID: 168d2e1e-3ae0-6545-8dac-da4b99ad092d Ancestors: Morphic-mt.999 Some adjustments for cleaned-up preferences interface. =============== Diff against Morphic-mt.999 =============== Item was changed: ----- Method: PasteUpMorph>>toggleClassicNavigatorIfAppropriate (in category 'world menu') ----- toggleClassicNavigatorIfAppropriate "If appropriate, toggle the presence of classic navigator" + Preferences classicNavigatorEnabled ifTrue: [^ Preferences toggle: #showProjectNavigator]! - Preferences classicNavigatorEnabled ifTrue: [^ Preferences togglePreference: #showProjectNavigator]! Item was changed: ----- Method: StandardScriptingSystem>>customizeForEToyUsers: (in category 'utilities') ----- customizeForEToyUsers: aBoolean "If aBoolean is true, set things up for etoy users. If it's false, unset some of those things. Some things are set when switching into etoy mode but not reversed when switching out of etoy mode." #( (allowEtoyUserCustomEvents no reverse) (balloonHelpEnabled yes dontReverse) (debugHaloHandle no reverse) (modalColorPickers yes dontReverse) (oliveHandleForScriptedObjects no dontReverse) (uniqueNamesInHalos yes reverse) (useUndo yes dontReverse) (infiniteUndo no dontReverse) (warnIfNoChangesFile no reverse) (warnIfNoSourcesFile no reverse)) do: [:trip | (aBoolean or: [trip third == #reverse]) ifTrue: + [Preferences setFlag: trip first toValue: - [Preferences enableOrDisable: trip first asPer: ((trip second == #yes) & aBoolean) | ((trip second == #no) & aBoolean not)]]! Item was changed: ----- Method: TheWorldMenu>>appearanceMenu (in category 'construction') ----- appearanceMenu "Build the appearance menu for the world." ^self fillIn: (self menu: 'appearance...') from: { {'preferences...' . { self . #openPreferencesBrowser} . 'Opens a "Preferences Browser" which allows you to alter many settings' } . {'choose theme...' . { Preferences . #offerThemesMenu} . 'Presents you with a menu of themes; each item''s balloon-help will tell you about the theme. If you choose a theme, many different preferences that come along with that theme are set at the same time; you can subsequently change any settings by using a Preferences Panel'} . nil . {'system fonts...' . { self . #standardFontDo} . 'Choose the standard fonts to use for code, lists, menus, window titles, etc.'}. {'text highlight color...' . { Preferences . #chooseTextHighlightColor} . 'Choose which color should be used for text highlighting in Morphic.'}. {'insertion point color...' . { Preferences . #chooseInsertionPointColor} . 'Choose which color to use for the text insertion point in Morphic.'}. {'keyboard focus color' . { Preferences . #chooseKeyboardFocusColor} . 'Choose which color to use for highlighting which pane has the keyboard focus'}. nil. + {#menuColorString . { self . #toggleMenuColorPolicy} . 'Governs whether menu colors should be derived from the desktop color.'}. + {#roundedCornersString . { self . #toggleRoundedCorners} . 'Governs whether morphic windows and menus should have rounded corners.'}. - {#menuColorString . { Preferences . #toggleMenuColorPolicy} . 'Governs whether menu colors should be derived from the desktop color.'}. - {#roundedCornersString . { Preferences . #toggleRoundedCorners} . 'Governs whether morphic windows and menus should have rounded corners.'}. nil. {'full screen on' . { Project current . #fullScreenOn} . 'puts you in full-screen mode, if not already there.'}. {'full screen off' . { Project current . #fullScreenOff} . 'if in full-screen mode, takes you out of it.'}. nil. {'set display depth...' . {self. #setDisplayDepth} . 'choose how many bits per pixel.'}. {'set desktop color...' . {self. #changeBackgroundColor} . 'choose a uniform color to use as desktop background.'}. {'set gradient color...' . {self. #setGradientColor} . 'choose second color to use as gradient for desktop background.'}. {'use texture background' . { #myWorld . #setStandardTexture} . 'apply a graph-paper-like texture background to the desktop.'}. nil. {'clear turtle trails from desktop' . { #myWorld . #clearTurtleTrails} . 'remove any pigment laid down on the desktop by objects moving with their pens down.'}. {'pen-trail arrowhead size...' . { Preferences. #setArrowheads} . 'choose the shape to be used in arrowheads on pen trails.'}. }! Item was added: + ----- Method: TheWorldMenu>>toggleMenuColorPolicy (in category 'action') ----- + toggleMenuColorPolicy + + Preferences toggle: #menuColorFromWorld.! Item was added: + ----- Method: TheWorldMenu>>toggleRoundedCorners (in category 'action') ----- + toggleRoundedCorners + + Preferences toggle: #roundedWindowCorners.! Item was changed: ----- Method: TheWorldMenu>>toggleWindowPolicy (in category 'action') ----- toggleWindowPolicy + Preferences toggle: #reverseWindowStagger.! - Preferences toggleWindowPolicy! From commits at source.squeak.org Thu Aug 27 08:58:53 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 27 08:58:55 2015 Subject: [squeak-dev] The Trunk: MorphicExtras-mt.166.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-mt.166.mcz ==================== Summary ==================== Name: MorphicExtras-mt.166 Author: mt Time: 27 August 2015, 10:58:40.044 am UUID: 6b748c1a-044e-204b-825d-975865233017 Ancestors: MorphicExtras-ul.165 Some adjustments for cleaned-up preferences interface. =============== Diff against MorphicExtras-ul.165 =============== Item was changed: ----- Method: TheWorldMenu>>formulateFlapsMenu: (in category '*MorphicExtras-windows & flaps menu') ----- formulateFlapsMenu: aMenu "Fill aMenu with appropriate content" aMenu addTitle: 'flaps' translated. aMenu addStayUpItem. Preferences classicNavigatorEnabled ifTrue: [aMenu addUpdating: #navigatorShowingString enablementSelector: #enableProjectNavigator target: Preferences + selector: #toggle: - selector: #togglePreference: argumentList: #(showProjectNavigator). aMenu balloonTextForLastItem: (Preferences preferenceAt: #showProjectNavigator) helpString translated]. Flaps sharedFlapsAllowed ifTrue: [self fillIn: aMenu from: {{#suppressFlapsString. {Project current. #toggleFlapsSuppressed}. 'Whether prevailing flaps should be shown in the project right now or not.'}}. + aMenu addUpdating: #automaticFlapLayoutString target: Preferences selector: #toggle: argumentList: #(automaticFlapLayout). - aMenu addUpdating: #automaticFlapLayoutString target: Preferences selector: #togglePreference: argumentList: #(automaticFlapLayout). aMenu balloonTextForLastItem: (Preferences preferenceAt: #automaticFlapLayout) helpString translated. aMenu addLine. Flaps addIndividualGlobalFlapItemsTo: aMenu]. self fillIn: aMenu from: { nil. {'make a new flap'. {Flaps. #addLocalFlap}. 'Create a new flap. You can later make it into a shared flap is you wish.'}. nil.}. Flaps sharedFlapsAllowed ifTrue: [aMenu addWithLabel: 'put shared flaps on bottom' translated enablementSelector: #showSharedFlaps target: Flaps selector: #sharedFlapsAlongBottom argumentList: #(). aMenu balloonTextForLastItem: 'Group all the standard shared flaps along the bottom edge of the screen' translated. self fillIn: aMenu from: { {'destroy all shared flaps'. {Flaps. #disableGlobalFlaps}. 'Destroy all the shared flaps and disable their use in all projects.'}}] ifFalse: [aMenu add: 'install default shared flaps' translated target: Flaps action: #enableGlobalFlaps. aMenu balloonTextForLastItem: 'Create the default set of shared flaps' translated. aMenu add: 'install etoy flaps' translated target: Flaps action: #enableEToyFlaps. aMenu balloonTextForLastItem: 'Put up the default etoy flaps: a custom Suplies flap and the Navigator flap' translated. aMenu addLine]. self fillIn: aMenu from: { nil. {'about flaps...'. {Flaps . #explainFlaps}. 'Gives a window full of details about how to use flaps.'}}! From commits at source.squeak.org Thu Aug 27 09:00:41 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 27 09:00:43 2015 Subject: [squeak-dev] The Trunk: System-mt.762.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.762.mcz ==================== Summary ==================== Name: System-mt.762 Author: mt Time: 27 August 2015, 11:00:03.719 am UUID: cf2a7eb1-d084-c442-a275-582d975bb994 Ancestors: System-mt.761 Restores #togglePreference: for backwards compatibility. =============== Diff against System-mt.761 =============== Item was added: + ----- Method: Preferences class>>togglePreference: (in category 'get/set - flags') ----- + togglePreference: flagName + + self flag: #deprecated. + ^ self toggle: flagName.! From commits at source.squeak.org Thu Aug 27 09:12:13 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 27 09:12:14 2015 Subject: [squeak-dev] The Trunk: Tests-mt.329.mcz Message-ID: Marcel Taeumel uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-mt.329.mcz ==================== Summary ==================== Name: Tests-mt.329 Author: mt Time: 27 August 2015, 11:12:04.169 am UUID: 2665a1ed-6312-1845-8181-d83c588cd161 Ancestors: Tests-mt.328 Fixes initialization problem with test preferences. =============== Diff against Tests-mt.328 =============== Item was added: + ----- Method: PreferencesTestPreferences class>>initialize (in category 'class initialization') ----- + initialize + + super initialize. + self initializeDictionaryOfPreferences.! From commits at source.squeak.org Thu Aug 27 10:01:07 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 27 10:01:10 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.1001.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1001.mcz ==================== Summary ==================== Name: Morphic-mt.1001 Author: mt Time: 27 August 2015, 12:00:06.056 pm UUID: 09790a69-7468-e04e-9b57-5410ffe88001 Ancestors: Morphic-mt.1000 Fixes a regression where scroll panes want to grow but the parent morph does not update its layout accordingly. =============== Diff against Morphic-mt.1000 =============== Item was changed: ----- Method: ScrollPane>>extent: (in category 'geometry') ----- extent: aPoint self handleResizeAction: [ (bounds extent closeTo: aPoint) ifTrue: [false] ifFalse: [ super extent: aPoint. + owner ifNotNil: [owner layoutChanged]. - super layoutChanged. true]].! From nicolas.cellier.aka.nice at gmail.com Thu Aug 27 11:59:29 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Aug 27 11:59:32 2015 Subject: [squeak-dev] The Trunk: System-mt.762.mcz In-Reply-To: <55ded1c0.86508c0a.171e0.ffff88b8SMTPIN_ADDED_MISSING@mx.google.com> References: <55ded1c0.86508c0a.171e0.ffff88b8SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2015-08-27 11:00 GMT+02:00 : > Marcel Taeumel uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-mt.762.mcz > > ==================== Summary ==================== > > Name: System-mt.762 > Author: mt > Time: 27 August 2015, 11:00:03.719 am > UUID: cf2a7eb1-d084-c442-a275-582d975bb994 > Ancestors: System-mt.761 > > Restores #togglePreference: for backwards compatibility. > > =============== Diff against System-mt.761 =============== > > Item was added: > + ----- Method: Preferences class>>togglePreference: (in category 'get/set > - flags') ----- > + togglePreference: flagName > + > + self flag: #deprecated. > + ^ self toggle: flagName.! > > > One thing I wonder, though being redundant, doesn't togglePreference: help reducing false polymorphism? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150827/70ca8e4d/attachment.htm From leves at elte.hu Thu Aug 27 12:14:01 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Aug 27 12:14:10 2015 Subject: [squeak-dev] The Trunk: Tests-mt.329.mcz In-Reply-To: References: Message-ID: Unless you have a very good reason to send #initialize to the superclass, you shouldn't do it. Levente On Thu, 27 Aug 2015, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of Tests to project The Trunk: > http://source.squeak.org/trunk/Tests-mt.329.mcz > > ==================== Summary ==================== > > Name: Tests-mt.329 > Author: mt > Time: 27 August 2015, 11:12:04.169 am > UUID: 2665a1ed-6312-1845-8181-d83c588cd161 > Ancestors: Tests-mt.328 > > Fixes initialization problem with test preferences. > > =============== Diff against Tests-mt.328 =============== > > Item was added: > + ----- Method: PreferencesTestPreferences class>>initialize (in category 'class initialization') ----- > + initialize > + > + super initialize. > + self initializeDictionaryOfPreferences.! > > > From Marcel.Taeumel at hpi.de Thu Aug 27 15:39:18 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Aug 27 15:44:28 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.762.mcz In-Reply-To: References: Message-ID: <1440689958913-4846394.post@n4.nabble.com> Hmm... you write: "Preferences toggle: #foo". Isn't this enough? Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-System-mt-762-mcz-tp4846285p4846394.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Thu Aug 27 15:42:21 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Aug 27 15:47:30 2015 Subject: [squeak-dev] Re: The Trunk: Tests-mt.329.mcz In-Reply-To: References: Message-ID: <1440690141180-4846397.post@n4.nabble.com> Hmm... Eliot changed the dictionary of preferences to be an instVar of the meta class instead of a classVar. Should be safe here. I want to refactor the initialization of the dictionary anyway. Then, this #initialize will be gone. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Tests-mt-329-mcz-tp4846287p4846397.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Thu Aug 27 15:44:16 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Aug 27 15:49:25 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.762.mcz In-Reply-To: <1440689958913-4846394.post@n4.nabble.com> References: <1440689958913-4846394.post@n4.nabble.com> Message-ID: <1440690256529-4846399.post@n4.nabble.com> ...we might want to add a 'flag' suffix to all enable, disable, toggle messages? I thought that those refer inherently to boolean preferences (aka. flags). Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-System-mt-762-mcz-tp4846285p4846399.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From karlramberg at gmail.com Thu Aug 27 18:07:05 2015 From: karlramberg at gmail.com (karl ramberg) Date: Thu Aug 27 18:07:08 2015 Subject: [squeak-dev] The Trunk: PreferenceBrowser-mt.54.mcz In-Reply-To: <55ded0bd.d71f370a.2fdaf.ffff88b8SMTPIN_ADDED_MISSING@mx.google.com> References: <55ded0bd.d71f370a.2fdaf.ffff88b8SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi, While you are working on the preferences, it would be great if you could look at this change http://source.squeak.org/inbox/EToys-kfr.127.mcz It adds access to change color and border style for menus (and buttons) in the preference browser (these methods should really not be in the Etoys category) Karl On Thu, Aug 27, 2015 at 10:56 AM, wrote: > Marcel Taeumel uploaded a new version of PreferenceBrowser to project The > Trunk: > http://source.squeak.org/trunk/PreferenceBrowser-mt.54.mcz > > ==================== Summary ==================== > > Name: PreferenceBrowser-mt.54 > Author: mt > Time: 27 August 2015, 10:56:18.032 am > UUID: 10b11ae8-a6bd-a445-a977-b30028b9e507 > Ancestors: PreferenceBrowser-mt.53 > > Some adjustments for cleaned-up preferences interface. > > =============== Diff against PreferenceBrowser-mt.53 =============== > > Item was changed: > ----- Method: PreferenceBrowser>>allPreferences (in category > 'accessing') ----- > allPreferences > + ^ preferences allPreferences asSortedCollection: > - ^ preferences allPreferenceObjects asSortedCollection: > [:pref1 :pref2 | > pref1 viewRegistry viewOrder viewOrder or: > [pref1 viewRegistry viewOrder > =pref2 viewRegistry viewOrder > &(pref1 name name)]]! > > Item was changed: > ----- Method: PreferenceBrowser>>categoryList (in category 'accessing') > ----- > categoryList > ^OrderedCollection new > add: self allCategoryLabel; > + addAll: preferences categoryList asSortedCollection; > - addAll: preferences categoryNames asSortedCollection; > add: self searchResultsCategoryLabel; > yourself. > > ! > > Item was changed: > ----- Method: PreferenceBrowser>>findCategoryFromPreference: (in > category 'find') ----- > findCategoryFromPreference: prefSymbol > "Find all categories in which the preference occurs" > > | aMenu| > aMenu := MenuMorph new defaultTarget: self. > + (preferences categoryListOfPreference: prefSymbol) do: > - (preferences categoriesContainingPreference: prefSymbol) do: > [:aCategory | aMenu add: aCategory target: self selector: > #selectedCategory: argument: aCategory]. > aMenu popUpInWorld! > > Item was changed: > ----- Method: PreferenceBrowser>>preferencesInCategory: (in category > 'accessing') ----- > preferencesInCategory: aCategory > + ^(preferences preferencesInCategory: aCategory) asSortedCollection: > - ^(preferences preferenceObjectsInCategory: aCategory) > asSortedCollection: > [:pref1 :pref2 | > pref1 viewRegistry viewOrder viewRegistry viewOrder or: > [pref1 viewRegistry > viewOrder =pref2 viewRegistry viewOrder > &(pref1 name > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150827/99c3afb8/attachment.htm From Marcel.Taeumel at hpi.de Thu Aug 27 20:12:47 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Aug 27 20:17:58 2015 Subject: [squeak-dev] Re: The Trunk: PreferenceBrowser-mt.54.mcz In-Reply-To: References: Message-ID: <1440706367368-4846429.post@n4.nabble.com> Sure. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-PreferenceBrowser-mt-54-mcz-tp4846279p4846429.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From cunningham.cb at gmail.com Thu Aug 27 21:36:09 2015 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Thu Aug 27 21:36:13 2015 Subject: [squeak-dev] #initialize to superclass [was Re: [squeak-dev] The Trunk: Tests-mt.329.mcz] Message-ID: Hi Levente, On Thu, Aug 27, 2015 at 5:14 AM, Levente Uzonyi wrote: > Unless you have a very good reason to send #initialize to the superclass, > you shouldn't do it. > > So, I have two questions: 1 - why should we not do this? 2 - if we shouldn't do it, then why does the system ALWAYS bug us about not overriding #initialize when adding that method to the class side? I am in the habit of adding it - because the message pops up, and I suppose the system has a good reason for us to not override it. Maybe just a bad habit on my part. thanks, cbc > Levente > > > On Thu, 27 Aug 2015, commits@source.squeak.org wrote: > > Marcel Taeumel uploaded a new version of Tests to project The Trunk: >> http://source.squeak.org/trunk/Tests-mt.329.mcz >> >> ==================== Summary ==================== >> >> Name: Tests-mt.329 >> Author: mt >> Time: 27 August 2015, 11:12:04.169 am >> UUID: 2665a1ed-6312-1845-8181-d83c588cd161 >> Ancestors: Tests-mt.328 >> >> Fixes initialization problem with test preferences. >> >> =============== Diff against Tests-mt.328 =============== >> >> Item was added: >> + ----- Method: PreferencesTestPreferences class>>initialize (in category >> 'class initialization') ----- >> + initialize >> + >> + super initialize. >> + self initializeDictionaryOfPreferences.! >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150827/222fc873/attachment.htm From commits at source.squeak.org Thu Aug 27 21:37:07 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 27 21:37:09 2015 Subject: [squeak-dev] The Trunk: Installer-Core-topa.401.mcz Message-ID: Tobias Pape uploaded a new version of Installer-Core to project The Trunk: http://source.squeak.org/trunk/Installer-Core-topa.401.mcz ==================== Summary ==================== Name: Installer-Core-topa.401 Author: topa Time: 27 August 2015, 11:36:57.855 pm UUID: 67e2b760-0986-4b40-a9cf-f36a951e48fb Ancestors: Installer-Core-cmm.400 Gemstone.com is deprecated long enough now that it does not respond any longer. =============== Diff against Installer-Core-cmm.400 =============== Item was changed: ----- Method: Installer class>>gemsource (in category 'repositories') ----- gemsource + ^ self monticello http: 'http://seaside.gemtalksystems.com/ss'! - ^ self monticello http: 'http://seaside.gemstone.com/ss'! From commits at source.squeak.org Thu Aug 27 21:40:13 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 27 21:40:16 2015 Subject: [squeak-dev] The Trunk: System-topa.763.mcz Message-ID: Tobias Pape uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-topa.763.mcz ==================== Summary ==================== Name: System-topa.763 Author: topa Time: 27 August 2015, 11:39:32.305 pm UUID: 8731d6a1-ac9a-4cb9-90cf-92400d1289d2 Ancestors: System-mt.762 since any system event fires #prefEvent:, any addition of a class side method with some pragma will fire #addPragmaPreference. So instead of bailing, just do nothing when the method is in fact no pref. =============== Diff against System-mt.762 =============== Item was changed: ----- Method: Preferences class>>addPragmaPreference: (in category 'add/remove') ----- addPragmaPreference: pragma "Note that there will be no accessor method generated because the pragma's method does already govern that." | preference | - self assert: pragma methodClass isMeta. ((pragma keyword beginsWith: #preference:) and: [self respondsTo: pragma keyword]) + ifFalse: [ + "no pragma pref to be defined. do nothing" + ^ self]. + self assert: pragma methodClass isMeta. - ifFalse: [Error signal: 'Cannot create pragma preference object.'. ^ self]. preference := self perform: pragma keyword withArguments: pragma arguments. preference provider: pragma methodClass theNonMetaClass getter: pragma method selector setter: pragma method selector asMutator. self atomicUpdatePreferences: [ :copyOfDictionaryOfPreferences | copyOfDictionaryOfPreferences at: preference id put: preference]. ^ preference! From commits at source.squeak.org Thu Aug 27 21:47:44 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 27 21:47:45 2015 Subject: [squeak-dev] The Trunk: System-topa.764.mcz Message-ID: Tobias Pape uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-topa.764.mcz ==================== Summary ==================== Name: System-topa.764 Author: topa Time: 27 August 2015, 11:47:04.664 pm UUID: c205a736-8aff-48c5-8b3b-24ec808d19fd Ancestors: System-topa.763 Do not return nil for unknown preferences in dNU magic but rather bail. =============== Diff against System-topa.763 =============== Item was changed: ----- Method: Preferences class>>doesNotUnderstand: (in category 'get/set') ----- doesNotUnderstand: aMessage "Interpret unary message selectors as preference id." ^ aMessage arguments size > 0 ifTrue: [super doesNotUnderstand: aMessage] + ifFalse: [ + self + valueOfPreference: aMessage selector + ifAbsent: [super doesNotUnderstand: aMessage]]! - ifFalse: [self valueOfPreference: aMessage selector]! From commits at source.squeak.org Thu Aug 27 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 27 21:55:03 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150827215502.2082.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-August/008910.html Name: System-mt.761 Ancestors: System-eem.760 Clean-up of preferences interface. Includes some bugfixes for updating pragma preferences after a class is renamed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008911.html Name: Tests-mt.328 Ancestors: Tests-eem.327 New tests for preferences. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008912.html Name: Services-Base-mt.57 Ancestors: Services-Base-eem.56 Some adjustments for cleaned-up preferences interface. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008913.html Name: ST80-mt.185 Ancestors: ST80-mt.184 Some adjustments for cleaned-up preferences interface. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008914.html Name: PreferenceBrowser-mt.54 Ancestors: PreferenceBrowser-mt.53 Some adjustments for cleaned-up preferences interface. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008915.html Name: Network-mt.162 Ancestors: Network-cmm.161 Some adjustments for cleaned-up preferences interface. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008916.html Name: Morphic-mt.1000 Ancestors: Morphic-mt.999 Some adjustments for cleaned-up preferences interface. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008917.html Name: MorphicExtras-mt.166 Ancestors: MorphicExtras-ul.165 Some adjustments for cleaned-up preferences interface. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008918.html Name: System-mt.762 Ancestors: System-mt.761 Restores #togglePreference: for backwards compatibility. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008919.html Name: Tests-mt.329 Ancestors: Tests-mt.328 Fixes initialization problem with test preferences. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008920.html Name: Morphic-mt.1001 Ancestors: Morphic-mt.1000 Fixes a regression where scroll panes want to grow but the parent morph does not update its layout accordingly. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008921.html Name: Installer-Core-topa.401 Ancestors: Installer-Core-cmm.400 Gemstone.com is deprecated long enough now that it does not respond any longer. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008922.html Name: System-topa.763 Ancestors: System-mt.762 since any system event fires #prefEvent:, any addition of a class side method with some pragma will fire #addPragmaPreference. So instead of bailing, just do nothing when the method is in fact no pref. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008923.html Name: System-topa.764 Ancestors: System-topa.763 Do not return nil for unknown preferences in dNU magic but rather bail. ============================================= From eliot.miranda at gmail.com Thu Aug 27 22:41:53 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Aug 27 22:41:56 2015 Subject: [squeak-dev] Changing the update map name Message-ID: Hi David, Hi All, I see a couple of issues with the update map name I can't solve. First, the change made in May to use a default McMcmUpdater instance means that the update map name is cached in the instance and I don't see how changing it in the Preferences browser would either flush the default instance or update the default instance's updateMapName. Second, changing the update map name in the Preferences browser has no effect. This seems to be because there's a conflict between the instance creation message for an McMcmUpdater: McMcmUpdater class>>updateMapName: baseName "Answer a new instance with a base update name baseName such as 'update' or 'update.oscog' " ^ self new updateMapName: baseName and that this is used as the default setter for the preference: McMcmUpdater class>>updateMapName "Name for update map, without version info" ^UpdateMapName ifNil: ['update'] So I guess that we could rename the instance creation message to be forUpdateMapName: or simply nuke it. i.e. this McMcmUpdater class>>default "The default instance for system updates. Uses a default update map name that may be set as a preference to enable a specific update stream for a repository." ^ self updaters at: self defaultUpdateURL ifAbsentPut: [self updateMapName: self updateMapName] would become McMcmUpdater class>>default "The default instance for system updates. Uses a default update map name that may be set as a preference to enable a specific update stream for a repository." ^ self updaters at: self defaultUpdateURL ifAbsentPut: [self forUpdateMapName: self updateMapName] or McMcmUpdater class>>default "The default instance for system updates. Uses a default update map name that may be set as a preference to enable a specific update stream for a repository." ^ self updaters at: self defaultUpdateURL ifAbsentPut: [self new updateMapName: self updateMapName] and updateMapName: would become McMcmUpdater class>> updateMapName: aString UpdateMapName := aString _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150827/e161ae45/attachment.htm From commits at source.squeak.org Thu Aug 27 22:56:39 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Aug 27 22:56:41 2015 Subject: [squeak-dev] The Trunk: Traits-eem.306.mcz Message-ID: Eliot Miranda uploaded a new version of Traits to project The Trunk: http://source.squeak.org/trunk/Traits-eem.306.mcz ==================== Summary ==================== Name: Traits-eem.306 Author: eem Time: 27 August 2015, 3:56:23.871 pm UUID: 17370ed0-0211-4deb-a99b-4678a8eddea1 Ancestors: Traits-ul.305 Save a version of Traits that resets the format of existing traits if they were wrong. The Spur bootstrap failed to reset Trait formats so they were left at the V3 value for a zero inst sized pointer class, or 2. =============== Diff against Traits-ul.305 =============== Item was added: + (PackageInfo named: 'Traits') preamble: '"Update traits to have zero inst size. the Spur bootstrap failed to reset Trait formats so they were left at the V3 value for a zero inst sized pointer class, or 2" + Smalltalk allTraits do: + [:t| + t instSize > 0 ifTrue: + [t setFormat: 0]]'! From pdebruic at gmail.com Thu Aug 27 23:00:17 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Thu Aug 27 23:05:29 2015 Subject: [squeak-dev] Re: The Trunk: Traits-eem.306.mcz In-Reply-To: References: Message-ID: <1440716417971-4846452.post@n4.nabble.com> Thanks. I'll try again with Fuel soon. commits-2 wrote > Eliot Miranda uploaded a new version of Traits to project The Trunk: > http://source.squeak.org/trunk/Traits-eem.306.mcz > > ==================== Summary ==================== > > Name: Traits-eem.306 > Author: eem > Time: 27 August 2015, 3:56:23.871 pm > UUID: 17370ed0-0211-4deb-a99b-4678a8eddea1 > Ancestors: Traits-ul.305 > > Save a version of Traits that resets the format of existing traits if they > were wrong. The Spur bootstrap failed to reset Trait formats so they were > left at the V3 value for a zero inst sized pointer class, or 2. > > =============== Diff against Traits-ul.305 =============== > > Item was added: > + (PackageInfo named: 'Traits') preamble: '"Update traits to have zero > inst size. the Spur bootstrap failed to reset Trait formats so they were > left at the V3 value for a zero inst sized pointer class, or 2" > + Smalltalk allTraits do: > + [:t| > + t instSize > 0 ifTrue: > + [t setFormat: 0]]'! -- View this message in context: http://forum.world.st/The-Trunk-Traits-eem-306-mcz-tp4846451p4846452.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Fri Aug 28 00:04:25 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 28 00:04:26 2015 Subject: [squeak-dev] The Trunk: Morphic-eem.1002.mcz Message-ID: Eliot Miranda uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-eem.1002.mcz ==================== Summary ==================== Name: Morphic-eem.1002 Author: eem Time: 27 August 2015, 5:03:26.429 pm UUID: d94fff6d-5fef-4500-9144-4dc8bfa1510e Ancestors: Morphic-mt.1001 It's really convenient to be able to identify MenuItemMorphs easily. =============== Diff against Morphic-mt.1001 =============== Item was added: + ----- Method: MenuItemMorph>>isMenuItemMorph (in category 'testing') ----- + isMenuItemMorph + ^true! Item was added: + ----- Method: Morph>>isMenuItemMorph (in category 'testing') ----- + isMenuItemMorph + ^false! From commits at source.squeak.org Fri Aug 28 00:09:22 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 28 00:09:23 2015 Subject: [squeak-dev] The Trunk: Monticello-eem.617.mcz Message-ID: Eliot Miranda uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-eem.617.mcz ==================== Summary ==================== Name: Monticello-eem.617 Author: eem Time: 27 August 2015, 5:09:02.395 pm UUID: 4330481f-87ae-4d7b-b2aa-0969f0611256 Ancestors: Monticello-cmm.616 Add a menu item to nuke Monticello load change sets. This is more involved than it should be but we're getting there. Needs Morphic-eem.1002 =============== Diff against Monticello-cmm.616 =============== Item was added: + ----- Method: ChangeSet>>isForPackageLoad (in category '*Monticello-testing') ----- + isForPackageLoad + | packageName | + ^(name includes: $-) + and: [name last isDigit + and: [packageName := name first: ((name indexOf: $. ifAbsent: [name size]) + min: (name lastIndexOf: $-)) - 1. + MCWorkingCopy allManagers anySatisfy: [:wc| wc packageName = packageName]]]! Item was added: + ----- Method: ChangeSorter>>deleteMonticelloChangeSets (in category '*Monticello-changeSet menu') ----- + deleteMonticelloChangeSets + "Destroy all change sets from Monticello loads, provided the currently selected change set is not one of those, and the user really wants to do this." + + myChangeSet isForPackageLoad ifTrue: "forms current changes for current project" + [^self inform: 'current change set is a Monticello load change set.\Please select some other change set before deleting Monticello load change sets.' withCRs]. + (self confirm: 'Are you sure you want to delete all change sets due to Monticello package loads?') ifFalse: + [^self]. + + (ChangesOrganizer allChangeSets select: [:cs| cs isForPackageLoad]) do: + [:cs| ChangesOrganizer removeChangeSet: cs]. + + self changed: #changeSetList. + self showChangeSet: ChangeSet current! Item was added: + ----- Method: ChangeSorter>>monticelloChangeSetMenu: (in category '*Monticello-changeSet menu') ----- + monticelloChangeSetMenu: aMenu + + + "Sigh, when implementing menu pragmas this is not what I had in mind..." + aMenu add: 'delete Monticello load change sets' action: #deleteMonticelloChangeSets. + (aMenu submorphs + detect: [:m| m isMenuItemMorph and: [m contents beginsWith: 'destroy change set']] + ifNone: []) ifNotNil: + [:destroyItem| | item | + aMenu removeMorph: (item := aMenu submorphs last). + aMenu addMorph: item after: destroyItem]. + ^aMenu! From eliot.miranda at gmail.com Fri Aug 28 00:15:53 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Aug 28 00:15:56 2015 Subject: [Pharo-dev] [squeak-dev] #instSize in Squeak 5 seems to be broken for Traits In-Reply-To: <1C22E03E-628F-42AF-AAA8-10C86122FA93@gmail.com> References: <5DFA10FA-2A89-4898-94DB-156C4DD25AF0@gmail.com> <1C22E03E-628F-42AF-AAA8-10C86122FA93@gmail.com> Message-ID: Hi Max, fixed in Squeak via a preamble in a new version of Traits. I must remember to fix this in the bootstrap so that it doesn't afflict Pharo Spur. On Sun, Aug 23, 2015 at 4:34 AM, Max Leske wrote: > > On 22 Aug 2015, at 19:21, Eliot Miranda wrote: > > Hi Max, > > On Fri, Aug 21, 2015 at 2:11 PM, Max Leske wrote: > >> >> On 21 Aug 2015, at 19:31, Eliot Miranda wrote: >> >> Hi Max, >> >> On Fri, Aug 21, 2015 at 8:57 AM, Max Leske wrote: >> >>> Hi folks >>> >>> I?ve been trying to load Fuel into Squeak 5 but can?t because I get >>> errors when loading Traits (they have not instance variables). The reason >>> for this error seems to be that #instSize answers 2 for Traits when it >>> should answer 0. >>> >>> The current implementation is: >>> >>> ^format bitAnd: 16rFFFF >>> >>> The comment in the 4.6 version says: >>> >>> " >>> NOTE: This code supports the backward-compatible extension to 8 >>> bits of instSize. >>> When we revise the image format, it should become... >>> ^ ((format bitShift: -1) bitAnd: 16rFF) - 1 >>> Note also that every other method in this category will require >>> 2 bits more of right shift after the change. >>> ? >>> >>> When I use that version in TraitBehaviour>>instSize in Squeak 5 I get 0 >>> as expected and I can load Fuel without problems. >>> >> >> So Spur has a different layout for format than V3. The above >> implementation (format bitAnd: 16rFFFF) is correct for Spur. In loading >> classes or traits via Fuel from 4.6 to 5.0 you're going to have to convert >> the format inst var to reflect its usage in Spur. So we need to be clear >> here. >> >> Is the issue that you're trying to load classes and/or traits from a Fuel >> file written by 4.6 or is it that as part of the Fuel load a new Trait gets >> created which has a format of 2? >> >> >> The latter. This is reproducible by simply creating a new Trait: >> >> Trait named: #NewTrait >> uses: #() >> category: ?new cat?. >> NewTrait instSize ??> 2? >> > > I just took a look at this and it doesn't reproduce. I'm using a trunk > Squeak 5 image and I get 0 and required. ? > > > Thanks Eliot. You?re right. The problem is not with #instSize, I don?t > know how I managed to get the above? > > The problem is actually, that TApplyingOnClassSide (which is already > present) has a format of 2: > > TApplyingOnClassSide instSize ??> 2? > > > Also, all Traits in the image have format 2, while new Traits have format > 0: > > format2 := Smalltalk allTraits select: [ :e | e format = 2 ]. > Smalltalk allTraits size = format2 size ??> true" > > Trait named: #NewTrait > uses: #() > category: 'new cat?. > > NewTrait instSize ??> 0" > format2 := Smalltalk allTraits select: [ :e | e format = 2 ]. > Smalltalk allTraits size = format2 size ??> false? > > > This is with build 15113 (which is trunk I suppose). > > Cheers, > Max > > > Cheers, >> Max >> >> >> >>> Cheers, >>> Max >>> >> >> >> >> -- >> _,,,^..^,,,_ >> best, Eliot >> >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150827/ac8d0301/attachment.htm From tim at rowledge.org Fri Aug 28 00:59:01 2015 From: tim at rowledge.org (tim Rowledge) Date: Fri Aug 28 00:59:09 2015 Subject: [squeak-dev] Updating SAR builder tool Message-ID: <02A6AB19-EEF7-4E42-AFE9-9C90FD6E5DAB@rowledge.org> I?m looking into using .sar files as a way of delivering Scratch device driver stuff for the Raspberry Pi. It?s been more than a few years since I last had to think about SARs (actually from my emails it looks like 2004 was the last time!) so a bit of trawling through the swiki was in order. I?ve updated a couple of pages relating to SARs to (hopefully) make them a touch more useful these days, and just tried loading the very old SARBuilder package from SqueakMap. Don?t forget that you have to hit the menu in the top-left list of the Squeakmap tool in order to turn off the filtering that makes it invisible since it isn?t thoroughly up to date. It installs ok after using Preferences to allow underscores as assignment; so there is one update needed in the code. It even appears to run its example (SARChangeSetDumper class>>example1) ok. However, it clearly needs some updates to make it a better citizen; for example it completely overwrites the ChangeSorter>>changeSetMenu:shifted: method. I don?t have any time to clean it up right now since I have a release to assemble for about 7 million Pi?s. It seems like it might be a relatively simple fixup to make an old tool usable once more. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: RLB: Ruin Logic Board From lewis at mail.msen.com Fri Aug 28 01:10:35 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Aug 28 01:10:38 2015 Subject: [squeak-dev] Changing the update map name In-Reply-To: References: Message-ID: <20150828011035.GA98083@shell.msen.com> Eliot, You're right, there is a bug in the update map name preference handling. I'll see if I can fix it (but maybe not tonight). Background: The default updater is not a singleton, it is one of possibly many updaters. So changing the 'Update URL' or 'Update map name' preference does not modify a single updater, instead it should answer the appropriate updater for the given URL and update map name. In an up to date 5.0 trunk image, if I open a PreferenceBrowser and change the 'Update URL' preference, then MCMcmUpdater default answers the corresponding updater. However, the 'Update map name' in the preferences browser is not letting me enter a new name and that is a bug. As you note, there is a conflict between the methods for instance creation and the accidentally duplicate method names for preferences. Dave On Thu, Aug 27, 2015 at 03:41:53PM -0700, Eliot Miranda wrote: > Hi David, Hi All, > > I see a couple of issues with the update map name I can't solve. First, > the change made in May to use a default McMcmUpdater instance means that > the update map name is cached in the instance and I don't see how changing > it in the Preferences browser would either flush the default instance or > update the default instance's updateMapName. Second, changing the update > map name in the Preferences browser has no effect. This seems to be > because there's a conflict between the instance creation message for an > McMcmUpdater: > > McMcmUpdater class>>updateMapName: baseName > "Answer a new instance with a base update name baseName such as > 'update' or 'update.oscog' " > > ^ self new updateMapName: baseName > > and that this is used as the default setter for the preference: > > McMcmUpdater class>>updateMapName > "Name for update map, without version info" > > category: 'updates' > description: 'Base name for the update maps' > type: #String> > > ^UpdateMapName ifNil: ['update'] > > So I guess that we could rename the instance creation message to be > forUpdateMapName: or simply nuke it. i.e. this > > McMcmUpdater class>>default > "The default instance for system updates. Uses a default update map > name that may be set as a preference to enable a specific update stream > for a repository." > > ^ self updaters > at: self defaultUpdateURL > ifAbsentPut: [self updateMapName: self updateMapName] > > would become > > McMcmUpdater class>>default > "The default instance for system updates. Uses a default update map > name that may be set as a preference to enable a specific update stream > for a repository." > > ^ self updaters > at: self defaultUpdateURL > ifAbsentPut: [self forUpdateMapName: self updateMapName] > > or > > McMcmUpdater class>>default > "The default instance for system updates. Uses a default update map > name that may be set as a preference to enable a specific update stream > for a repository." > > ^ self updaters > at: self defaultUpdateURL > ifAbsentPut: [self new updateMapName: self updateMapName] > > and updateMapName: would become > > McMcmUpdater class>> updateMapName: aString > > UpdateMapName := aString > > > _,,,^..^,,,_ > best, Eliot > From lewis at mail.msen.com Fri Aug 28 01:19:12 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Aug 28 01:19:13 2015 Subject: [squeak-dev] Updating SAR builder tool In-Reply-To: <02A6AB19-EEF7-4E42-AFE9-9C90FD6E5DAB@rowledge.org> References: <02A6AB19-EEF7-4E42-AFE9-9C90FD6E5DAB@rowledge.org> Message-ID: <20150828011912.GB98083@shell.msen.com> Base support for SAR formats should definitely be supported. I don't know why we lost it, but I do exactly what you did - load the old code when I need it, for example to support UTCDateAndTime http://wiki.squeak.org/squeak/6197 for which a SAR distribution is the only thing could possible work. So yes, someone should pick up the important bits and put them back into trunk. Dave On Thu, Aug 27, 2015 at 05:59:01PM -0700, tim Rowledge wrote: > I?m looking into using .sar files as a way of delivering Scratch device driver stuff for the Raspberry Pi. It?s been more than a few years since I last had to think about SARs (actually from my emails it looks like 2004 was the last time!) so a bit of trawling through the swiki was in order. I?ve updated a couple of pages relating to SARs to (hopefully) make them a touch more useful these days, and just tried loading the very old SARBuilder package from SqueakMap. Don?t forget that you have to hit the menu in the top-left list of the Squeakmap tool in order to turn off the filtering that makes it invisible since it isn?t thoroughly up to date. > > It installs ok after using Preferences to allow underscores as assignment; so there is one update needed in the code. It even appears to run its example (SARChangeSetDumper class>>example1) ok. However, it clearly needs some updates to make it a better citizen; for example it completely overwrites the ChangeSorter>>changeSetMenu:shifted: method. > > I don?t have any time to clean it up right now since I have a release to assemble for about 7 million Pi?s. It seems like it might be a relatively simple fixup to make an old tool usable once more. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: RLB: Ruin Logic Board > > From Das.Linux at gmx.de Fri Aug 28 05:56:29 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Aug 28 05:56:34 2015 Subject: [squeak-dev] The Trunk: Monticello-eem.617.mcz Message-ID: <41C01C00-13BF-42D8-BCCB-E6E56550B92C@gmx.de> Hi Eliot, On 28.08.2015, at 00:09, commits@source.squeak.org wrote: > Item was added: > + ----- Method: ChangeSorter>>monticelloChangeSetMenu: (in category '*Monticello-changeSet menu') ----- > + monticelloChangeSetMenu: aMenu > + > + > + "Sigh, when implementing menu pragmas this is not what I had in mind..." > + aMenu add: 'delete Monticello load change sets' action: #deleteMonticelloChangeSets. > + (aMenu submorphs > + detect: [:m| m isMenuItemMorph and: [m contents beginsWith: 'destroy change set']] > + ifNone: []) ifNotNil: > + [:destroyItem| | item | > + aMenu removeMorph: (item := aMenu submorphs last). > + aMenu addMorph: item after: destroyItem]. > + ^aMenu! Can you explain what you want to achieve and how I can make this more convenient? Best regards -Tobias From edgardec2005 at gmail.com Fri Aug 28 07:51:36 2015 From: edgardec2005 at gmail.com (Edgar De Cleene) Date: Fri Aug 28 07:51:45 2015 Subject: [squeak-dev] Updating SAR builder tool In-Reply-To: <20150828011912.GB98083@shell.msen.com> References: <02A6AB19-EEF7-4E42-AFE9-9C90FD6E5DAB@rowledge.org> <20150828011912.GB98083@shell.msen.com> Message-ID: <0B7902AB-FBEF-4235-BC1B-E133EFBFB7C0@gmail.com> And why do not take my idea of have a Monticello thing what mimics .sar ? I have working demos on Squeak 5.0, if time lets record a short video and upload to YouTube this week end. > On Aug 27, 2015, at 10:19 PM, David T. Lewis wrote: > > Base support for SAR formats should definitely be supported. I don't know > why we lost it, but I do exactly what you did - load the old code when I need > it, for example to support UTCDateAndTime http://wiki.squeak.org/squeak/6197 > for which a SAR distribution is the only thing could possible work. > > So yes, someone should pick up the important bits and put them back into trunk. > > Dave > > > On Thu, Aug 27, 2015 at 05:59:01PM -0700, tim Rowledge wrote: >> I?m looking into using .sar files as a way of delivering Scratch device driver stuff for the Raspberry Pi. It?s been more than a few years since I last had to think about SARs (actually from my emails it looks like 2004 was the last time!) so a bit of trawling through the swiki was in order. I?ve updated a couple of pages relating to SARs to (hopefully) make them a touch more useful these days, and just tried loading the very old SARBuilder package from SqueakMap. Don?t forget that you have to hit the menu in the top-left list of the Squeakmap tool in order to turn off the filtering that makes it invisible since it isn?t thoroughly up to date. >> >> It installs ok after using Preferences to allow underscores as assignment; so there is one update needed in the code. It even appears to run its example (SARChangeSetDumper class>>example1) ok. However, it clearly needs some updates to make it a better citizen; for example it completely overwrites the ChangeSorter>>changeSetMenu:shifted: method. >> >> I don?t have any time to clean it up right now since I have a release to assemble for about 7 million Pi?s. It seems like it might be a relatively simple fixup to make an old tool usable once more. >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> Strange OpCodes: RLB: Ruin Logic Board >> >> > From Marcel.Taeumel at hpi.de Fri Aug 28 07:50:46 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Aug 28 07:56:00 2015 Subject: #initialize to superclass [was Re: [squeak-dev] The Trunk: Tests-mt.329.mcz] In-Reply-To: References: Message-ID: <1440748246024-4846516.post@n4.nabble.com> Iff the class-side #initialize changes, it will be re-executed. The Editor class hierarchy overrides #initialize w/o sending super but helper methods (e.g. #initializeCmdKeyShortcuts), which do send super. I wonder, why. :) Best, Marcel -- View this message in context: http://forum.world.st/initialize-to-superclass-was-Re-squeak-dev-The-Trunk-Tests-mt-329-mcz-tp4846439p4846516.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Fri Aug 28 07:52:21 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Aug 28 07:57:35 2015 Subject: [squeak-dev] Re: The Trunk: System-topa.764.mcz In-Reply-To: References: Message-ID: <1440748341721-4846519.post@n4.nabble.com> Not good for old projects... :-/ Anyway, we might get rid of this DNU trick completely... Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-System-topa-764-mcz-tp4846445p4846519.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Fri Aug 28 08:02:31 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 28 08:02:31 2015 Subject: [squeak-dev] The Trunk: System-mt.765.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.765.mcz ==================== Summary ==================== Name: System-mt.765 Author: mt Time: 28 August 2015, 10:02:11.682 am UUID: b40396ff-9c0f-bb46-9317-779e2ccb6448 Ancestors: System-topa.764 For consistency, also support setting and restoring regular preference within the scope of a block. Like flags (i.e. boolean preferences) support it. =============== Diff against System-topa.764 =============== Item was added: + ----- Method: Preferences class>>setPreference:toValue:during: (in category 'get/set') ----- + setPreference: prefSymbol toValue: anObject during: aBlock + + (self valueOfPreference: prefSymbol) in: [:previous | + self setPreference: prefSymbol toValue: anObject. + aBlock ensure: [self setPreference: prefSymbol toValue: previous]].! From commits at source.squeak.org Fri Aug 28 08:34:17 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 28 08:34:19 2015 Subject: [squeak-dev] The Trunk: EToys-kfr.127.mcz Message-ID: Marcel Taeumel uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-kfr.127.mcz ==================== Summary ==================== Name: EToys-kfr.127 Author: kfr Time: 6 May 2015, 8:58:58.372 pm UUID: 78d9ce0c-9ee9-0c40-85cf-3fc29198913c Ancestors: EToys-kfr.126 Enhance color settings in PreferenceBrowser towards using more fillstyles for color and borders than just solid fill. =============== Diff against EToys-kfr.126 =============== Item was changed: PBPreferenceView subclass: #PBColorPreferenceView + instanceVariableNames: 'button' - instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Etoys-PreferenceBrowser'! Item was added: + ----- Method: PBColorPreferenceView>>adjustLabelColor (in category 'user interface') ----- + adjustLabelColor + | textColor | + (self preference preferenceValue luminance < 0.5) + ifTrue:[ textColor := Color white] + ifFalse:[ textColor := Color black]. + button allMorphsDo: [:m | (m isKindOf: StringMorph) ifTrue: [ m color: textColor]]. ! Item was added: + ----- Method: PBColorPreferenceView>>borderStyleMenu (in category 'user interface') ----- + borderStyleMenu + "Add border-style menu items" + + | aMenu | + aMenu := MenuMorph new defaultTarget: self. + + aMenu addStayUpItemSpecial. + aMenu add: 'border color...' translated target: self selector:#changeColor: argument: button. + aMenu addLine. + BorderStyle borderStyleChoices do: + [:sym | (aMenu borderStyleForSymbol: sym) + ifNotNil: + [aMenu add: sym translated target: self selector: #setBorderStyle: argument: sym]]. + ^aMenu openNear: ActiveHand bounds. + ! Item was added: + ----- Method: PBColorPreferenceView>>changeColor: (in category 'user interface') ----- + changeColor: aButton + aButton changeColor. + self preference preferenceValue: aButton fillStyle. + button label: self preference preferenceValue asString. + self adjustLabelColor ! Item was added: + ----- Method: PBColorPreferenceView>>colorMenuButton (in category 'user interface') ----- + colorMenuButton + | selector name | + name := self preference name. + (name includesSubstring: 'border' caseSensitive: false) + ifTrue: [ selector := #borderStyleMenu] + ifFalse:[ selector := #fillStyleMenu]. + button := SimpleButtonMorph new + label: self preference preferenceValue asString; + actionSelector: selector; + target: self. + name = #menuBorderColor + ifTrue:[ ^button borderColor: MenuMorph menuBorderColor; borderWidth: MenuMorph menuBorderWidth]. + name = #menuTitleBorderColor + ifTrue:[ ^button borderColor: MenuMorph menuTitleBorderColor; borderWidth: MenuMorph menuTitleBorderWidth]. + self adjustLabelColor. + ^button color: (self preference provider perform: (self preference selectors first)). + + + "UpdatingRectangleMorph new + target: self preference; + getSelector: #preferenceValue; + putSelector: #preferenceValue:; + extent: 22@22; + setBalloonText: 'click here to change the color' translated; + yourself."! Item was added: + ----- Method: PBColorPreferenceView>>fillStyleMenu (in category 'user interface') ----- + fillStyleMenu + "Add the items for changing the current fill style of the Morph" + | aMenu | + "self canHaveFillStyles ifFalse:[^aMenu add: 'change color...' translated target: self action: #changeColor]." + aMenu := MenuMorph new defaultTarget: self. + "self preference preferenceValue addFillStyleMenuItems: aMenu hand: nil from: self." + aMenu add: 'change color...' translated target: self selector:#changeColor: argument: button. + aMenu addLine. + aMenu add: 'solid fill' translated action: #useSolidFill. + "aMenu add: 'gradient fill' translated action: #useGradientFill. + aMenu add: 'bitmap fill' translated action: #useBitmapFill. + aMenu add: 'default fill' translated action: #useDefaultFill." + ^aMenu openNear: ActiveHand bounds. + ! Item was changed: ----- Method: PBColorPreferenceView>>representativeButtonWithColor:inPanel: (in category 'user interface') ----- representativeButtonWithColor: aColor inPanel: aPreferenceBrowser ^self horizontalPanel layoutInset: 2; color: aColor; cellInset: 20; cellPositioning: #center; addMorphBack: (StringMorph contents: self preference name); addMorphBack: self horizontalFiller; + addMorphBack: self colorMenuButton; - addMorphBack: self colorSwatch; yourself! Item was added: + ----- Method: PBColorPreferenceView>>setBorderStyle: (in category 'user interface') ----- + setBorderStyle: aBorderStyle + self preference name = #menuBorderColor + ifTrue: [button color: MenuMorph menuColor; + borderWidth: MenuMorph menuBorderWidth]. + self preference name = #menuTitleBorderColor + ifTrue: [button color: MenuMorph menuTitleColor; + borderWidth: MenuMorph menuTitleBorderWidth]. + self preference preferenceValue: aBorderStyle. + button label: self preference preferenceValue asString; + borderColor: aBorderStyle. + ! Item was added: + ----- Method: PBColorPreferenceView>>useGradientFill (in category 'user interface') ----- + useGradientFill + + "Make receiver use a solid fill style (e.g., a simple color)" + + + | color1 color2 fill | + self preference preferenceValue isGradientFill ifTrue:[^self]. "Already done" + color1 := Color white darker. + color2 := self preference preferenceValue asColor. + fill := GradientFillStyle ramp: {0.0 -> color1. 1.0 -> color2}. + fill origin: ActiveWorld topLeft. + fill direction: 0 @ ActiveWorld bounds extent y. + fill normal: ActiveWorld bounds extent x @ 0. + fill radial: false. + self preference preferenceValue: fill. + button label: self preference preferenceValue asString; + color: self preference preferenceValue! Item was added: + ----- Method: PBColorPreferenceView>>useSolidFill (in category 'user interface') ----- + useSolidFill + "Make receiver use a solid fill style (e.g., a simple color)" + self preference preferenceValue isSolidFill ifTrue:[^self]. "Already done" + self preference preferenceValue: self preference preferenceValue asColor. "Try minimizing changes" + + button label: self preference preferenceValue asString; + color: self preference preferenceValue + ! From squeaklist at gmail.com Fri Aug 28 08:35:48 2015 From: squeaklist at gmail.com (Kjell Godo) Date: Fri Aug 28 08:35:51 2015 Subject: [squeak-dev] The Trunk: Monticello-eem.617.mcz In-Reply-To: <41C01C00-13BF-42D8-BCCB-E6E56550B92C@gmx.de> References: <41C01C00-13BF-42D8-BCCB-E6E56550B92C@gmx.de> Message-ID: Pardon me for butting in but I am interested in creating a new Class of pop up menu in Pharo that doesn't look or act anything like the standard pop up Menus and I would like to know where in the Pharo code I can get between a right click and its pop up Menu opening and open up my own MyMenu instead of the standard Menu I'm guessing i should start with the Menu Class and maybe make MyMenu be a subClass of Menu? Should i ask questions like this on stack overflow instead? It seems to me that the following monticelloChangeSetMenu: code is Adding an new item mc to aMenu finding a different menu item dc in aMenu if dc exists remove the mc item from aMenu and add mc right after dc in aMenu I don't know what a is can you point me at an explanation? Does it allow a Method to be selected at runtime according to its pragmas? On Thursday, August 27, 2015, Tobias Pape wrote: > Hi Eliot, > > On 28.08.2015, at 00:09, commits@source.squeak.org wrote: > > > Item was added: > > + ----- Method: ChangeSorter>>monticelloChangeSetMenu: (in category > '*Monticello-changeSet menu') ----- > > + monticelloChangeSetMenu: aMenu > > + > > + > > + "Sigh, when implementing menu pragmas this is not what I had in > mind..." > > + aMenu add: 'delete Monticello load change sets' action: > #deleteMonticelloChangeSets. > > + (aMenu submorphs > > + detect: [:m| m > isMenuItemMorph and: [m contents beginsWith: 'destroy change set']] > > + ifNone: []) ifNotNil: > > + [:destroyItem| | item | > > + aMenu removeMorph: (item := aMenu submorphs last). > > + aMenu addMorph: item after: destroyItem]. > > + ^aMenu! > > Can you explain what you want to achieve > and how I can make this more convenient? > > Best regards > -Tobias > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150828/b30af5c8/attachment.htm From commits at source.squeak.org Fri Aug 28 08:36:23 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 28 08:36:24 2015 Subject: [squeak-dev] The Trunk: EToys-mt.128.mcz Message-ID: Marcel Taeumel uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-mt.128.mcz ==================== Summary ==================== Name: EToys-mt.128 Author: mt Time: 28 August 2015, 10:36:06.065 am UUID: 2d230745-ba1d-6941-aeac-de15f18bbfbf Ancestors: EToys-ul.127, EToys-kfr.127 Merge additions to color preferences from kfr. =============== Diff against EToys-ul.127 =============== Item was changed: PBPreferenceView subclass: #PBColorPreferenceView + instanceVariableNames: 'button' - instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Etoys-PreferenceBrowser'! Item was added: + ----- Method: PBColorPreferenceView>>adjustLabelColor (in category 'user interface') ----- + adjustLabelColor + | textColor | + (self preference preferenceValue luminance < 0.5) + ifTrue:[ textColor := Color white] + ifFalse:[ textColor := Color black]. + button allMorphsDo: [:m | (m isKindOf: StringMorph) ifTrue: [ m color: textColor]]. ! Item was added: + ----- Method: PBColorPreferenceView>>borderStyleMenu (in category 'user interface') ----- + borderStyleMenu + "Add border-style menu items" + + | aMenu | + aMenu := MenuMorph new defaultTarget: self. + + aMenu addStayUpItemSpecial. + aMenu add: 'border color...' translated target: self selector:#changeColor: argument: button. + aMenu addLine. + BorderStyle borderStyleChoices do: + [:sym | (aMenu borderStyleForSymbol: sym) + ifNotNil: + [aMenu add: sym translated target: self selector: #setBorderStyle: argument: sym]]. + ^aMenu openNear: ActiveHand bounds. + ! Item was added: + ----- Method: PBColorPreferenceView>>changeColor: (in category 'user interface') ----- + changeColor: aButton + aButton changeColor. + self preference preferenceValue: aButton fillStyle. + button label: self preference preferenceValue asString. + self adjustLabelColor ! Item was added: + ----- Method: PBColorPreferenceView>>colorMenuButton (in category 'user interface') ----- + colorMenuButton + | selector name | + name := self preference name. + (name includesSubstring: 'border' caseSensitive: false) + ifTrue: [ selector := #borderStyleMenu] + ifFalse:[ selector := #fillStyleMenu]. + button := SimpleButtonMorph new + label: self preference preferenceValue asString; + actionSelector: selector; + target: self. + name = #menuBorderColor + ifTrue:[ ^button borderColor: MenuMorph menuBorderColor; borderWidth: MenuMorph menuBorderWidth]. + name = #menuTitleBorderColor + ifTrue:[ ^button borderColor: MenuMorph menuTitleBorderColor; borderWidth: MenuMorph menuTitleBorderWidth]. + self adjustLabelColor. + ^button color: self preference preferenceValue + + + "UpdatingRectangleMorph new + target: self preference; + getSelector: #preferenceValue; + putSelector: #preferenceValue:; + extent: 22@22; + setBalloonText: 'click here to change the color' translated; + yourself."! Item was added: + ----- Method: PBColorPreferenceView>>fillStyleMenu (in category 'user interface') ----- + fillStyleMenu + "Add the items for changing the current fill style of the Morph" + | aMenu | + "self canHaveFillStyles ifFalse:[^aMenu add: 'change color...' translated target: self action: #changeColor]." + aMenu := MenuMorph new defaultTarget: self. + "self preference preferenceValue addFillStyleMenuItems: aMenu hand: nil from: self." + aMenu add: 'change color...' translated target: self selector:#changeColor: argument: button. + aMenu addLine. + aMenu add: 'solid fill' translated action: #useSolidFill. + "aMenu add: 'gradient fill' translated action: #useGradientFill. + aMenu add: 'bitmap fill' translated action: #useBitmapFill. + aMenu add: 'default fill' translated action: #useDefaultFill." + ^aMenu openNear: ActiveHand bounds. + ! Item was changed: ----- Method: PBColorPreferenceView>>representativeButtonWithColor:inPanel: (in category 'user interface') ----- representativeButtonWithColor: aColor inPanel: aPreferenceBrowser ^self horizontalPanel layoutInset: 2; color: aColor; cellInset: 20; cellPositioning: #center; addMorphBack: (StringMorph contents: self preference name); addMorphBack: self horizontalFiller; + addMorphBack: self colorMenuButton; - addMorphBack: self colorSwatch; yourself! Item was added: + ----- Method: PBColorPreferenceView>>setBorderStyle: (in category 'user interface') ----- + setBorderStyle: aBorderStyle + self preference name = #menuBorderColor + ifTrue: [button color: MenuMorph menuColor; + borderWidth: MenuMorph menuBorderWidth]. + self preference name = #menuTitleBorderColor + ifTrue: [button color: MenuMorph menuTitleColor; + borderWidth: MenuMorph menuTitleBorderWidth]. + self preference preferenceValue: aBorderStyle. + button label: self preference preferenceValue asString; + borderColor: aBorderStyle. + ! Item was added: + ----- Method: PBColorPreferenceView>>useGradientFill (in category 'user interface') ----- + useGradientFill + + "Make receiver use a solid fill style (e.g., a simple color)" + + + | color1 color2 fill | + self preference preferenceValue isGradientFill ifTrue:[^self]. "Already done" + color1 := Color white darker. + color2 := self preference preferenceValue asColor. + fill := GradientFillStyle ramp: {0.0 -> color1. 1.0 -> color2}. + fill origin: ActiveWorld topLeft. + fill direction: 0 @ ActiveWorld bounds extent y. + fill normal: ActiveWorld bounds extent x @ 0. + fill radial: false. + self preference preferenceValue: fill. + button label: self preference preferenceValue asString; + color: self preference preferenceValue! Item was added: + ----- Method: PBColorPreferenceView>>useSolidFill (in category 'user interface') ----- + useSolidFill + "Make receiver use a solid fill style (e.g., a simple color)" + self preference preferenceValue isSolidFill ifTrue:[^self]. "Already done" + self preference preferenceValue: self preference preferenceValue asColor. "Try minimizing changes" + + button label: self preference preferenceValue asString; + color: self preference preferenceValue + ! From commits at source.squeak.org Fri Aug 28 08:38:28 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 28 08:38:29 2015 Subject: [squeak-dev] The Trunk: EToys-mt.129.mcz Message-ID: Marcel Taeumel uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-mt.129.mcz ==================== Summary ==================== Name: EToys-mt.129 Author: mt Time: 28 August 2015, 10:38:10.951 am UUID: 67137285-c25a-4646-949c-ee0e7cdd37a2 Ancestors: EToys-mt.128 Removes color preference views (to regular PreferenceBrowser package). =============== Diff against EToys-mt.128 =============== Item was changed: SystemOrganization addCategory: #'Etoys-Buttons'! SystemOrganization addCategory: #'Etoys-CustomEvents'! SystemOrganization addCategory: #'Etoys-Experimental'! SystemOrganization addCategory: #'Etoys-Outliner'! - SystemOrganization addCategory: #'Etoys-PreferenceBrowser'! SystemOrganization addCategory: #'Etoys-Protocols'! SystemOrganization addCategory: #'Etoys-Protocols-Type Vocabularies'! SystemOrganization addCategory: #'Etoys-Scripting'! SystemOrganization addCategory: #'Etoys-Scripting Support'! SystemOrganization addCategory: #'Etoys-Scripting Tiles'! SystemOrganization addCategory: #'Etoys-Stacks'! SystemOrganization addCategory: #'Etoys-StarSqueak'! SystemOrganization addCategory: #'Etoys-Support'! SystemOrganization addCategory: #'Etoys-Tests'! SystemOrganization addCategory: #'Etoys-Tile Scriptors'! SystemOrganization addCategory: #'Etoys-Widgets'! Item was removed: - PBPreferenceView subclass: #PBColorPreferenceView - instanceVariableNames: 'button' - classVariableNames: '' - poolDictionaries: '' - category: 'Etoys-PreferenceBrowser'! Item was removed: - ----- Method: PBColorPreferenceView class>>initialize (in category 'class initialization') ----- - initialize - PreferenceViewRegistry ofColorPreferences register: self.! Item was removed: - ----- Method: PBColorPreferenceView class>>unload (in category 'class initialization') ----- - unload - "Unload order is not guaranteed so guard against failure" - [PreferenceViewRegistry ofColorPreferences unregister: self] on: Error do:[]! Item was removed: - ----- Method: PBColorPreferenceView>>adjustLabelColor (in category 'user interface') ----- - adjustLabelColor - | textColor | - (self preference preferenceValue luminance < 0.5) - ifTrue:[ textColor := Color white] - ifFalse:[ textColor := Color black]. - button allMorphsDo: [:m | (m isKindOf: StringMorph) ifTrue: [ m color: textColor]]. ! Item was removed: - ----- Method: PBColorPreferenceView>>borderStyleMenu (in category 'user interface') ----- - borderStyleMenu - "Add border-style menu items" - - | aMenu | - aMenu := MenuMorph new defaultTarget: self. - - aMenu addStayUpItemSpecial. - aMenu add: 'border color...' translated target: self selector:#changeColor: argument: button. - aMenu addLine. - BorderStyle borderStyleChoices do: - [:sym | (aMenu borderStyleForSymbol: sym) - ifNotNil: - [aMenu add: sym translated target: self selector: #setBorderStyle: argument: sym]]. - ^aMenu openNear: ActiveHand bounds. - ! Item was removed: - ----- Method: PBColorPreferenceView>>changeColor: (in category 'user interface') ----- - changeColor: aButton - aButton changeColor. - self preference preferenceValue: aButton fillStyle. - button label: self preference preferenceValue asString. - self adjustLabelColor ! Item was removed: - ----- Method: PBColorPreferenceView>>colorMenuButton (in category 'user interface') ----- - colorMenuButton - | selector name | - name := self preference name. - (name includesSubstring: 'border' caseSensitive: false) - ifTrue: [ selector := #borderStyleMenu] - ifFalse:[ selector := #fillStyleMenu]. - button := SimpleButtonMorph new - label: self preference preferenceValue asString; - actionSelector: selector; - target: self. - name = #menuBorderColor - ifTrue:[ ^button borderColor: MenuMorph menuBorderColor; borderWidth: MenuMorph menuBorderWidth]. - name = #menuTitleBorderColor - ifTrue:[ ^button borderColor: MenuMorph menuTitleBorderColor; borderWidth: MenuMorph menuTitleBorderWidth]. - self adjustLabelColor. - ^button color: self preference preferenceValue - - - "UpdatingRectangleMorph new - target: self preference; - getSelector: #preferenceValue; - putSelector: #preferenceValue:; - extent: 22@22; - setBalloonText: 'click here to change the color' translated; - yourself."! Item was removed: - ----- Method: PBColorPreferenceView>>colorSwatch (in category 'user interface') ----- - colorSwatch - ^UpdatingRectangleMorph new - target: self preference; - getSelector: #preferenceValue; - putSelector: #preferenceValue:; - extent: 22@22; - setBalloonText: 'click here to change the color' translated; - yourself.! Item was removed: - ----- Method: PBColorPreferenceView>>fillStyleMenu (in category 'user interface') ----- - fillStyleMenu - "Add the items for changing the current fill style of the Morph" - | aMenu | - "self canHaveFillStyles ifFalse:[^aMenu add: 'change color...' translated target: self action: #changeColor]." - aMenu := MenuMorph new defaultTarget: self. - "self preference preferenceValue addFillStyleMenuItems: aMenu hand: nil from: self." - aMenu add: 'change color...' translated target: self selector:#changeColor: argument: button. - aMenu addLine. - aMenu add: 'solid fill' translated action: #useSolidFill. - "aMenu add: 'gradient fill' translated action: #useGradientFill. - aMenu add: 'bitmap fill' translated action: #useBitmapFill. - aMenu add: 'default fill' translated action: #useDefaultFill." - ^aMenu openNear: ActiveHand bounds. - ! Item was removed: - ----- Method: PBColorPreferenceView>>representativeButtonWithColor:inPanel: (in category 'user interface') ----- - representativeButtonWithColor: aColor inPanel: aPreferenceBrowser - ^self horizontalPanel - layoutInset: 2; - color: aColor; - cellInset: 20; - cellPositioning: #center; - addMorphBack: (StringMorph contents: self preference name); - addMorphBack: self horizontalFiller; - addMorphBack: self colorMenuButton; - yourself! Item was removed: - ----- Method: PBColorPreferenceView>>setBorderStyle: (in category 'user interface') ----- - setBorderStyle: aBorderStyle - self preference name = #menuBorderColor - ifTrue: [button color: MenuMorph menuColor; - borderWidth: MenuMorph menuBorderWidth]. - self preference name = #menuTitleBorderColor - ifTrue: [button color: MenuMorph menuTitleColor; - borderWidth: MenuMorph menuTitleBorderWidth]. - self preference preferenceValue: aBorderStyle. - button label: self preference preferenceValue asString; - borderColor: aBorderStyle. - ! Item was removed: - ----- Method: PBColorPreferenceView>>useGradientFill (in category 'user interface') ----- - useGradientFill - - "Make receiver use a solid fill style (e.g., a simple color)" - - - | color1 color2 fill | - self preference preferenceValue isGradientFill ifTrue:[^self]. "Already done" - color1 := Color white darker. - color2 := self preference preferenceValue asColor. - fill := GradientFillStyle ramp: {0.0 -> color1. 1.0 -> color2}. - fill origin: ActiveWorld topLeft. - fill direction: 0 @ ActiveWorld bounds extent y. - fill normal: ActiveWorld bounds extent x @ 0. - fill radial: false. - self preference preferenceValue: fill. - button label: self preference preferenceValue asString; - color: self preference preferenceValue! Item was removed: - ----- Method: PBColorPreferenceView>>useSolidFill (in category 'user interface') ----- - useSolidFill - "Make receiver use a solid fill style (e.g., a simple color)" - self preference preferenceValue isSolidFill ifTrue:[^self]. "Already done" - self preference preferenceValue: self preference preferenceValue asColor. "Try minimizing changes" - - button label: self preference preferenceValue asString; - color: self preference preferenceValue - ! Item was removed: - PBColorPreferenceView subclass: #PBWindowColorPreferenceView - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Etoys-PreferenceBrowser'! Item was removed: - ----- Method: PBWindowColorPreferenceView class>>initialize (in category 'class initialization') ----- - initialize - self viewRegistry register: self.! Item was removed: - ----- Method: PBWindowColorPreferenceView class>>unload (in category 'class initialization') ----- - unload - "Unload order is not guaranteed so guard against failure" - [self viewRegistry unregister: self] on: Error do:[]! Item was removed: - ----- Method: PBWindowColorPreferenceView class>>viewRegistry (in category 'class initialization') ----- - viewRegistry - ^(PreferenceViewRegistry registryOf: #windowColorPreferences) - viewOrder: 6; - yourself.! Item was removed: - ----- Method: PBWindowColorPreferenceView>>initialize (in category 'initialization') ----- - initialize - super initialize. - self addActionTitled: 'Bright' target: Preferences selector: #installBrightWindowColors arguments: {} balloonText: 'Use standard bright colors for all windows' translated. - self addActionTitled: 'Pastel' target: Preferences selector: #installPastelWindowColors arguments: {} balloonText: 'Use standard pastel colors for all windows' translated. - self addActionTitled: 'Gray' target: Preferences selector: #installUniformWindowColors arguments: {} balloonText: 'Use gray backgrounds for all standard windows' translated.! From commits at source.squeak.org Fri Aug 28 08:39:08 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 28 08:39:09 2015 Subject: [squeak-dev] The Trunk: PreferenceBrowser-mt.55.mcz Message-ID: Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk: http://source.squeak.org/trunk/PreferenceBrowser-mt.55.mcz ==================== Summary ==================== Name: PreferenceBrowser-mt.55 Author: mt Time: 28 August 2015, 10:39:02.545 am UUID: 7a5295ca-614d-3a44-b69e-c8a9b69ec92b Ancestors: PreferenceBrowser-mt.54 Adds color preference views (moved from EToys package). =============== Diff against PreferenceBrowser-mt.54 =============== Item was added: + PBPreferenceView subclass: #PBColorPreferenceView + instanceVariableNames: 'button' + classVariableNames: '' + poolDictionaries: '' + category: 'PreferenceBrowser'! Item was added: + ----- Method: PBColorPreferenceView class>>initialize (in category 'class initialization') ----- + initialize + PreferenceViewRegistry ofColorPreferences register: self.! Item was added: + ----- Method: PBColorPreferenceView class>>unload (in category 'class initialization') ----- + unload + "Unload order is not guaranteed so guard against failure" + [PreferenceViewRegistry ofColorPreferences unregister: self] on: Error do:[]! Item was added: + ----- Method: PBColorPreferenceView>>adjustLabelColor (in category 'user interface') ----- + adjustLabelColor + | textColor | + (self preference preferenceValue luminance < 0.5) + ifTrue:[ textColor := Color white] + ifFalse:[ textColor := Color black]. + button allMorphsDo: [:m | (m isKindOf: StringMorph) ifTrue: [ m color: textColor]]. ! Item was added: + ----- Method: PBColorPreferenceView>>borderStyleMenu (in category 'user interface') ----- + borderStyleMenu + "Add border-style menu items" + + | aMenu | + aMenu := MenuMorph new defaultTarget: self. + + aMenu addStayUpItemSpecial. + aMenu add: 'border color...' translated target: self selector:#changeColor: argument: button. + aMenu addLine. + BorderStyle borderStyleChoices do: + [:sym | (aMenu borderStyleForSymbol: sym) + ifNotNil: + [aMenu add: sym translated target: self selector: #setBorderStyle: argument: sym]]. + ^aMenu openNear: ActiveHand bounds. + ! Item was added: + ----- Method: PBColorPreferenceView>>changeColor: (in category 'user interface') ----- + changeColor: aButton + aButton changeColor. + self preference preferenceValue: aButton fillStyle. + button label: self preference preferenceValue asString. + self adjustLabelColor ! Item was added: + ----- Method: PBColorPreferenceView>>colorMenuButton (in category 'user interface') ----- + colorMenuButton + | selector name | + name := self preference name. + (name includesSubstring: 'border' caseSensitive: false) + ifTrue: [ selector := #borderStyleMenu] + ifFalse:[ selector := #fillStyleMenu]. + button := SimpleButtonMorph new + label: self preference preferenceValue asString; + actionSelector: selector; + target: self. + name = #menuBorderColor + ifTrue:[ ^button borderColor: MenuMorph menuBorderColor; borderWidth: MenuMorph menuBorderWidth]. + name = #menuTitleBorderColor + ifTrue:[ ^button borderColor: MenuMorph menuTitleBorderColor; borderWidth: MenuMorph menuTitleBorderWidth]. + self adjustLabelColor. + ^button color: self preference preferenceValue + + + "UpdatingRectangleMorph new + target: self preference; + getSelector: #preferenceValue; + putSelector: #preferenceValue:; + extent: 22@22; + setBalloonText: 'click here to change the color' translated; + yourself."! Item was added: + ----- Method: PBColorPreferenceView>>colorSwatch (in category 'user interface') ----- + colorSwatch + ^UpdatingRectangleMorph new + target: self preference; + getSelector: #preferenceValue; + putSelector: #preferenceValue:; + extent: 22@22; + setBalloonText: 'click here to change the color' translated; + yourself.! Item was added: + ----- Method: PBColorPreferenceView>>fillStyleMenu (in category 'user interface') ----- + fillStyleMenu + "Add the items for changing the current fill style of the Morph" + | aMenu | + "self canHaveFillStyles ifFalse:[^aMenu add: 'change color...' translated target: self action: #changeColor]." + aMenu := MenuMorph new defaultTarget: self. + "self preference preferenceValue addFillStyleMenuItems: aMenu hand: nil from: self." + aMenu add: 'change color...' translated target: self selector:#changeColor: argument: button. + aMenu addLine. + aMenu add: 'solid fill' translated action: #useSolidFill. + "aMenu add: 'gradient fill' translated action: #useGradientFill. + aMenu add: 'bitmap fill' translated action: #useBitmapFill. + aMenu add: 'default fill' translated action: #useDefaultFill." + ^aMenu openNear: ActiveHand bounds. + ! Item was added: + ----- Method: PBColorPreferenceView>>representativeButtonWithColor:inPanel: (in category 'user interface') ----- + representativeButtonWithColor: aColor inPanel: aPreferenceBrowser + ^self horizontalPanel + layoutInset: 2; + color: aColor; + cellInset: 20; + cellPositioning: #center; + addMorphBack: (StringMorph contents: self preference name); + addMorphBack: self horizontalFiller; + addMorphBack: self colorMenuButton; + yourself! Item was added: + ----- Method: PBColorPreferenceView>>setBorderStyle: (in category 'user interface') ----- + setBorderStyle: aBorderStyle + self preference name = #menuBorderColor + ifTrue: [button color: MenuMorph menuColor; + borderWidth: MenuMorph menuBorderWidth]. + self preference name = #menuTitleBorderColor + ifTrue: [button color: MenuMorph menuTitleColor; + borderWidth: MenuMorph menuTitleBorderWidth]. + self preference preferenceValue: aBorderStyle. + button label: self preference preferenceValue asString; + borderColor: aBorderStyle. + ! Item was added: + ----- Method: PBColorPreferenceView>>useGradientFill (in category 'user interface') ----- + useGradientFill + + "Make receiver use a solid fill style (e.g., a simple color)" + + + | color1 color2 fill | + self preference preferenceValue isGradientFill ifTrue:[^self]. "Already done" + color1 := Color white darker. + color2 := self preference preferenceValue asColor. + fill := GradientFillStyle ramp: {0.0 -> color1. 1.0 -> color2}. + fill origin: ActiveWorld topLeft. + fill direction: 0 @ ActiveWorld bounds extent y. + fill normal: ActiveWorld bounds extent x @ 0. + fill radial: false. + self preference preferenceValue: fill. + button label: self preference preferenceValue asString; + color: self preference preferenceValue! Item was added: + ----- Method: PBColorPreferenceView>>useSolidFill (in category 'user interface') ----- + useSolidFill + "Make receiver use a solid fill style (e.g., a simple color)" + self preference preferenceValue isSolidFill ifTrue:[^self]. "Already done" + self preference preferenceValue: self preference preferenceValue asColor. "Try minimizing changes" + + button label: self preference preferenceValue asString; + color: self preference preferenceValue + ! Item was added: + PBColorPreferenceView subclass: #PBWindowColorPreferenceView + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'PreferenceBrowser'! Item was added: + ----- Method: PBWindowColorPreferenceView class>>initialize (in category 'class initialization') ----- + initialize + self viewRegistry register: self.! Item was added: + ----- Method: PBWindowColorPreferenceView class>>unload (in category 'class initialization') ----- + unload + "Unload order is not guaranteed so guard against failure" + [self viewRegistry unregister: self] on: Error do:[]! Item was added: + ----- Method: PBWindowColorPreferenceView class>>viewRegistry (in category 'class initialization') ----- + viewRegistry + ^(PreferenceViewRegistry registryOf: #windowColorPreferences) + viewOrder: 6; + yourself.! Item was added: + ----- Method: PBWindowColorPreferenceView>>initialize (in category 'initialization') ----- + initialize + super initialize. + self addActionTitled: 'Bright' target: Preferences selector: #installBrightWindowColors arguments: {} balloonText: 'Use standard bright colors for all windows' translated. + self addActionTitled: 'Pastel' target: Preferences selector: #installPastelWindowColors arguments: {} balloonText: 'Use standard pastel colors for all windows' translated. + self addActionTitled: 'Gray' target: Preferences selector: #installUniformWindowColors arguments: {} balloonText: 'Use gray backgrounds for all standard windows' translated.! From commits at source.squeak.org Fri Aug 28 08:42:15 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 28 08:42:16 2015 Subject: [squeak-dev] The Trunk: PreferenceBrowser-mt.56.mcz Message-ID: Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk: http://source.squeak.org/trunk/PreferenceBrowser-mt.56.mcz ==================== Summary ==================== Name: PreferenceBrowser-mt.56 Author: mt Time: 28 August 2015, 10:42:09.726 am UUID: 653323a1-a37f-f047-9a58-06ceac3598e8 Ancestors: PreferenceBrowser-mt.55 Fixes menu pop-up for color preferences. =============== Diff against PreferenceBrowser-mt.55 =============== Item was changed: ----- Method: PBColorPreferenceView>>borderStyleMenu (in category 'user interface') ----- borderStyleMenu "Add border-style menu items" | aMenu | aMenu := MenuMorph new defaultTarget: self. aMenu addStayUpItemSpecial. aMenu add: 'border color...' translated target: self selector:#changeColor: argument: button. aMenu addLine. BorderStyle borderStyleChoices do: [:sym | (aMenu borderStyleForSymbol: sym) ifNotNil: [aMenu add: sym translated target: self selector: #setBorderStyle: argument: sym]]. + ^aMenu popUpInWorld - ^aMenu openNear: ActiveHand bounds. ! Item was changed: ----- Method: PBColorPreferenceView>>fillStyleMenu (in category 'user interface') ----- fillStyleMenu "Add the items for changing the current fill style of the Morph" | aMenu | "self canHaveFillStyles ifFalse:[^aMenu add: 'change color...' translated target: self action: #changeColor]." aMenu := MenuMorph new defaultTarget: self. "self preference preferenceValue addFillStyleMenuItems: aMenu hand: nil from: self." aMenu add: 'change color...' translated target: self selector:#changeColor: argument: button. aMenu addLine. aMenu add: 'solid fill' translated action: #useSolidFill. "aMenu add: 'gradient fill' translated action: #useGradientFill. aMenu add: 'bitmap fill' translated action: #useBitmapFill. aMenu add: 'default fill' translated action: #useDefaultFill." + ^aMenu popUpInWorld - ^aMenu openNear: ActiveHand bounds. ! From Marcel.Taeumel at hpi.de Fri Aug 28 08:37:10 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Aug 28 08:42:24 2015 Subject: [squeak-dev] Re: The Trunk: PreferenceBrowser-mt.54.mcz In-Reply-To: References: Message-ID: <1440751030599-4846550.post@n4.nabble.com> Done. :) Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-PreferenceBrowser-mt-54-mcz-tp4846279p4846550.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at elte.hu Fri Aug 28 09:02:46 2015 From: leves at elte.hu (Levente Uzonyi) Date: Fri Aug 28 09:02:51 2015 Subject: [squeak-dev] #initialize to superclass [was Re: [squeak-dev] The Trunk: Tests-mt.329.mcz] In-Reply-To: References: Message-ID: Hi Chris, Class-side #initilize is mostly used to evaluate some code when the class is loaded into the image. The reason for this is that the method is not evaluated on class creation, only on class loading, and only the implementor will receive message, its subclasses will not. Most implementations assume that the method will never be sent more than once. A good example for the subclass handling is TestCase. If you were to create a subclass of it and implement #initialize on the class-side with a super send, then you'd find yourself having your subclass registered for all method changes. If this happen too many times, then your image will slow down for seemingly no reason. To make it harder to find out what the problem is, you'll only experience it when you load your code into another image. Another problem could be the propagation from class-side to the Behavior instance, but that's prevented by Object class >> #initilize, which intentionally omits the super send. If that method weren't there, then your class would get reinitialized by Behavior >> #initialize. The warning only says that the method has a special role in the system. It doesn't advice you to add a super send. Levente On Thu, 27 Aug 2015, Chris Cunningham wrote: > Hi Levente, > > On Thu, Aug 27, 2015 at 5:14 AM, Levente Uzonyi wrote: > Unless you have a very good reason to send #initialize to the superclass, you shouldn't do it. > > So, I have two questions: > 1 - why should we not do this? > 2 - if we shouldn't do it, then why does the system ALWAYS bug us about not overriding #initialize when adding that method to the class side? > > I am in the habit of adding it - because the message pops up, and I suppose the system has a good reason for us to not override it.? Maybe just a bad habit on my part. > > thanks, > cbc > ? > Levente > > On Thu, 27 Aug 2015, commits@source.squeak.org wrote: > > Marcel Taeumel uploaded a new version of Tests to project The Trunk: > http://source.squeak.org/trunk/Tests-mt.329.mcz > > ==================== Summary ==================== > > Name: Tests-mt.329 > Author: mt > Time: 27 August 2015, 11:12:04.169 am > UUID: 2665a1ed-6312-1845-8181-d83c588cd161 > Ancestors: Tests-mt.328 > > Fixes initialization problem with test preferences. > > =============== Diff against Tests-mt.328 =============== > > Item was added: > + ----- Method: PreferencesTestPreferences class>>initialize (in category 'class initialization') ----- > + initialize > + > +? ? ? ?super initialize. > +? ? ? ?self initializeDictionaryOfPreferences.! > > > > > > > From lewis at mail.msen.com Fri Aug 28 12:14:35 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Aug 28 12:14:37 2015 Subject: [squeak-dev] Updating SAR builder tool In-Reply-To: <0B7902AB-FBEF-4235-BC1B-E133EFBFB7C0@gmail.com> References: <02A6AB19-EEF7-4E42-AFE9-9C90FD6E5DAB@rowledge.org> <20150828011912.GB98083@shell.msen.com> <0B7902AB-FBEF-4235-BC1B-E133EFBFB7C0@gmail.com> Message-ID: <20150828121435.GA14640@shell.msen.com> On Fri, Aug 28, 2015 at 04:51:36AM -0300, Edgar De Cleene wrote: > And why do not take my idea of have a Monticello thing what mimics .sar ? > > I have working demos on Squeak 5.0, if time lets record a short video and upload to YouTube this week end. > Sorry Edgar, I did not remember it. I would be interested to see a video. Thanks, Dave > > On Aug 27, 2015, at 10:19 PM, David T. Lewis wrote: > > > > Base support for SAR formats should definitely be supported. I don't know > > why we lost it, but I do exactly what you did - load the old code when I need > > it, for example to support UTCDateAndTime http://wiki.squeak.org/squeak/6197 > > for which a SAR distribution is the only thing could possible work. > > > > So yes, someone should pick up the important bits and put them back into trunk. > > > > Dave > > > > > > On Thu, Aug 27, 2015 at 05:59:01PM -0700, tim Rowledge wrote: > >> I?m looking into using .sar files as a way of delivering Scratch device driver stuff for the Raspberry Pi. It?s been more than a few years since I last had to think about SARs (actually from my emails it looks like 2004 was the last time!) so a bit of trawling through the swiki was in order. I?ve updated a couple of pages relating to SARs to (hopefully) make them a touch more useful these days, and just tried loading the very old SARBuilder package from SqueakMap. Don?t forget that you have to hit the menu in the top-left list of the Squeakmap tool in order to turn off the filtering that makes it invisible since it isn?t thoroughly up to date. > >> > >> It installs ok after using Preferences to allow underscores as assignment; so there is one update needed in the code. It even appears to run its example (SARChangeSetDumper class>>example1) ok. However, it clearly needs some updates to make it a better citizen; for example it completely overwrites the ChangeSorter>>changeSetMenu:shifted: method. > >> > >> I don?t have any time to clean it up right now since I have a release to assemble for about 7 million Pi?s. It seems like it might be a relatively simple fixup to make an old tool usable once more. > >> > >> tim > >> -- > >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > >> Strange OpCodes: RLB: Ruin Logic Board > >> > >> > > > From commits at source.squeak.org Fri Aug 28 12:22:21 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 28 12:22:23 2015 Subject: [squeak-dev] The Trunk: Regex-Core-ul.44.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Core-ul.44.mcz ==================== Summary ==================== Name: Regex-Core-ul.44 Author: ul Time: 28 August 2015, 2:21:49.191 pm UUID: eb190b36-cf56-4381-97cb-58ef044c6416 Ancestors: Regex-Core-ul.43 RxMatcher: - updated class comment - renamed two class variables - added some speedups for those regular expressions which don't have any subexpressions - #resetMarkerPositions is now clearly something extracted from #tryMatch - use the fact that the stream is a stream of characters, so when #next returns nil, then we have found the end of the stream. =============== Diff against Regex-Core-ul.43 =============== Item was changed: Object subclass: #RxMatcher + instanceVariableNames: 'matcher ignoreCase startOptimizer stream markerPositions previousMarkerPositions markerCount lastResult firstTryMatch' - instanceVariableNames: 'matcher ignoreCase startOptimizer stream markerPositions markerCount lastResult oldMarkerPositions firstTry' classVariableNames: 'Cr Lf' poolDictionaries: '' category: 'Regex-Core'! + !RxMatcher commentStamp: 'ul 8/28/2015 14:18' prior: 0! - !RxMatcher commentStamp: 'Tbn 11/12/2010 23:13' prior: 0! -- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov -- This is a recursive regex matcher. Not strikingly efficient, but simple. Also, keeps track of matched subexpressions. The life cycle goes as follows: 1. Initialization. Accepts a syntax tree (presumably produced by RxParser) and compiles it into a matcher built of other classes in this category. 2. Matching. Accepts a stream or a string and returns a boolean indicating whether the whole stream or its prefix -- depending on the message sent -- matches the regex. 3. Subexpression query. After a successful match, and before any other match, the matcher may be queried about the range of specific stream (string) positions that matched to certain parenthesized subexpressions of the original expression. Any number of queries may follow a successful match, and any number or matches may follow a successful initialization. Note that `matcher' is actually a sort of a misnomer. The actual matcher is a web of Rxm* instances built by RxMatcher during initialization. RxMatcher is just the interface facade of this network. It is also a builder of it, and also provides a stream-like protocol to easily access the stream being matched. Instance variables: + matcher The entry point into the actual matcher. + igoreCase Whether the matching algorithm should be case sensitive or not. + startOptimizer An object which can quickly decide whether the next character can be the prefix of a match or not. + stream The stream currently being matched against. + markerPositions Positions of markers' matches. + previousMarkerPositions Positions of markers from the previous #tryMatch send. + markerCount Number of markers. + lastResult Whether the latest match attempt succeeded or not. + firtTryMatch True if there hasn't been any send of #tryMatch during the current matching.! - matcher The entry point into the actual matcher. - stream The stream currently being matched against. - markerPositions Positions of markers' matches. - markerCount Number of markers. - lastResult Whether the latest match attempt succeeded or not. - lastChar character last seen in the matcher stream! Item was changed: ----- Method: RxMatcher>>copyStream:to:replacingMatchesWith: (in category 'match enumeration') ----- copyStream: aStream to: writeStream replacingMatchesWith: aString "Copy the contents of on the , except for the matches. Replace each match with ." | searchStart matchStart matchEnd | stream := aStream. + firstTryMatch := true. - self resetMarkerPositions. [searchStart := aStream position. self proceedSearchingStream: aStream] whileTrue: [matchStart := (self subBeginning: 1) last. matchEnd := (self subEnd: 1) last. aStream position: searchStart. searchStart to: matchStart - 1 do: [:ignoredPos | writeStream nextPut: aStream next]. writeStream nextPutAll: aString. aStream position: matchEnd. "Be extra careful about successful matches which consume no input. After those, make sure to advance or finish if already at end." matchEnd = searchStart ifTrue: [aStream atEnd ifTrue: [^self "rest after end of whileTrue: block is a no-op if atEnd"] ifFalse: [writeStream nextPut: aStream next]]]. aStream position: searchStart. [aStream atEnd] whileFalse: [writeStream nextPut: aStream next]! Item was changed: ----- Method: RxMatcher>>copyStream:to:translatingMatchesUsing: (in category 'match enumeration') ----- copyStream: aStream to: writeStream translatingMatchesUsing: aBlock "Copy the contents of on the , except for the matches. For each match, evaluate passing the matched substring as the argument. Expect the block to answer a String, and write the answer to in place of the match." | searchStart matchStart matchEnd match | stream := aStream. + firstTryMatch := true. - self resetMarkerPositions. [searchStart := aStream position. self proceedSearchingStream: aStream] whileTrue: [matchStart := (self subBeginning: 1) last. matchEnd := (self subEnd: 1) last. aStream position: searchStart. searchStart to: matchStart - 1 do: [:ignoredPos | writeStream nextPut: aStream next]. match := (String new: matchEnd - matchStart + 1) writeStream. matchStart to: matchEnd - 1 do: [:ignoredPos | match nextPut: aStream next]. writeStream nextPutAll: (aBlock value: match contents). "Be extra careful about successful matches which consume no input. After those, make sure to advance or finish if already at end." matchEnd = searchStart ifTrue: [aStream atEnd ifTrue: [^self "rest after end of whileTrue: block is a no-op if atEnd"] ifFalse: [writeStream nextPut: aStream next]]]. aStream position: searchStart. [aStream atEnd] whileFalse: [writeStream nextPut: aStream next]! Item was changed: ----- Method: RxMatcher>>initialize:ignoreCase: (in category 'initialize-release') ----- initialize: syntaxTreeRoot ignoreCase: aBoolean "Compile thyself for the regex with the specified syntax tree. See comment and `building' protocol in this class and #dispatchTo: methods in syntax tree components for details on double-dispatch building. The argument is supposedly a RxsRegex." ignoreCase := aBoolean. self buildFrom: syntaxTreeRoot. + self initializeMarkerPositions. startOptimizer := RxMatchOptimizer new initialize: syntaxTreeRoot ignoreCase: aBoolean! Item was added: + ----- Method: RxMatcher>>initializeMarkerPositions (in category 'initialize-release') ----- + initializeMarkerPositions + + markerPositions := Array new: markerCount. + previousMarkerPositions := Array new: markerCount.. + 3 to: markerCount do: [ :index | + markerPositions at: index put: (OrderedCollection new: 1). + previousMarkerPositions at: index put: (OrderedCollection new: 1) ].! Item was changed: ----- Method: RxMatcher>>isWordChar: (in category 'private') ----- isWordChar: aCharacterOrNil "Answer whether the argument is a word constituent character: alphanumeric or _." + aCharacterOrNil ifNil: [ ^false ]. + ^aCharacterOrNil isAlphaNumeric! - ^aCharacterOrNil ~~ nil - and: [aCharacterOrNil isAlphaNumeric]! Item was changed: ----- Method: RxMatcher>>markerPositionAt:add: (in category 'privileged') ----- + markerPositionAt: index add: position - markerPositionAt: anIndex add: position "Remember position of another instance of the given marker." + index <= 2 ifTrue: [ + markerPositions at: index put: position. + ^self ]. + (markerPositions at: index) addLast: position! - (markerPositions at: anIndex) addLast: position! Item was changed: ----- Method: RxMatcher>>matchesStreamPrefix: (in category 'accessing') ----- matchesStreamPrefix: theStream "Match thyself against a positionable stream." stream := theStream. + firstTryMatch := true. - self resetMarkerPositions. ^self tryMatch! Item was changed: ----- Method: RxMatcher>>proceedSearchingStream: (in category 'private') ----- proceedSearchingStream: aStream | position | + [ + position := aStream position. + self tryMatch ifTrue: [ ^true ]. + (aStream position: position; next) ifNil: [ + "Try match at the very stream end too!!" + ^self tryMatch ] ] repeat! - position := aStream position. - [aStream atEnd] whileFalse: - [self tryMatch ifTrue: [^true]. - aStream position: position; next. - position := aStream position]. - "Try match at the very stream end too!!" - self tryMatch ifTrue: [^true]. - ^false! Item was changed: ----- Method: RxMatcher>>resetMarkerPositions (in category 'private') ----- resetMarkerPositions + "Reset the marker positions. This method should only be sent from #tryMatch. When this is after the first #tryMatch send, then the marker positions must be swapped." - "This method should be sent before the first #tryMatch send." + firstTryMatch + ifTrue: [ firstTryMatch := false ] + ifFalse: [ + | temp | + temp := previousMarkerPositions. + previousMarkerPositions := markerPositions. + markerPositions := temp ]. + markerPositions + at: 1 put: nil; + at: 2 put: nil. + 3 to: markerCount do: [ :index | + (markerPositions at: index) resetTo: 1 ]! - firstTry := true. - markerPositions ifNotNil: [ - markerPositions do: [ :each | each resetTo: 1 ] ]! Item was changed: ----- Method: RxMatcher>>searchStream: (in category 'accessing') ----- searchStream: aStream "Search the stream for occurrence of something matching myself. After the search has occurred, stop positioned after the end of the matched substring. Answer a Boolean indicating success." | position | stream := aStream. position := aStream position. + firstTryMatch := true. - self resetMarkerPositions. [aStream atEnd] whileFalse: [self tryMatch ifTrue: [^true]. aStream position: position; next. position := aStream position]. "Try match at the very stream end too!!" ^self tryMatch! Item was changed: ----- Method: RxMatcher>>subBeginning: (in category 'accessing') ----- subBeginning: subIndex + subIndex = 1 ifTrue: [ + (markerPositions at: 1) + ifNil: [ ^#()] + ifNotNil: [ :mp | ^{ mp } ] ]. ^markerPositions at: subIndex * 2 - 1! Item was changed: ----- Method: RxMatcher>>subEnd: (in category 'accessing') ----- subEnd: subIndex + subIndex = 1 ifTrue: [ + (markerPositions at: 2) + ifNil: [ ^#()] + ifNotNil: [ :mp | ^{ mp } ] ]. ^markerPositions at: subIndex * 2! Item was changed: ----- Method: RxMatcher>>tryMatch (in category 'private') ----- tryMatch "Match thyself against the current stream." + | wasFirstTryMatch | + wasFirstTryMatch := firstTryMatch. + self resetMarkerPositions. - | newMarkerPositions wasFirstTry | - wasFirstTry := firstTry. - firstTry := false. - newMarkerPositions := oldMarkerPositions. - oldMarkerPositions := markerPositions. - markerPositions := newMarkerPositions. - markerPositions - ifNil: [ - markerPositions := Array new: markerCount. - 1 to: markerCount do: [ :i | - "There are usually 0 or 1 objects to store." - markerPositions at: i put: (OrderedCollection new: 2) ] ] - ifNotNil: [ - 1 to: markerCount do: [ :i | - (markerPositions at: i) resetTo: 1 ] ]. lastResult := startOptimizer + ifNil: [ matcher matchAgainst: self ] - ifNil: [ matcher matchAgainst: self] ifNotNil: [ (startOptimizer canStartMatch: stream peek in: self) and: [ matcher matchAgainst: self ] ]. "check for duplicates" lastResult ifFalse: [ ^false ]. + wasFirstTryMatch ifTrue: [ ^true ]. + (previousMarkerPositions hasEqualElements: markerPositions) ifFalse: [ ^true ]. - wasFirstTry ifTrue: [ ^true ]. - (oldMarkerPositions hasEqualElements: markerPositions) ifFalse: [ ^true ]. "this is a duplicate match" ^ lastResult := false! From edgardec2005 at gmail.com Fri Aug 28 12:51:13 2015 From: edgardec2005 at gmail.com (Edgar De Cleene) Date: Fri Aug 28 12:51:22 2015 Subject: [squeak-dev] Updating SAR builder tool In-Reply-To: <20150828121435.GA14640@shell.msen.com> References: <02A6AB19-EEF7-4E42-AFE9-9C90FD6E5DAB@rowledge.org> <20150828011912.GB98083@shell.msen.com> <0B7902AB-FBEF-4235-BC1B-E133EFBFB7C0@gmail.com> <20150828121435.GA14640@shell.msen.com> Message-ID: Ok. I take it . And upload last and updated FunSqueak4.6. If you know how convert legacy or Cog .image to Spur.image , appreciate feedback Edgar > On Aug 28, 2015, at 9:14 AM, David T. Lewis wrote: > > On Fri, Aug 28, 2015 at 04:51:36AM -0300, Edgar De Cleene wrote: >> And why do not take my idea of have a Monticello thing what mimics .sar ? >> >> I have working demos on Squeak 5.0, if time lets record a short video and upload to YouTube this week end. >> > > Sorry Edgar, I did not remember it. I would be interested to see a video. > > Thanks, > Dave > >>> On Aug 27, 2015, at 10:19 PM, David T. Lewis wrote: >>> >>> Base support for SAR formats should definitely be supported. I don't know >>> why we lost it, but I do exactly what you did - load the old code when I need >>> it, for example to support UTCDateAndTime http://wiki.squeak.org/squeak/6197 >>> for which a SAR distribution is the only thing could possible work. >>> >>> So yes, someone should pick up the important bits and put them back into trunk. >>> >>> Dave >>> >>> >>> On Thu, Aug 27, 2015 at 05:59:01PM -0700, tim Rowledge wrote: >>>> I?m looking into using .sar files as a way of delivering Scratch device driver stuff for the Raspberry Pi. It?s been more than a few years since I last had to think about SARs (actually from my emails it looks like 2004 was the last time!) so a bit of trawling through the swiki was in order. I?ve updated a couple of pages relating to SARs to (hopefully) make them a touch more useful these days, and just tried loading the very old SARBuilder package from SqueakMap. Don?t forget that you have to hit the menu in the top-left list of the Squeakmap tool in order to turn off the filtering that makes it invisible since it isn?t thoroughly up to date. >>>> >>>> It installs ok after using Preferences to allow underscores as assignment; so there is one update needed in the code. It even appears to run its example (SARChangeSetDumper class>>example1) ok. However, it clearly needs some updates to make it a better citizen; for example it completely overwrites the ChangeSorter>>changeSetMenu:shifted: method. >>>> >>>> I don?t have any time to clean it up right now since I have a release to assemble for about 7 million Pi?s. It seems like it might be a relatively simple fixup to make an old tool usable once more. >>>> >>>> tim >>>> -- >>>> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >>>> Strange OpCodes: RLB: Ruin Logic Board >>>> >>>> >>> >> > From karlramberg at gmail.com Fri Aug 28 12:55:13 2015 From: karlramberg at gmail.com (karl ramberg) Date: Fri Aug 28 12:55:16 2015 Subject: [squeak-dev] Re: The Trunk: PreferenceBrowser-mt.54.mcz In-Reply-To: <1440751030599-4846550.post@n4.nabble.com> References: <1440751030599-4846550.post@n4.nabble.com> Message-ID: Thank you :-) Karl On Fri, Aug 28, 2015 at 10:37 AM, marcel.taeumel wrote: > Done. :) > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/The-Trunk-PreferenceBrowser-mt-54-mcz-tp4846279p4846550.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/20150828/fdfd7eff/attachment.htm From karlramberg at gmail.com Fri Aug 28 13:05:57 2015 From: karlramberg at gmail.com (karl ramberg) Date: Fri Aug 28 13:06:00 2015 Subject: #initialize to superclass [was Re: [squeak-dev] The Trunk: Tests-mt.329.mcz] In-Reply-To: <1440748246024-4846516.post@n4.nabble.com> References: <1440748246024-4846516.post@n4.nabble.com> Message-ID: Hi, With latest updates there is a issue with Preference>>categoryList which now returns false instead of a list. Karl On Fri, Aug 28, 2015 at 9:50 AM, marcel.taeumel wrote: > Iff the class-side #initialize changes, it will be re-executed. > > The Editor class hierarchy overrides #initialize w/o sending super but > helper methods (e.g. #initializeCmdKeyShortcuts), which do send super. > > I wonder, why. :) > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/initialize-to-superclass-was-Re-squeak-dev-The-Trunk-Tests-mt-329-mcz-tp4846439p4846516.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/20150828/dfe185be/attachment.htm From asqueaker at gmail.com Fri Aug 28 15:23:55 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Aug 28 15:23:58 2015 Subject: [squeak-dev] The Trunk: Morphic-eem.1002.mcz In-Reply-To: <55dfa58f.81c38c0a.e3b0b.ffffac95SMTPIN_ADDED_MISSING@mx.google.com> References: <55dfa58f.81c38c0a.e3b0b.ffffac95SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Why? Just curious.. On Thu, Aug 27, 2015 at 7:04 PM, wrote: > Eliot Miranda uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-eem.1002.mcz > > ==================== Summary ==================== > > Name: Morphic-eem.1002 > Author: eem > Time: 27 August 2015, 5:03:26.429 pm > UUID: d94fff6d-5fef-4500-9144-4dc8bfa1510e > Ancestors: Morphic-mt.1001 > > It's really convenient to be able to identify MenuItemMorphs easily. > > =============== Diff against Morphic-mt.1001 =============== > > Item was added: > + ----- Method: MenuItemMorph>>isMenuItemMorph (in category 'testing') ----- > + isMenuItemMorph > + ^true! > > Item was added: > + ----- Method: Morph>>isMenuItemMorph (in category 'testing') ----- > + isMenuItemMorph > + ^false! > > From ma.chris.m at gmail.com Fri Aug 28 15:39:13 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Fri Aug 28 15:39:55 2015 Subject: [squeak-dev] ObjectExplorer bug -- "Assertion failed" Message-ID: I think we have a bug for when trying to spawn a Hierarchy browser or System browser from the ObjectExplorer -- its failing one of its own assertions. If I comment out the assertion, it opens browser on the parent object instead of the selected object. To reproduce: Simply explore the 'preferencesDictionary' class-inst var of Preferences, and then select one of the PragmaPreferences, then press Command+h. Boom. From asqueaker at gmail.com Fri Aug 28 15:52:40 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Aug 28 15:52:43 2015 Subject: [squeak-dev] Updating SAR builder tool In-Reply-To: <02A6AB19-EEF7-4E42-AFE9-9C90FD6E5DAB@rowledge.org> References: <02A6AB19-EEF7-4E42-AFE9-9C90FD6E5DAB@rowledge.org> Message-ID: Hi Tim, the "MaSarBuilder" package on SqueakMap works in the version of Squeak it is declared to run in. And, since SAR files are just zip files, it doesn't really NEED to run in the latest Squeak to produce SAR files for the latest Squeak. It includes a Maui-based UI to walk you through each step of the SAR building process, with drag-n-drop UI. HTH. On Thu, Aug 27, 2015 at 7:59 PM, tim Rowledge wrote: > I?m looking into using .sar files as a way of delivering Scratch device driver stuff for the Raspberry Pi. It?s been more than a few years since I last had to think about SARs (actually from my emails it looks like 2004 was the last time!) so a bit of trawling through the swiki was in order. I?ve updated a couple of pages relating to SARs to (hopefully) make them a touch more useful these days, and just tried loading the very old SARBuilder package from SqueakMap. Don?t forget that you have to hit the menu in the top-left list of the Squeakmap tool in order to turn off the filtering that makes it invisible since it isn?t thoroughly up to date. > > It installs ok after using Preferences to allow underscores as assignment; so there is one update needed in the code. It even appears to run its example (SARChangeSetDumper class>>example1) ok. However, it clearly needs some updates to make it a better citizen; for example it completely overwrites the ChangeSorter>>changeSetMenu:shifted: method. > > I don?t have any time to clean it up right now since I have a release to assemble for about 7 million Pi?s. It seems like it might be a relatively simple fixup to make an old tool usable once more. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: RLB: Ruin Logic Board > > > From eliot.miranda at gmail.com Fri Aug 28 16:15:23 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Aug 28 16:15:33 2015 Subject: [squeak-dev] The Trunk: Morphic-eem.1002.mcz In-Reply-To: References: <55dfa58f.81c38c0a.e3b0b.ffffac95SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi Chris, I wanted to add a "delete all Monticello load change sets" menu pick to the change set sorter, but because menu pragmas are not right yet the only way to add a menu item next to another is to edit the menu using removeMorph: and addMorph:after: (instead of defining order in the menu pragma itself). And I can't stomach isKindOf: or isMemberOf:/class to distinguish MenuItemMorphs from MenuLineMorphs. Sent from my iPhone > On Aug 28, 2015, at 8:23 AM, Chris Muller wrote: > > Why? Just curious.. > >> On Thu, Aug 27, 2015 at 7:04 PM, wrote: >> Eliot Miranda uploaded a new version of Morphic to project The Trunk: >> http://source.squeak.org/trunk/Morphic-eem.1002.mcz >> >> ==================== Summary ==================== >> >> Name: Morphic-eem.1002 >> Author: eem >> Time: 27 August 2015, 5:03:26.429 pm >> UUID: d94fff6d-5fef-4500-9144-4dc8bfa1510e >> Ancestors: Morphic-mt.1001 >> >> It's really convenient to be able to identify MenuItemMorphs easily. >> >> =============== Diff against Morphic-mt.1001 =============== >> >> Item was added: >> + ----- Method: MenuItemMorph>>isMenuItemMorph (in category 'testing') ----- >> + isMenuItemMorph >> + ^true! >> >> Item was added: >> + ----- Method: Morph>>isMenuItemMorph (in category 'testing') ----- >> + isMenuItemMorph >> + ^false! > From tim at rowledge.org Fri Aug 28 16:46:41 2015 From: tim at rowledge.org (tim Rowledge) Date: Fri Aug 28 16:46:46 2015 Subject: [squeak-dev] Updating SAR builder tool In-Reply-To: <0B7902AB-FBEF-4235-BC1B-E133EFBFB7C0@gmail.com> References: <02A6AB19-EEF7-4E42-AFE9-9C90FD6E5DAB@rowledge.org> <20150828011912.GB98083@shell.msen.com> <0B7902AB-FBEF-4235-BC1B-E133EFBFB7C0@gmail.com> Message-ID: <3586E956-0DB3-4239-BB26-E5F2C7B90863@rowledge.org> On 28-08-2015, at 12:51 AM, Edgar De Cleene wrote: > And why do not take my idea of have a Monticello thing what mimics .sar ? If you have a better solution, I?m all for using it. All I need is a way to be able to deliver some code/resources to users so they can use their shiny new SuperMegaHAT. That might mean ARM executable files, images, html files for the help system, sound files, whatever. I wasn?t even aware that MC could handle non-code stuff, but then the list of things about MC that I am unaware of may as well be considered an uncountable infinite set. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: MII: Mask all Interrupts and then Interrupt From Das.Linux at gmx.de Fri Aug 28 16:54:01 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Aug 28 16:54:06 2015 Subject: [squeak-dev] The Trunk: System-topa.764.mcz In-Reply-To: <1440748341721-4846519.post@n4.nabble.com> References: <1440748341721-4846519.post@n4.nabble.com> Message-ID: On 28.08.2015, at 09:52, marcel.taeumel wrote: > Not good for old projects... :-/ Anyway, we might get rid of this DNU trick > completely... Right, but several old things expect a false instead of nil when the pref is absent. Metacello's bootstrap expects an error that is beeing catched? best regards -tobias From Das.Linux at gmx.de Fri Aug 28 16:56:20 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Aug 28 16:56:25 2015 Subject: [squeak-dev] The Trunk: Morphic-eem.1002.mcz In-Reply-To: References: <55dfa58f.81c38c0a.e3b0b.ffffac95SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <979ABC49-E2AB-4CBE-9B1B-F20917010BC2@gmx.de> On 28.08.2015, at 18:15, Eliot Miranda wrote: > Hi Chris, > > I wanted to add a "delete all Monticello load change sets" menu pick to the change set sorter, but because menu pragmas are not right yet the only way to add a menu item next to another is to edit the menu using removeMorph: and addMorph:after: (instead of defining order in the menu pragma itself). Huh? Then I've done something wrong. With you can define an order, and if the order is adjacent, menu items should show up adjacent :(. I'll look into that best -tobias > And I can't stomach isKindOf: or isMemberOf:/class to distinguish MenuItemMorphs from MenuLineMorphs. > > Sent from my iPhone > >> On Aug 28, 2015, at 8:23 AM, Chris Muller wrote: >> >> Why? Just curious.. >> >>> On Thu, Aug 27, 2015 at 7:04 PM, wrote: >>> Eliot Miranda uploaded a new version of Morphic to project The Trunk: >>> http://source.squeak.org/trunk/Morphic-eem.1002.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Morphic-eem.1002 >>> Author: eem >>> Time: 27 August 2015, 5:03:26.429 pm >>> UUID: d94fff6d-5fef-4500-9144-4dc8bfa1510e >>> Ancestors: Morphic-mt.1001 >>> >>> It's really convenient to be able to identify MenuItemMorphs easily. >>> >>> =============== Diff against Morphic-mt.1001 =============== >>> >>> Item was added: >>> + ----- Method: MenuItemMorph>>isMenuItemMorph (in category 'testing') ----- >>> + isMenuItemMorph >>> + ^true! >>> >>> Item was added: >>> + ----- Method: Morph>>isMenuItemMorph (in category 'testing') ----- >>> + isMenuItemMorph >>> + ^false! From commits at source.squeak.org Fri Aug 28 17:19:10 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 28 17:19:11 2015 Subject: [squeak-dev] The Trunk: Collections-eem.650.mcz Message-ID: Eliot Miranda uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-eem.650.mcz ==================== Summary ==================== Name: Collections-eem.650 Author: eem Time: 28 August 2015, 10:18:46.207 am UUID: 5e4ce352-b835-441d-ab18-afc018290378 Ancestors: Collections-ul.649 #~~ has a primitive. Use it. =============== Diff against Collections-ul.649 =============== Item was added: ==== ERROR === Error: Unrecognized class type 28 August 2015 5:19:09.412 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(Ephemeron) Arguments and temporary variables: aString: 'Unrecognized class type' Receiver's instance variables: name: #Ephemeron superclassName: #Association variables: an OrderedCollection() category: #'Collections-Weak' type: #ephemeron comment: 'An Ephemeron is a mechanism both for instance-based finalization and ...etc... commentStamp: 'eem 8/26/2015 10:05' traitComposition: nil classTraitComposition: nil MCClassDefinition>>kindOfSubclass Receiver: a MCClassDefinition(Ephemeron) Arguments and temporary variables: Receiver's instance variables: name: #Ephemeron superclassName: #Association variables: an OrderedCollection() category: #'Collections-Weak' type: #ephemeron comment: 'An Ephemeron is a mechanism both for instance-based finalization and ...etc... commentStamp: 'eem 8/26/2015 10:05' traitComposition: nil classTraitComposition: nil MCClassDefinition>>printDefinitionOn: Receiver: a MCClassDefinition(Ephemeron) Arguments and temporary variables: stream: a WriteStream Receiver's instance variables: name: #Ephemeron superclassName: #Association variables: an OrderedCollection() category: #'Collections-Weak' type: #ephemeron comment: 'An Ephemeron is a mechanism both for instance-based finalization and ...etc... commentStamp: 'eem 8/26/2015 10:05' traitComposition: nil classTraitComposition: nil [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a WriteStream s: a MCClassDefinition(Ephemeron) 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 eliot.miranda at gmail.com Fri Aug 28 17:20:43 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Aug 28 17:20:46 2015 Subject: [squeak-dev] The Trunk: Collections-eem.650.mcz In-Reply-To: <55e09814.ec648c0a.bbbe6.ffff8fb8SMTPIN_ADDED_MISSING@mx.google.com> References: <55e09814.ec648c0a.bbbe6.ffff8fb8SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Oops. Wrong package. Ignore this please. On Fri, Aug 28, 2015 at 10:18 AM, wrote: > Eliot Miranda uploaded a new version of Collections to project The Trunk: > http://source.squeak.org/trunk/Collections-eem.650.mcz > > ==================== Summary ==================== > > Name: Collections-eem.650 > Author: eem > Time: 28 August 2015, 10:18:46.207 am > UUID: 5e4ce352-b835-441d-ab18-afc018290378 > Ancestors: Collections-ul.649 > > #~~ has a primitive. Use it. > > =============== Diff against Collections-ul.649 =============== > > Item was added: > ==== ERROR === > > Error: Unrecognized class type > > 28 August 2015 5:19:09.412 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(Ephemeron) > Arguments and temporary variables: > aString: 'Unrecognized class type' > Receiver's instance variables: > name: #Ephemeron > superclassName: #Association > variables: an OrderedCollection() > category: #'Collections-Weak' > type: #ephemeron > comment: 'An Ephemeron is a mechanism both for > instance-based finalization and ...etc... > commentStamp: 'eem 8/26/2015 10:05' > traitComposition: nil > classTraitComposition: nil > > MCClassDefinition>>kindOfSubclass > Receiver: a MCClassDefinition(Ephemeron) > Arguments and temporary variables: > > Receiver's instance variables: > name: #Ephemeron > superclassName: #Association > variables: an OrderedCollection() > category: #'Collections-Weak' > type: #ephemeron > comment: 'An Ephemeron is a mechanism both for > instance-based finalization and ...etc... > commentStamp: 'eem 8/26/2015 10:05' > traitComposition: nil > classTraitComposition: nil > > MCClassDefinition>>printDefinitionOn: > Receiver: a MCClassDefinition(Ephemeron) > Arguments and temporary variables: > stream: a WriteStream > Receiver's instance variables: > name: #Ephemeron > superclassName: #Association > variables: an OrderedCollection() > category: #'Collections-Weak' > type: #ephemeron > comment: 'An Ephemeron is a mechanism both for > instance-based finalization and ...etc... > commentStamp: 'eem 8/26/2015 10:05' > traitComposition: nil > classTraitComposition: nil > > [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: > Receiver: a MCDiffyTextWriter > Arguments and temporary variables: > definition: a WriteStream > s: a MCClassDefinition(Ephemeron) > 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 > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150828/b785a3be/attachment.htm From commits at source.squeak.org Fri Aug 28 17:23:18 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 28 17:23:20 2015 Subject: [squeak-dev] The Trunk: Kernel-eem.949.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.949.mcz ==================== Summary ==================== Name: Kernel-eem.949 Author: eem Time: 28 August 2015, 10:22:44.926 am UUID: d9195787-aea0-48b2-afd4-c3961b86b568 Ancestors: Kernel-eem.948 #~~ has a primitive. Use it. =============== Diff against Kernel-eem.948 =============== Item was changed: ----- Method: ProtoObject>>~~ (in category 'comparing') ----- ~~ anObject "Answer whether the receiver and the argument are not the same object + (do not have the same object pointer). Primitive. Optional." + + self == anObject ifTrue: [^false]. + ^true! - (do not have the same object pointer)." - - self == anObject - ifTrue: [^ false] - ifFalse: [^ true]! From lewis at mail.msen.com Fri Aug 28 17:43:36 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Aug 28 17:43:41 2015 Subject: [squeak-dev] Re: [Vm-dev] can I have access to http://source.squeak.org/FFI? In-Reply-To: <383C13C0-3E73-4E3E-8387-25249AA1C975@gmail.com> References: <51806.136.2.1.105.1440776531.squirrel@webmail.msen.com> <383C13C0-3E73-4E3E-8387-25249AA1C975@gmail.com> Message-ID: <51459.136.2.1.105.1440783816.squirrel@webmail.msen.com> Ah sorry, I see it now. Esteban, I added you as developer on the source.squeak.org/FFI project. CC to squeak-dev: Eliot already indicated his approval on the vm-dev list. I added Esteban to the FFI repo. Current developers on FFI are the Squeak core developers plus Esteban. Dave > Hi Dave, > > no problem with the EL (which in Spanish is like saying ?HIM? :P) > I want to commit to FFI project (not VMMaker), which is allowed for ?core > developers? and I?m not listed there, that?s why I ask to be included > there :) > > Esteban > > > >> On 28 Aug 2015, at 17:42, David T. Lewis wrote: >> >>> >>> So I can commit my changes to FFI (added >>> ExternalAddress>>#loadSymbol:fromModule: method and corresponding >>> test). >>> >>> thanks! >>> Esteban >> >> Hi Esteban, >> >> You already have developer rights on the VMMaker repository, so you >> should >> be able to do commits. We set this up a few years ago, so I don't know >> if >> you still have the password. >> >> Your account is set up as "Esteban Lorenzano (EL)" so I am guessing that >> you may want to use something different now (instead of initials EL). If >> so, please go ahead and set up a new account on source.squeak.org and I >> will add that to the VMMaker project. >> >> Thanks, >> Dave >> >> >> >> > From commits at source.squeak.org Fri Aug 28 19:11:00 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 28 19:11:02 2015 Subject: [squeak-dev] The Trunk: Kernel-eem.950.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.950.mcz ==================== Summary ==================== Name: Kernel-eem.950 Author: eem Time: 28 August 2015, 12:10:24.052 pm UUID: 2b3d6360-4395-4cdf-8186-86c145c93ee2 Ancestors: Kernel-eem.949 Fix deprecated:[block:] =============== Diff against Kernel-eem.949 =============== Item was added: + ----- Method: Deprecation class>>maybeSignalDeprecationFor:message:explanation: (in category 'utilities') ----- + maybeSignalDeprecationFor: context message: messageString explanation: explanationString + ShowDeprecationWarnings == true ifTrue: + [self signal: context method reference, ' has been deprecated', messageString, '. ', explanationString]! Item was changed: ----- Method: Object>>backwardCompatibilityOnly: (in category 'error handling') ----- + backwardCompatibilityOnly: explanationString - backwardCompatibilityOnly: anExplanationString "Warn that the sending method has been deprecated. Methods that are tagt with #backwardCompatibility: are kept for compatibility." + Deprecation + maybeSignalDeprecationFor: thisContext sender + message: ' (but will be kept for compatibility)' + explanation: explanationString! - Preferences showDeprecationWarnings ifTrue: - [Deprecation signal: thisContext sender printString, ' has been deprecated (but will be kept for compatibility). ', anExplanationString]! Item was changed: ----- Method: Object>>deprecated: (in category 'error handling') ----- + deprecated: explanationString - deprecated: anExplanationString "Warn that the sending method has been deprecated." + Deprecation + maybeSignalDeprecationFor: thisContext sender + message: '' + explanation: explanationString! - Preferences showDeprecationWarnings ifTrue: - [Deprecation signal: thisContext sender printString, ' has been deprecated. ', anExplanationString]! Item was changed: ----- Method: Object>>deprecated:block: (in category 'error handling') ----- + deprecated: explanationString block: aBlock - deprecated: anExplanationString block: aBlock "Warn that the sender has been deprecated. Answer the value of aBlock on resumption. (Note that #deprecated: is usually the preferred method.)" + Deprecation + maybeSignalDeprecationFor: thisContext sender + message: '' + explanation: explanationString. - Preferences showDeprecationWarnings ifTrue: - [Deprecation - signal: thisContext sender printString, ' has been deprecated. ', anExplanationString]. ^ aBlock value. ! From vasya.chajko at gmail.com Fri Aug 28 19:50:45 2015 From: vasya.chajko at gmail.com (=?UTF-8?B?0JLQsNGB0Y8g0KfQsNC50LrQvg==?=) Date: Fri Aug 28 19:51:05 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: <1439679369.9270.2@mglap> References: <1439679369.9270.2@mglap> Message-ID: <55E0BB95.2040602@gmail.com> 16.08.2015 4:56, Mateusz Grotek ?????: > Hi, > First of all thank you for the new version of Squeak. It's really great. > > Special thanks for Tobias and Marcel for the font import tool! It > works perfectly. > > Nevertheless I have noticed that there is a regression in Squeak > 4.6/5.0 in the font handling. It's not possible anymore to use > non-english characters even after loading a font that contains them > (I've changed the code font and tried to use the characters in a > workspace). Unnamed1.1.cs > Can anyone verify? > > Mateusz > -------------- next part -------------- 'From Squeak4.6 of 8 July 2015 [latest update: #15102] on 29 August 2015 at 1:17:44 am'! !TTFontReader methodsFor: 'private' stamp: 'vv 7/23/2015 23:28'! decodeCmapFmtTable: entry | cmapFmt length entryCount segCount segments offset cmap firstCode | cmapFmt := entry nextUShort. length := entry nextUShort. entry skip: 2. "skip version" cmapFmt = 0 ifTrue: "byte encoded table" [length := length - 6. "should be always 256" length <= 0 ifTrue: [^ nil]. "but sometimes, this table is empty" cmap := Array new: length. entry nextBytes: length into: cmap startingAt: entry offset. ^ cmap]. cmapFmt = 4 ifTrue: "segment mapping to deltavalues" [segCount := entry nextUShort // 2. entry skip: 6. "skip searchRange, entrySelector, rangeShift" segments := Array new: segCount. segments := (1 to: segCount) collect: [:e | Array new: 4]. 1 to: segCount do: [:i | (segments at: i) at: 2 put: entry nextUShort]. "endCount" entry skip: 2. "skip reservedPad" 1 to: segCount do: [:i | (segments at: i) at: 1 put: entry nextUShort]. "startCount" 1 to: segCount do: [:i | (segments at: i) at: 3 put: entry nextShort]. "idDelta" offset := entry offset. 1 to: segCount do: [:i | (segments at: i) at: 4 put: entry nextUShort]. "idRangeOffset" entryCount := segments inject: 0 into: [:max :seg | max max: seg second]. cmap := Array new: entryCount+1 withAll: 0.. segments withIndexDo: [:seg :si | | code | seg first to: seg second do: [:i | "i < 256 ifTrue: ["seg last > 0 ifTrue: ["offset to glypthIdArray - this is really C-magic!!" entry offset: i - seg first - 1 * 2 + seg last + si + si + offset. code := entry nextUShort. code > 0 ifTrue: [code := code + seg third]] ifFalse: ["simple offset" code := i + seg third]. cmap at: i + 1 put: code"]"]]. ^ cmap]. cmapFmt = 6 ifTrue: "trimmed table" [firstCode := entry nextUShort. entryCount := entry nextUShort. cmap := Array new: entryCount + firstCode withAll: 0. entryCount timesRepeat: [cmap at: (firstCode := firstCode + 1) put: entry nextUShort]. ^ cmap]. ^ nil! ! !TTCFontReader methodsFor: 'as yet unclassified' stamp: 'vv 8/29/2015 00:52'! processCharMap: assoc "Process the given character map" | glyph cmap encode0 encode1 char value null | cmap := assoc value. null := (glyphs at: (cmap at: Character space asUnicode + 1) + 1) copy. null contours: #(). encode0 := Array new: 256 withAll: glyphs first. encode1 := Array new: 65536 withAll: glyphs first. 0 to: 255 do: [:i | char := Character value: i. glyph := glyphs at: (cmap at: char asUnicode + 1) + 1. encode0 at: i+1 put: glyph. ]. Character separators do: [:c | encode0 at: (c asciiValue + 1) put: null. ]. 0 to: 65536 - 1 do: [:i | value := cmap at: i+1. value = 65535 ifFalse: [ "???" | g | g := glyphs at: value+1 ifAbsent: [ null. ]. (g isKindOf: TTCompositeGlyph) ifFalse: [ encode1 at: i+1 put: g. ] ifTrue: [ g basicGlyphs: (((glyphs at: value+1) basicGlyphs) collect: [:t | t key->(glyphs at: (t value glyphIndex+1))]). encode1 at: i+1 put: g ]. ] ]. ^ {encode0. encode1}. ! ! From eliot.miranda at gmail.com Fri Aug 28 20:13:06 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Aug 28 20:13:08 2015 Subject: [squeak-dev] The Trunk: Morphic-eem.1002.mcz In-Reply-To: <979ABC49-E2AB-4CBE-9B1B-F20917010BC2@gmx.de> References: <55dfa58f.81c38c0a.e3b0b.ffffac95SMTPIN_ADDED_MISSING@mx.google.com> <979ABC49-E2AB-4CBE-9B1B-F20917010BC2@gmx.de> Message-ID: Hi Tobias, On Fri, Aug 28, 2015 at 9:56 AM, Tobias Pape wrote: > > On 28.08.2015, at 18:15, Eliot Miranda wrote: > > > Hi Chris, > > > > I wanted to add a "delete all Monticello load change sets" menu pick > to the change set sorter, but because menu pragmas are not right yet the > only way to add a menu item next to another is to edit the menu using > removeMorph: and addMorph:after: (instead of defining order in the menu > pragma itself). > > Huh? Then I've done something wrong. > With you can define an order, and if the order is > adjacent, > menu items should show up adjacent :(. > Then I've probably misunderstood how the scheme should work. Or perhaps the implementation in ChangeSorter is an early one. Anyway, take a look at my attempt to add a single item next to the 'destroy change set (x)' item in ChangeSorter that is in Monticello-eem.617. My intent is to add 'delete Monticello load change sets' after 'destroy change set (x)'. > I'll look into that > > best > -tobias > > > And I can't stomach isKindOf: or isMemberOf:/class to distinguish > MenuItemMorphs from MenuLineMorphs. > > > > Sent from my iPhone > > > >> On Aug 28, 2015, at 8:23 AM, Chris Muller wrote: > >> > >> Why? Just curious.. > >> > >>> On Thu, Aug 27, 2015 at 7:04 PM, wrote: > >>> Eliot Miranda uploaded a new version of Morphic to project The Trunk: > >>> http://source.squeak.org/trunk/Morphic-eem.1002.mcz > >>> > >>> ==================== Summary ==================== > >>> > >>> Name: Morphic-eem.1002 > >>> Author: eem > >>> Time: 27 August 2015, 5:03:26.429 pm > >>> UUID: d94fff6d-5fef-4500-9144-4dc8bfa1510e > >>> Ancestors: Morphic-mt.1001 > >>> > >>> It's really convenient to be able to identify MenuItemMorphs easily. > >>> > >>> =============== Diff against Morphic-mt.1001 =============== > >>> > >>> Item was added: > >>> + ----- Method: MenuItemMorph>>isMenuItemMorph (in category 'testing') > ----- > >>> + isMenuItemMorph > >>> + ^true! > >>> > >>> Item was added: > >>> + ----- Method: Morph>>isMenuItemMorph (in category 'testing') ----- > >>> + isMenuItemMorph > >>> + ^false! > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150828/b42e4e9c/attachment.htm From tim at rowledge.org Fri Aug 28 20:24:15 2015 From: tim at rowledge.org (tim Rowledge) Date: Fri Aug 28 20:24:19 2015 Subject: [squeak-dev] The Trunk: Monticello-eem.617.mcz In-Reply-To: References: <41C01C00-13BF-42D8-BCCB-E6E56550B92C@gmx.de> Message-ID: On 28-08-2015, at 1:35 AM, Kjell Godo wrote: > Pardon me for butting in but > > I am interested in creating a new Class of pop up menu in Pharo > > that doesn't look or act anything like the standard pop up Menus Kjell, you don?t neccessarily need to make a subclass of the current Menu, just so long as your class implements enough of the same methods that it works ok. It?s kind of an obvious point but one I see people forgetting far too often. You may not want many - or any - of the same instance variables or internal behaviours. All you should need to do is implement your menu (round menus![1] with sparkles!) and add a way to decide which menu class gets used. tim [1] round menus have actually been used, not least in the ancient Momenta Smalltalk based tablets of the late 80?s/very early 90?s. -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Why do we want intelligent terminals when there are so many stupid users? From commits at source.squeak.org Fri Aug 28 21:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 28 21:55:05 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150828215503.8174.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-August/008924.html Name: Traits-eem.306 Ancestors: Traits-ul.305 Save a version of Traits that resets the format of existing traits if they were wrong. The Spur bootstrap failed to reset Trait formats so they were left at the V3 value for a zero inst sized pointer class, or 2. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008925.html Name: Morphic-eem.1002 Ancestors: Morphic-mt.1001 It's really convenient to be able to identify MenuItemMorphs easily. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008926.html Name: Monticello-eem.617 Ancestors: Monticello-cmm.616 Add a menu item to nuke Monticello load change sets. This is more involved than it should be but we're getting there. Needs Morphic-eem.1002 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008927.html Name: System-mt.765 Ancestors: System-topa.764 For consistency, also support setting and restoring regular preference within the scope of a block. Like flags (i.e. boolean preferences) support it. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008928.html Name: EToys-kfr.127 Ancestors: EToys-kfr.126 Enhance color settings in PreferenceBrowser towards using more fillstyles for color and borders than just solid fill. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008929.html Name: EToys-mt.128 Ancestors: EToys-ul.127, EToys-kfr.127 Merge additions to color preferences from kfr. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008930.html Name: EToys-mt.129 Ancestors: EToys-mt.128 Removes color preference views (to regular PreferenceBrowser package). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008931.html Name: PreferenceBrowser-mt.55 Ancestors: PreferenceBrowser-mt.54 Adds color preference views (moved from EToys package). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008932.html Name: PreferenceBrowser-mt.56 Ancestors: PreferenceBrowser-mt.55 Fixes menu pop-up for color preferences. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008933.html Name: Regex-Core-ul.44 Ancestors: Regex-Core-ul.43 RxMatcher: - updated class comment - renamed two class variables - added some speedups for those regular expressions which don't have any subexpressions - #resetMarkerPositions is now clearly something extracted from #tryMatch - use the fact that the stream is a stream of characters, so when #next returns nil, then we have found the end of the stream. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008934.html Name: Collections-eem.650 Ancestors: Collections-ul.649 #~~ has a primitive. Use it. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008935.html Name: Kernel-eem.949 Ancestors: Kernel-eem.948 #~~ has a primitive. Use it. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-August/008936.html Name: Kernel-eem.950 Ancestors: Kernel-eem.949 Fix deprecated:[block:] ============================================= From cunningham.cb at gmail.com Fri Aug 28 22:43:37 2015 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Fri Aug 28 22:43:39 2015 Subject: [squeak-dev] Issue updating Squeak 5.0 Message-ID: Hi. While upgrading a 5.0 image: Squeak5.0 latest update: #15117 Current Change Set: Unnamed1 Image format 6521 (32 bit) I get the error: MessageNotUnderstood: CompiledMethod class>>maxNumLiterals It looks like the Compiler update was loaded before the Kernel update - causing failure at that point. The error is coming from Encoder>>maxNumLiterals. Maybe an update map is needed? Anyone else experiencing this? -cbc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150828/2aa8f4af/attachment.htm From cunningham.cb at gmail.com Fri Aug 28 22:49:09 2015 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Fri Aug 28 22:49:12 2015 Subject: [squeak-dev] Issue updating Squeak 5.0 In-Reply-To: References: Message-ID: Hmm. Apparently I was pointed at: source.squeak.org/squeak50 when I got this error. Restarting and pointing to trunk, I no longer have this error. Can we fix the default update stream so others don't run into this issue? -cbc On Fri, Aug 28, 2015 at 3:43 PM, Chris Cunningham wrote: > Hi. > > While upgrading a 5.0 image: > Squeak5.0 > latest update: #15117 > Current Change Set: Unnamed1 > Image format 6521 (32 bit) > > I get the error: > MessageNotUnderstood: CompiledMethod class>>maxNumLiterals > > It looks like the Compiler update was loaded before the Kernel update - > causing failure at that point. The error is coming from > Encoder>>maxNumLiterals. > > Maybe an update map is needed? > > Anyone else experiencing this? > > -cbc > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150828/ad9aa32b/attachment.htm From eliot.miranda at gmail.com Fri Aug 28 22:49:39 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Aug 28 22:49:41 2015 Subject: [squeak-dev] Issue updating Squeak 5.0 In-Reply-To: References: Message-ID: Hi Chris, On Fri, Aug 28, 2015 at 3:43 PM, Chris Cunningham wrote: > Hi. > > While upgrading a 5.0 image: > Squeak5.0 > latest update: #15117 > Current Change Set: Unnamed1 > Image format 6521 (32 bit) > > I get the error: > MessageNotUnderstood: CompiledMethod class>>maxNumLiterals > > It looks like the Compiler update was loaded before the Kernel update - > causing failure at that point. The error is coming from > Encoder>>maxNumLiterals. > > Maybe an update map is needed? > There is. See update-eem.330.mcm which ensures that Kernel-eem.947 is loaded before Compiler-eem.307. Perhaps your update map is still pointing to update.spur? Perhaps your update URL is not yet pointing to trunk? > > Anyone else experiencing this? > > -cbc > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150828/60d7d578/attachment.htm From commits at source.squeak.org Fri Aug 28 22:56:13 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Aug 28 22:56:15 2015 Subject: [squeak-dev] The Inbox: Collections-cbc.650.mcz Message-ID: A new version of Collections was added to project The Inbox: http://source.squeak.org/inbox/Collections-cbc.650.mcz ==================== Summary ==================== Name: Collections-cbc.650 Author: cbc Time: 28 August 2015, 3:56:04.013 pm UUID: 35dc53fb-613d-f84a-bd9d-ffc19957feb8 Ancestors: Collections-ul.649 Add ByteArray methods to deal with long64bit values. =============== Diff against Collections-ul.649 =============== Item was added: + ----- Method: ByteArray>>unsignedLong64At:bigEndian: (in category 'platform independent access') ----- + unsignedLong64At: index bigEndian: aBool + | n1 n2 | + aBool + ifTrue: [ + n2 := self unsignedLongAt: index bigEndian: true. + n1 := self unsignedLongAt: index+4 bigEndian: true. + ] + ifFalse: [ + n1 := self unsignedLongAt: index bigEndian: false. + n2 := self unsignedLongAt: index+4 bigEndian: false. + ]. + ^(n2 bitShift: 32) + n1! Item was added: + ----- Method: ByteArray>>unsignedLong64At:put:bigEndian: (in category 'platform independent access') ----- + unsignedLong64At: index put: val bigEndian: aBool + aBool + ifTrue: [ + self unsignedLongAt: index put: (val bitShift: -32) bigEndian: true. + self unsignedLongAt: index+4 put: (val bitAnd: 16rFFFFFFFF) bigEndian: true. + ] + ifFalse: [ + self unsignedLongAt: index put: (val bitAnd: 16rFFFFFFFF) bigEndian: false. + self unsignedLongAt: index+4 put: (val bitShift: -32) bigEndian: false. + ]. + ^val + ! From cunningham.cb at gmail.com Fri Aug 28 22:58:50 2015 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Fri Aug 28 22:58:52 2015 Subject: [squeak-dev] Issue updating Squeak 5.0 In-Reply-To: References: Message-ID: Right. It was at Squeak50 - the default location for the newly downloaded image. Probably update-eem.330.mcm needs to be copied there. -cbc On Fri, Aug 28, 2015 at 3:49 PM, Eliot Miranda wrote: > Hi Chris, > > On Fri, Aug 28, 2015 at 3:43 PM, Chris Cunningham > wrote: > >> Hi. >> >> While upgrading a 5.0 image: >> Squeak5.0 >> latest update: #15117 >> Current Change Set: Unnamed1 >> Image format 6521 (32 bit) >> >> I get the error: >> MessageNotUnderstood: CompiledMethod class>>maxNumLiterals >> >> It looks like the Compiler update was loaded before the Kernel update - >> causing failure at that point. The error is coming from >> Encoder>>maxNumLiterals. >> >> Maybe an update map is needed? >> > > There is. See update-eem.330.mcm which ensures that Kernel-eem.947 is > loaded before Compiler-eem.307. Perhaps your update map is still pointing > to update.spur? Perhaps your update URL is not yet pointing to trunk? > > >> >> Anyone else experiencing this? >> >> -cbc >> >> >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150828/17ccaf5b/attachment.htm From cunningham.cb at gmail.com Fri Aug 28 23:01:51 2015 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Fri Aug 28 23:01:54 2015 Subject: [squeak-dev] ByteArray accessors for 64-bit manipulation Message-ID: Hi. I've committed a change to the inbox with changes to allow getting/putting 64bit values to ByteArrays (similar to 32 and 16 bit accessors). Could this be added to trunk? Also, first time I used the selective commit function - very nice! the changes I didn't want committed didn't, in fact, get commited. Just the desirable bits! -cbc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150828/02d375f0/attachment.htm From commits at source.squeak.org Sat Aug 29 02:22:49 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Aug 29 02:22:52 2015 Subject: [squeak-dev] The Inbox: MonticelloConfigurations-dtl.137.mcz Message-ID: David T. Lewis uploaded a new version of MonticelloConfigurations to project The Inbox: http://source.squeak.org/inbox/MonticelloConfigurations-dtl.137.mcz ==================== Summary ==================== Name: MonticelloConfigurations-dtl.137 Author: dtl Time: 28 August 2015, 10:22:42.408 pm UUID: 420cae25-4016-48ba-8101-1881773d5098 Ancestors: MonticelloConfigurations-dtl.136 Fix updating the default update map name from preferences. Change constructor to avoid conflict with setter used by the preference. When the preference for default update map changes, initialize with a new default updater. The previous updater for the default update URL is replaced because its remembered position in the update stream will not be valid for a different update map sequence. Therefore ask confirmation from the user before accepting the preference change. Class var UpdateMapName is no longer needed, remove it. The LastUpdateMap class var was retained to support transition to instance based updaters. Remove it now. =============== Diff against MonticelloConfigurations-dtl.136 =============== Item was changed: Object subclass: #MCMcmUpdater instanceVariableNames: 'updateMapName lastUpdateMap' + classVariableNames: 'DefaultUpdateURL SkipPackages UpdateFromServerAtStartup UpdateMissingPackages Updaters' - classVariableNames: 'DefaultUpdateURL LastUpdateMap SkipPackages UpdateFromServerAtStartup UpdateMapName UpdateMissingPackages Updaters' poolDictionaries: '' category: 'MonticelloConfigurations'! + !MCMcmUpdater commentStamp: 'dtl 8/28/2015 22:07' prior: 0! - !MCMcmUpdater commentStamp: 'dtl 5/4/2015 16:03' prior: 0! MCMcmUpdater provides utility methods for updating Monticello packages from Monticello configurations. When Monticello configurations are stored in a repository (or repositories), MCMcmUpdater acts as an update stream. It first ensures that each configuration map has been loaded in sequence, then updates the last configuration map to the most recent version for each specified package, and finally loads these versions to produce a fully updated configuration. Currently if a set of packages are unloaded from the image, using this class to reload them may cause problems, depending on what dependencies those classes have. Success is not assured. Removing packages via SmalltalkImage>>unloadAllKnownPackages will be successful, it flags the packages removed so that they are not loaded by this utility. If you wish to not have MCMcmUpdater update packages, there are two ways to handle this: 1) To have MCMcmUpdater not update any packages not currently in the image set the UpdateMissingPackages preference to false: MCMcmUpdater updateMissingPackages: false Note that any new packages added to the repositories will not be picked up when this is turned off. 2) To have MCMcmUpdater not update a specific package, evaluate MCMcmUpdater disableUpdatesOfPackage: Class Variables definitions: DefaultUpdateURL - String: the URL that will be checked by default for updates. This would be set for a common standard location to check. Updaters - A dictionary of MCMcmUpdater instances keyed by repository URL. SkipPackages - Set of Strings: names of packages to not update in MCMcmUpdater (empty by default). UpdateMissingPackages - Boolean: if true (default), new packages in the update config map will be loaded unless they are in SkipPackages. If false, packages not currently loaded in the image will not be loaded by MCMcmUpdater. (This can be dangerous if packages are split - use at your own risk). Instance Variables: updateMapName - Base name of the files used for this updater, typically a name such as 'update' or 'update.spur'. lastUpdateMap - Dictionary of Integer: version number of the last loaded update map per repository. Keeps track of the last configuration map, so that the utility will not have to run through the full history in the repositories each time you ask to update. ! Item was changed: ----- Method: MCMcmUpdater class>>default (in category 'instance creation') ----- default "The default instance for system updates. Uses a default update map name that may be set as a preference to enable a specific update stream for a repository." ^ self updaters at: self defaultUpdateURL + ifAbsentPut: [self updateMapNamed: self updateMapName]! - ifAbsentPut: [self updateMapName: self updateMapName]! Item was changed: ----- Method: MCMcmUpdater class>>initialize (in category 'class initialization') ----- initialize "MCMcmUpdater initialize" - LastUpdateMap ifNil:[ - LastUpdateMap := Dictionary new. - ]. DefaultUpdateURL ifNil:[ DefaultUpdateURL := MCHttpRepository trunkUrlString. ]. Updaters := nil. - self flag: #FIXME. - "The next line is to faciliate updating from class-side methods to instance based. - Building a new default update map is very time consuming, so do not do it. - Delete this after the transition is complete. Also delete class var LastUpdateMap - and its initialization above. -dtl May 2015" - LastUpdateMap ifNotNil: [ self default lastUpdateMap: LastUpdateMap ] ! Item was changed: ----- Method: MCMcmUpdater class>>updateFromRepositories:using:baseName: (in category 'updating') ----- updateFromRepositories: repositoryUrls using: updaterUrlKey baseName: baseName "Update all repositoryUrls using an MCMcmUpdater identified by updaterUrlKey, and using update map baseName" + ^ (self updateMapNamed: baseName repository: updaterUrlKey) - ^ (self updateMapName: baseName repository: updaterUrlKey) updateFromRepositories: repositoryUrls! Item was changed: ----- Method: MCMcmUpdater class>>updateFromRepository:baseName: (in category 'updating') ----- updateFromRepository: updaterUrlKey baseName: baseName "Update using an MCMcmUpdater identified by updaterUrlKey, and using update map baseName" + ^ (self updateMapNamed: baseName repository: updaterUrlKey) - ^ (self updateMapName: baseName repository: updaterUrlKey) updateFrom: updaterUrlKey! Item was changed: ----- Method: MCMcmUpdater class>>updateMapName (in category 'preferences') ----- updateMapName + "The default update map name" - "Name for update map, without version info" + ^ 'update'! - ^UpdateMapName ifNil: ['update']! Item was changed: + ----- Method: MCMcmUpdater class>>updateMapName: (in category 'preferences') ----- + updateMapName: mapName + "The default update map name for the default updater. If this is changed, + then the default updater must be replaced because its remembered position + in the update map sequence will not be valid for the new update map." - ----- Method: MCMcmUpdater class>>updateMapName: (in category 'instance creation') ----- - updateMapName: baseName - "Answer a new instance with a base update name baseName such as - 'update' or 'update.oscog' " + self default updateMapName = mapName + ifFalse: [(self confirm: 'Initializing updater for ' , DefaultUpdateURL , ' to use new update stream ' , mapName) + ifTrue: [self updaters + at: self defaultUpdateURL + put: (self updateMapNamed: mapName)]]! - ^ self new updateMapName: baseName! Item was removed: - ----- Method: MCMcmUpdater class>>updateMapName:repository: (in category 'instance creation') ----- - updateMapName: baseName repository: url - "Answer an instance for the given repository URL with a base update name - baseName. The instance will be updated in the Updaters dictionary if baseName - has changed." - - | updater | - updater := self updaters at: url ifAbsentPut: [ self updateMapName: baseName ]. - updater updateMapName = baseName - ifFalse: [ ^ self updaters at: url put: (self updateMapName: baseName )]. - ^ updater - ! Item was added: + ----- Method: MCMcmUpdater class>>updateMapNamed: (in category 'instance creation') ----- + updateMapNamed: baseName + "Answer a new instance with a base update name baseName such as + 'update' or 'update.oscog' " + + ^ self new + updateMapName: baseName; + lastUpdateMap: Dictionary new! Item was added: + ----- Method: MCMcmUpdater class>>updateMapNamed:repository: (in category 'instance creation') ----- + updateMapNamed: baseName repository: url + "Answer an instance for the given repository URL with a base update name + baseName. The instance will be updated in the Updaters dictionary if baseName + has changed." + + | updater | + updater := self updaters at: url ifAbsentPut: [ self updateMapNamed: baseName ]. + updater updateMapName = baseName + ifFalse: [ ^ self updaters at: url put: (self updateMapNamed: baseName )]. + ^ updater + ! From lewis at mail.msen.com Sat Aug 29 02:37:41 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Aug 29 02:37:43 2015 Subject: [squeak-dev] Changing the update map name In-Reply-To: References: Message-ID: <20150829023741.GA29806@shell.msen.com> Hi Eliot, This should be resolved in MonticelloConfigurations-dtl.137 in the inbox. I put it in the inbox because it affects the update stream. I think I have a reasonable implementation now, but if you can check it before I move it to trunk I'd appreciate it. A limitation as currently implemented is that changing the update map name requires a new default updater, so the user would be stuck updating the (hopefully new) stream from its beginning. That is fine as long as we really want to switch update streams, but not so good if someone is just fiddling around with the preference settings to see what they do. This can be fixed, but I think this is a relatively infrequent use case so the current approach may be good enough. I did add a confirm dialog to prevent the user from reinitializing the update stream without warning. Dave On Thu, Aug 27, 2015 at 03:41:53PM -0700, Eliot Miranda wrote: > Hi David, Hi All, > > I see a couple of issues with the update map name I can't solve. First, > the change made in May to use a default McMcmUpdater instance means that > the update map name is cached in the instance and I don't see how changing > it in the Preferences browser would either flush the default instance or > update the default instance's updateMapName. Second, changing the update > map name in the Preferences browser has no effect. This seems to be > because there's a conflict between the instance creation message for an > McMcmUpdater: > > McMcmUpdater class>>updateMapName: baseName > "Answer a new instance with a base update name baseName such as > 'update' or 'update.oscog' " > > ^ self new updateMapName: baseName > > and that this is used as the default setter for the preference: > > McMcmUpdater class>>updateMapName > "Name for update map, without version info" > > category: 'updates' > description: 'Base name for the update maps' > type: #String> > > ^UpdateMapName ifNil: ['update'] > > So I guess that we could rename the instance creation message to be > forUpdateMapName: or simply nuke it. i.e. this > > McMcmUpdater class>>default > "The default instance for system updates. Uses a default update map > name that may be set as a preference to enable a specific update stream > for a repository." > > ^ self updaters > at: self defaultUpdateURL > ifAbsentPut: [self updateMapName: self updateMapName] > > would become > > McMcmUpdater class>>default > "The default instance for system updates. Uses a default update map > name that may be set as a preference to enable a specific update stream > for a repository." > > ^ self updaters > at: self defaultUpdateURL > ifAbsentPut: [self forUpdateMapName: self updateMapName] > > or > > McMcmUpdater class>>default > "The default instance for system updates. Uses a default update map > name that may be set as a preference to enable a specific update stream > for a repository." > > ^ self updaters > at: self defaultUpdateURL > ifAbsentPut: [self new updateMapName: self updateMapName] > > and updateMapName: would become > > McMcmUpdater class>> updateMapName: aString > > UpdateMapName := aString > > > _,,,^..^,,,_ > best, Eliot > From edgardec2005 at gmail.com Sat Aug 29 10:31:50 2015 From: edgardec2005 at gmail.com (Edgar De Cleene) Date: Sat Aug 29 10:31:55 2015 Subject: [squeak-dev] Updating SAR builder tool In-Reply-To: <3586E956-0DB3-4239-BB26-E5F2C7B90863@rowledge.org> References: <02A6AB19-EEF7-4E42-AFE9-9C90FD6E5DAB@rowledge.org> <20150828011912.GB98083@shell.msen.com> <0B7902AB-FBEF-4235-BC1B-E133EFBFB7C0@gmail.com> <3586E956-0DB3-4239-BB26-E5F2C7B90863@rowledge.org> Message-ID: The quick dirty how to https://youtu.be/EZucdZZCdYY And Tim I say ?Dave? in the video but is dedicated to all good people here > On Aug 28, 2015, at 1:46 PM, tim Rowledge wrote: > > > On 28-08-2015, at 12:51 AM, Edgar De Cleene wrote: > >> And why do not take my idea of have a Monticello thing what mimics .sar ? > > If you have a better solution, I?m all for using it. All I need is a way to be able to deliver some code/resources to users so they can use their shiny new SuperMegaHAT. That might mean ARM executable files, images, html files for the help system, sound files, whatever. > > I wasn?t even aware that MC could handle non-code stuff, but then the list of things about MC that I am unaware of may as well be considered an uncountable infinite set. > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: MII: Mask all Interrupts and then Interrupt > > > From lewis at mail.msen.com Sat Aug 29 13:27:31 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Aug 29 13:27:33 2015 Subject: [squeak-dev] Updating SAR builder tool In-Reply-To: References: <02A6AB19-EEF7-4E42-AFE9-9C90FD6E5DAB@rowledge.org> <20150828011912.GB98083@shell.msen.com> <0B7902AB-FBEF-4235-BC1B-E133EFBFB7C0@gmail.com> <3586E956-0DB3-4239-BB26-E5F2C7B90863@rowledge.org> Message-ID: <20150829132731.GA47655@shell.msen.com> Good morning Edgar, Thanks for the video. I followed your instructions, and now I am doing the Squeak puzzle with a big cup of coffee. The Montecello extensions seem to work fine. Tim, you might want to take a look at this too. It would need merging into latest trunk but you can see how it works just by loading as in the video. Dave On Sat, Aug 29, 2015 at 07:31:50AM -0300, Edgar De Cleene wrote: > The quick dirty how to > > https://youtu.be/EZucdZZCdYY > > And Tim I say ?Dave? in the video but is dedicated to all good people here > > > > On Aug 28, 2015, at 1:46 PM, tim Rowledge wrote: > > > > > > On 28-08-2015, at 12:51 AM, Edgar De Cleene wrote: > > > >> And why do not take my idea of have a Monticello thing what mimics .sar ? > > > > If you have a better solution, I?m all for using it. All I need is a way to be able to deliver some code/resources to users so they can use their shiny new SuperMegaHAT. That might mean ARM executable files, images, html files for the help system, sound files, whatever. > > > > I wasn?t even aware that MC could handle non-code stuff, but then the list of things about MC that I am unaware of may as well be considered an uncountable infinite set. > > > > > > tim > > -- > > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > > Strange OpCodes: MII: Mask all Interrupts and then Interrupt > > > > > > > From jgr.asselin at me.com Sat Aug 29 14:29:33 2015 From: jgr.asselin at me.com (Raymond Asselin) Date: Sat Aug 29 14:29:36 2015 Subject: [squeak-dev] Updating SAR builder tool In-Reply-To: References: <02A6AB19-EEF7-4E42-AFE9-9C90FD6E5DAB@rowledge.org> <20150828011912.GB98083@shell.msen.com> <0B7902AB-FBEF-4235-BC1B-E133EFBFB7C0@gmail.com> <3586E956-0DB3-4239-BB26-E5F2C7B90863@rowledge.org> Message-ID: <2FD28CBD-E286-4A32-9C33-80A9B2480ACF@me.com> Muchos gratias Edgar Au plaisir Raymond Asselin > Le 2015-08-29 ? 06:31, Edgar De Cleene a ?crit : > > The quick dirty how to > > https://youtu.be/EZucdZZCdYY > > And Tim I say ?Dave? in the video but is dedicated to all good people here > > >> On Aug 28, 2015, at 1:46 PM, tim Rowledge wrote: >> >> >>> On 28-08-2015, at 12:51 AM, Edgar De Cleene wrote: >>> >>> And why do not take my idea of have a Monticello thing what mimics .sar ? >> >> If you have a better solution, I?m all for using it. All I need is a way to be able to deliver some code/resources to users so they can use their shiny new SuperMegaHAT. That might mean ARM executable files, images, html files for the help system, sound files, whatever. >> >> I wasn?t even aware that MC could handle non-code stuff, but then the list of things about MC that I am unaware of may as well be considered an uncountable infinite set. >> >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> Strange OpCodes: MII: Mask all Interrupts and then Interrupt > > From herbertkoenig at gmx.net Sat Aug 29 15:13:53 2015 From: herbertkoenig at gmx.net (=?UTF-8?Q?Herbert_K=c3=b6nig?=) Date: Sat Aug 29 15:13:59 2015 Subject: [squeak-dev] Get raw 24 Bit image data into a Form Message-ID: <55E1CC31.8020601@gmx.net> Hi, how do I go about reading a raw RGB 888 (24 bits deep output from raspiyuv) file into a Form? Form supports 16 or 32 bits depth. Cheers, Herbert From asqueaker at gmail.com Sat Aug 29 16:10:37 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sat Aug 29 16:10:39 2015 Subject: [squeak-dev] The Trunk: Morphic-eem.1002.mcz In-Reply-To: References: <55dfa58f.81c38c0a.e3b0b.ffffac95SMTPIN_ADDED_MISSING@mx.google.com> <979ABC49-E2AB-4CBE-9B1B-F20917010BC2@gmx.de> Message-ID: What is the difference between "delete" and "destroy"? On Fri, Aug 28, 2015 at 3:13 PM, Eliot Miranda wrote: > Hi Tobias, > > On Fri, Aug 28, 2015 at 9:56 AM, Tobias Pape wrote: >> >> >> On 28.08.2015, at 18:15, Eliot Miranda wrote: >> >> > Hi Chris, >> > >> > I wanted to add a "delete all Monticello load change sets" menu pick >> > to the change set sorter, but because menu pragmas are not right yet the >> > only way to add a menu item next to another is to edit the menu using >> > removeMorph: and addMorph:after: (instead of defining order in the menu >> > pragma itself). >> >> Huh? Then I've done something wrong. >> With you can define an order, and if the order is >> adjacent, >> menu items should show up adjacent :(. > > > Then I've probably misunderstood how the scheme should work. Or perhaps the > implementation in ChangeSorter is an early one. Anyway, take a look at my > attempt to add a single item next to the 'destroy change set (x)' item in > ChangeSorter that is in Monticello-eem.617. My intent is to add 'delete > Monticello load change sets' after 'destroy change set (x)'. > >> >> I'll look into that >> >> best >> -tobias >> >> > And I can't stomach isKindOf: or isMemberOf:/class to distinguish >> > MenuItemMorphs from MenuLineMorphs. >> > >> > Sent from my iPhone >> > >> >> On Aug 28, 2015, at 8:23 AM, Chris Muller wrote: >> >> >> >> Why? Just curious.. >> >> >> >>> On Thu, Aug 27, 2015 at 7:04 PM, wrote: >> >>> Eliot Miranda uploaded a new version of Morphic to project The Trunk: >> >>> http://source.squeak.org/trunk/Morphic-eem.1002.mcz >> >>> >> >>> ==================== Summary ==================== >> >>> >> >>> Name: Morphic-eem.1002 >> >>> Author: eem >> >>> Time: 27 August 2015, 5:03:26.429 pm >> >>> UUID: d94fff6d-5fef-4500-9144-4dc8bfa1510e >> >>> Ancestors: Morphic-mt.1001 >> >>> >> >>> It's really convenient to be able to identify MenuItemMorphs easily. >> >>> >> >>> =============== Diff against Morphic-mt.1001 =============== >> >>> >> >>> Item was added: >> >>> + ----- Method: MenuItemMorph>>isMenuItemMorph (in category 'testing') >> >>> ----- >> >>> + isMenuItemMorph >> >>> + ^true! >> >>> >> >>> Item was added: >> >>> + ----- Method: Morph>>isMenuItemMorph (in category 'testing') ----- >> >>> + isMenuItemMorph >> >>> + ^false! >> >> >> > > > > -- > _,,,^..^,,,_ > best, Eliot > > > From eliot.miranda at gmail.com Sat Aug 29 17:22:33 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Aug 29 17:22:39 2015 Subject: [squeak-dev] The Trunk: Morphic-eem.1002.mcz In-Reply-To: References: <55dfa58f.81c38c0a.e3b0b.ffffac95SMTPIN_ADDED_MISSING@mx.google.com> <979ABC49-E2AB-4CBE-9B1B-F20917010BC2@gmx.de> Message-ID: <4CC0B7A0-9FBE-43C1-A2ED-A02DE65DA9BE@gmail.com> Sent from my iPhone > On Aug 29, 2015, at 9:10 AM, Chris Muller wrote: > > What is the difference between "delete" and "destroy"? one brain fart > >> On Fri, Aug 28, 2015 at 3:13 PM, Eliot Miranda wrote: >> Hi Tobias, >> >>> On Fri, Aug 28, 2015 at 9:56 AM, Tobias Pape wrote: >>> >>> >>>> On 28.08.2015, at 18:15, Eliot Miranda wrote: >>>> >>>> Hi Chris, >>>> >>>> I wanted to add a "delete all Monticello load change sets" menu pick >>>> to the change set sorter, but because menu pragmas are not right yet the >>>> only way to add a menu item next to another is to edit the menu using >>>> removeMorph: and addMorph:after: (instead of defining order in the menu >>>> pragma itself). >>> >>> Huh? Then I've done something wrong. >>> With you can define an order, and if the order is >>> adjacent, >>> menu items should show up adjacent :(. >> >> >> Then I've probably misunderstood how the scheme should work. Or perhaps the >> implementation in ChangeSorter is an early one. Anyway, take a look at my >> attempt to add a single item next to the 'destroy change set (x)' item in >> ChangeSorter that is in Monticello-eem.617. My intent is to add 'delete >> Monticello load change sets' after 'destroy change set (x)'. >> >>> >>> I'll look into that >>> >>> best >>> -tobias >>> >>>> And I can't stomach isKindOf: or isMemberOf:/class to distinguish >>>> MenuItemMorphs from MenuLineMorphs. >>>> >>>> Sent from my iPhone >>>> >>>>> On Aug 28, 2015, at 8:23 AM, Chris Muller wrote: >>>>> >>>>> Why? Just curious.. >>>>> >>>>>> On Thu, Aug 27, 2015 at 7:04 PM, wrote: >>>>>> Eliot Miranda uploaded a new version of Morphic to project The Trunk: >>>>>> http://source.squeak.org/trunk/Morphic-eem.1002.mcz >>>>>> >>>>>> ==================== Summary ==================== >>>>>> >>>>>> Name: Morphic-eem.1002 >>>>>> Author: eem >>>>>> Time: 27 August 2015, 5:03:26.429 pm >>>>>> UUID: d94fff6d-5fef-4500-9144-4dc8bfa1510e >>>>>> Ancestors: Morphic-mt.1001 >>>>>> >>>>>> It's really convenient to be able to identify MenuItemMorphs easily. >>>>>> >>>>>> =============== Diff against Morphic-mt.1001 =============== >>>>>> >>>>>> Item was added: >>>>>> + ----- Method: MenuItemMorph>>isMenuItemMorph (in category 'testing') >>>>>> ----- >>>>>> + isMenuItemMorph >>>>>> + ^true! >>>>>> >>>>>> Item was added: >>>>>> + ----- Method: Morph>>isMenuItemMorph (in category 'testing') ----- >>>>>> + isMenuItemMorph >>>>>> + ^false! >> >> >> >> -- >> _,,,^..^,,,_ >> best, Eliot > From karlramberg at gmail.com Sat Aug 29 18:34:35 2015 From: karlramberg at gmail.com (karl ramberg) Date: Sat Aug 29 18:34:37 2015 Subject: [squeak-dev] [Bug] Cannot use non-english characters even after loading a proper font In-Reply-To: <55E0BB95.2040602@gmail.com> References: <1439679369.9270.2@mglap> <55E0BB95.2040602@gmail.com> Message-ID: Seems to work, at least your name comes out ok with imported Arial font. The out commented code is confusing in TTFontReader>>decodeCmapFmtTable: Karl On Fri, Aug 28, 2015 at 9:50 PM, ???? ????? wrote: > 16.08.2015 4:56, Mateusz Grotek ?????: > >> Hi, >> First of all thank you for the new version of Squeak. It's really great. >> >> Special thanks for Tobias and Marcel for the font import tool! It works >> perfectly. >> >> Nevertheless I have noticed that there is a regression in Squeak 4.6/5.0 >> in the font handling. It's not possible anymore to use non-english >> characters even after loading a font that contains them (I've changed the >> code font and tried to use the characters in a workspace). >> > Unnamed1.1.cs > >> Can anyone verify? >> >> Mateusz >> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150829/cde14ab7/attachment.htm From tim at rowledge.org Sat Aug 29 19:02:27 2015 From: tim at rowledge.org (tim Rowledge) Date: Sat Aug 29 19:02:31 2015 Subject: [squeak-dev] Get raw 24 Bit image data into a Form In-Reply-To: <55E1CC31.8020601@gmx.net> References: <55E1CC31.8020601@gmx.net> Message-ID: On 29-08-2015, at 8:13 AM, Herbert K?nig wrote: > Hi, > > how do I go about reading a raw RGB 888 (24 bits deep output from raspiyuv) file into a Form? Well we need to understand the file format first to decode it and so far as some quick googling tells me the yuv files are completely raw; no header to tell us anything, just a long list of bytes. Since you can control the width and height of the image the camera takes (apparently, though it looks like it gets rounded up to 32 pixels in width and 16 in height?) I guess we can at least in principle assume the w & d for the data. The RGB888 is pretty much the Squeak pixels format for 32bpp anyway so there shouldn?t be too much of a problem. Basically take your picture and write to file open file as binary in Squeak `myFileStream := (FileStream readOnlyFileNamed: ?my.yuv?) binary` create a Form of appropriate size & depth `myForm := Form extent: width@height depth: 32` read bytes from the filestream and stick them in the form?s bits array. There will be issues of byte-endianness to get right (squeak bitmaps are for some demented reason big-endian and I?d guess the pi YUV files are little-endian) and you?ll have to fill in the top (or bottom, see endianness) byte to set the alpha correctly. It?ll be something along the lines of checking the sizes match up, reading the data into the form?s bits array and making sure the bits all line up. Here?s a quick example from my pi2, since it tickled my curiousity in terminal - `raspiyuv -w 320 -h 208 -rgb -o smple.yuv` in Squeak Form extent: 320@208 depth: 32 -> inspect it in the inspector - |myfile alpha| myfile := FileStream readOnlyFileNamed: ?/home/pi/sample.yuv?. myfile binary. bits size * 3 = myfile size ifFalse:[^nil]. alpha := 16rFF<<24. 1 to: bits size do: [ :i| |val| val := myfile next. val := val <<8 + myfile next. val := val <<8 + myfile next. val := alpha bitOr: val. bits at: i put: val]. myfile close self display I get a pretty decent image displayed. Takes 250 mSec to read in on my pi2 with a cog-spur squeak. A bit over half that is the cost of using the largeinteger ?alpha? to set the proper alpha value for each pixel. You *can* leave that out if you?re going to simply do ?myform display? since the raw bitblt ignores the alpha. If you are going to be examining the pixels as just rgb values, save the time - I see 120mS in that case. Obviously once you have the general format sorted it ought to get moved into Form and tidied up as From class>>readRGBFromFileNamed: or similar. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- If you give him a penny for his thoughts, you get change back. From edgardec2005 at gmail.com Sun Aug 30 05:20:19 2015 From: edgardec2005 at gmail.com (Edgar De Cleene) Date: Sun Aug 30 05:20:25 2015 Subject: [squeak-dev] Updating SAR builder tool In-Reply-To: <2FD28CBD-E286-4A32-9C33-80A9B2480ACF@me.com> References: <02A6AB19-EEF7-4E42-AFE9-9C90FD6E5DAB@rowledge.org> <20150828011912.GB98083@shell.msen.com> <0B7902AB-FBEF-4235-BC1B-E133EFBFB7C0@gmail.com> <3586E956-0DB3-4239-BB26-E5F2C7B90863@rowledge.org> <2FD28CBD-E286-4A32-9C33-80A9B2480ACF@me.com> Message-ID: Sure you could made good use of this, and thanks for your music > On Aug 29, 2015, at 11:29, Raymond Asselin wrote: > > Muchos gratias Edgar > > Au plaisir > Raymond Asselin > >> Le 2015-08-29 ? 06:31, Edgar De Cleene a ?crit : >> >> The quick dirty how to >> >> https://youtu.be/EZucdZZCdYY >> >> And Tim I say ?Dave? in the video but is dedicated to all good people here >> >> >>> On Aug 28, 2015, at 1:46 PM, tim Rowledge wrote: >>> >>> >>>> On 28-08-2015, at 12:51 AM, Edgar De Cleene wrote: >>>> >>>> And why do not take my idea of have a Monticello thing what mimics .sar ? >>> >>> If you have a better solution, I?m all for using it. All I need is a way to be able to deliver some code/resources to users so they can use their shiny new SuperMegaHAT. That might mean ARM executable files, images, html files for the help system, sound files, whatever. >>> >>> I wasn?t even aware that MC could handle non-code stuff, but then the list of things about MC that I am unaware of may as well be considered an uncountable infinite set. >>> >>> >>> tim >>> -- >>> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >>> Strange OpCodes: MII: Mask all Interrupts and then Interrupt >> >> > From leves at elte.hu Sun Aug 30 13:03:38 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sun Aug 30 13:03:42 2015 Subject: [squeak-dev] Get raw 24 Bit image data into a Form In-Reply-To: References: <55E1CC31.8020601@gmx.net> Message-ID: It's possible to set the alpha without sacrificing performance. | extent result | extent := 320 @ 208. result := StandardFileStream readOnlyFileNamed: 'sample.yuv' do: [ :file | file binary. extent area * 3 = file size ifTrue: [ | word bits form | form := Form extent: extent depth: 32. bits := form bits. word := 16rFF bitShift: 24. 1 to: bits size do: [ :i | word digitAt: 3 put: file next; digitAt: 2 put: file next; digitAt: 1 put: file next. bits at: i put: word ]. form ] ]. result display. Levente P.S.: This is usually the point when someone comes up with a pure bitblt solution providing further significant speedups. On Sat, 29 Aug 2015, tim Rowledge wrote: > > On 29-08-2015, at 8:13 AM, Herbert K?nig wrote: > >> Hi, >> >> how do I go about reading a raw RGB 888 (24 bits deep output from raspiyuv) file into a Form? > > Well we need to understand the file format first to decode it and so far as some quick googling tells me the yuv files are completely raw; no header to tell us anything, just a long list of bytes. Since you can control the width and height of the image the camera takes (apparently, though it looks like it gets rounded up to 32 pixels in width and 16 in height?) I guess we can at least in principle assume the w & d for the data. The RGB888 is pretty much the Squeak pixels format for 32bpp anyway so there shouldn?t be too much of a problem. > > Basically > take your picture and write to file > open file as binary in Squeak `myFileStream := (FileStream readOnlyFileNamed: ?my.yuv?) binary` > create a Form of appropriate size & depth `myForm := Form extent: width@height depth: 32` > read bytes from the filestream and stick them in the form?s bits array. There will be issues of byte-endianness to get right (squeak bitmaps are for some demented reason big-endian and I?d guess the pi YUV files are little-endian) and you?ll have to fill in the top (or bottom, see endianness) byte to set the alpha correctly. > > It?ll be something along the lines of checking the sizes match up, reading the data into the form?s bits array and making sure the bits all line up. > > Here?s a quick example from my pi2, since it tickled my curiousity > > in terminal - `raspiyuv -w 320 -h 208 -rgb -o smple.yuv` > in Squeak > Form extent: 320@208 depth: 32 -> inspect it > in the inspector - > |myfile alpha| > myfile := FileStream readOnlyFileNamed: ?/home/pi/sample.yuv?. > myfile binary. > bits size * 3 = myfile size ifFalse:[^nil]. > alpha := 16rFF<<24. > 1 to: bits size do: [ :i| |val| > val := myfile next. > val := val <<8 + myfile next. > val := val <<8 + myfile next. > val := alpha bitOr: val. > bits at: i put: val]. > myfile close > self display > > I get a pretty decent image displayed. Takes 250 mSec to read in on my pi2 with a cog-spur squeak. A bit over half that is the cost of using the largeinteger ?alpha? to set the proper alpha value for each pixel. You *can* leave that out if you?re going to simply do ?myform display? since the raw bitblt ignores the alpha. If you are going to be examining the pixels as just rgb values, save the time - I see 120mS in that case. > > > Obviously once you have the general format sorted it ought to get moved into Form and tidied up as From class>>readRGBFromFileNamed: or similar. > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful random insult:- If you give him a penny for his thoughts, you get change back. > > > > From herbertkoenig at gmx.net Sun Aug 30 15:19:13 2015 From: herbertkoenig at gmx.net (=?UTF-8?Q?Herbert_K=c3=b6nig?=) Date: Sun Aug 30 15:19:16 2015 Subject: [squeak-dev] Get raw 24 Bit image data into a Form In-Reply-To: References: <55E1CC31.8020601@gmx.net> Message-ID: <55E31EF1.8010505@gmx.net> Hi, this works with image size of 320 @ 208. On my A+ with a size of 1280*832 Tim's version takes 10-12 seconds without displaying the Form. Levente's version takes about 1.5 to 3 seconds. This is already too slow for me. Here: https://www.raspberrypi.org/documentation/raspbian/applications/camera.md (search for --rgb) suggests that padding for multiples of 16 may occur. I thought I would get away with just ignoring the end of the file by changing the test to (extent area * 3 <= file size) as long as x is dividable by 16. But already with 1296@832 which can both be divided by 16 some padding after each line sets in and the resulting image is garbled if that's not taken into account. I want 1296@972 image size to take advantage of the camera module's binning capability (adding four physical pixels to reduce noise) in my long night exposures. Finding out the buffer length after which they start padding and accounting for that will not help as it will make the code slower, even if not much. If you happen to know the buffer size of raspiyuv, please tell me so I can play a bit. Thanks to both for chiming in. I learned something :-)) Herbert > | extent result | > extent := 320 @ 208. > result := StandardFileStream readOnlyFileNamed: 'sample.yuv' do: [ > :file | > file binary. > extent area * 3 = file size ifTrue: [ > | word bits form | > form := Form extent: extent depth: 32. > bits := form bits. > word := 16rFF bitShift: 24. > 1 to: bits size do: [ :i | > word > digitAt: 3 put: file next; > digitAt: 2 put: file next; > digitAt: 1 put: file next. > bits at: i put: word ]. > form ] ]. > result display. > > Levente > > P.S.: This is usually the point when someone comes up with a pure > bitblt solution providing further significant speedups. > > On Sat, 29 Aug 2015, tim Rowledge wrote: > >> >> On 29-08-2015, at 8:13 AM, Herbert K?nig wrote: >> >>> Hi, >>> >>> how do I go about reading a raw RGB 888 (24 bits deep output from >>> raspiyuv) file into a Form? >> >> Well we need to understand the file format first to decode it and so >> far as some quick googling tells me the yuv files are completely raw; >> no header to tell us anything, just a long list of bytes. Since you >> can control the width and height of the image the camera takes >> (apparently, though it looks like it gets rounded up to 32 pixels in >> width and 16 in height?) I guess we can at least in principle assume >> the w & d for the data. The RGB888 is pretty much the Squeak pixels >> format for 32bpp anyway so there shouldn?t be too much of a problem. >> >> Basically >> take your picture and write to file >> open file as binary in Squeak `myFileStream := (FileStream >> readOnlyFileNamed: ?my.yuv?) binary` >> create a Form of appropriate size & depth `myForm := Form extent: >> width@height depth: 32` >> read bytes from the filestream and stick them in the form?s bits >> array. There will be issues of byte-endianness to get right (squeak >> bitmaps are for some demented reason big-endian and I?d guess the pi >> YUV files are little-endian) and you?ll have to fill in the top (or >> bottom, see endianness) byte to set the alpha correctly. >> >> It?ll be something along the lines of checking the sizes match up, >> reading the data into the form?s bits array and making sure the bits >> all line up. >> >> Here?s a quick example from my pi2, since it tickled my curiousity >> >> in terminal - `raspiyuv -w 320 -h 208 -rgb -o smple.yuv` >> in Squeak >> Form extent: 320@208 depth: 32 -> inspect it >> in the inspector - >> |myfile alpha| >> myfile := FileStream readOnlyFileNamed: ?/home/pi/sample.yuv?. >> myfile binary. >> bits size * 3 = myfile size ifFalse:[^nil]. >> alpha := 16rFF<<24. >> 1 to: bits size do: [ :i| |val| >> val := myfile next. >> val := val <<8 + myfile next. >> val := val <<8 + myfile next. >> val := alpha bitOr: val. >> bits at: i put: val]. >> myfile close >> self display >> >> I get a pretty decent image displayed. Takes 250 mSec to read in on >> my pi2 with a cog-spur squeak. A bit over half that is the cost of >> using the largeinteger ?alpha? to set the proper alpha value for each >> pixel. You *can* leave that out if you?re going to simply do ?myform >> display? since the raw bitblt ignores the alpha. If you are going to >> be examining the pixels as just rgb values, save the time - I see >> 120mS in that case. >> >> >> Obviously once you have the general format sorted it ought to get >> moved into Form and tidied up as From class>>readRGBFromFileNamed: or >> similar. >> >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> Useful random insult:- If you give him a penny for his thoughts, you >> get change back. >> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150830/ed23ee44/attachment.htm From leves at elte.hu Sun Aug 30 17:35:27 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sun Aug 30 17:35:32 2015 Subject: [squeak-dev] Get raw 24 Bit image data into a Form In-Reply-To: <55E31EF1.8010505@gmx.net> References: <55E1CC31.8020601@gmx.net> <55E31EF1.8010505@gmx.net> Message-ID: Hi Herbert, Wouldn't it be better to use raspistill instead of raspiyuv, and generate a jpg or png file directly? Levente On Sun, 30 Aug 2015, Herbert K?nig wrote: > Hi, > > this works with image size of 320 @ 208. On my A+ with a size of 1280*832 Tim's version takes 10-12 seconds without displaying the Form. Levente's > version takes about 1.5 to 3 seconds. This is already too slow for me. > ? > Here: > https://www.raspberrypi.org/documentation/raspbian/applications/camera.md (search for --rgb) > suggests that padding for multiples of 16 may occur. > I thought I would get away with just ignoring the end of the file by changing the test to (extent area * 3 <= file size) as long as x is dividable > by 16. But already with 1296@832 which can both be divided by 16 some padding after each line sets in and the resulting image is garbled if that's > not taken into account. > > I want 1296@972 image size to take advantage of the camera module's binning capability (adding four physical pixels to reduce noise) in my long > night exposures. > Finding out the buffer length after which they start padding and accounting for that will not help as it will make the code slower, even if not > much. If you happen to know the buffer size of raspiyuv, please tell me so I can play a bit. > > Thanks to both for chiming in. I learned something :-)) > > Herbert > > > | extent result | > extent := 320 @ 208. > result := StandardFileStream readOnlyFileNamed: 'sample.yuv' do: [ :file | > ????file binary. > ????extent area * 3 = file size ifTrue: [ > ??????? | word bits form | > ??????? form := Form extent: extent depth: 32. > ??????? bits := form bits. > ??????? word := 16rFF bitShift: 24. > ??????? 1 to: bits size do: [ :i | > ??????????? word > ??????????????? digitAt: 3 put: file next; > ??????????????? digitAt: 2 put: file next; > ??????????????? digitAt: 1 put: file next. > ??????????? bits at: i put: word ]. > ??????? form ] ]. > result display. > > Levente > > P.S.: This is usually the point when someone comes up with a pure bitblt solution providing further significant speedups. > > On Sat, 29 Aug 2015, tim Rowledge wrote: > > > On 29-08-2015, at 8:13 AM, Herbert K?nig wrote: > > Hi, > > how do I go about reading a raw RGB 888 (24 bits deep output from raspiyuv) file into a Form? > > > Well we need to understand the file format first to decode it and so far as some quick googling tells me the yuv files are > completely raw; no header to tell us anything, just a long list of bytes. Since you can control the width and height of > the image the camera takes (apparently, though it looks like it gets rounded up to 32 pixels in width and 16 in height?) I > guess we can at least in principle assume the w & d for the data. The RGB888 is pretty much the Squeak pixels format for > 32bpp anyway so there shouldn?t be too much of a problem. > > Basically > take your picture and write to file > open file as binary in Squeak `myFileStream := (FileStream readOnlyFileNamed: ?my.yuv?) binary` > create a Form of appropriate size & depth? `myForm := Form extent: width@height depth: 32` > read bytes from the filestream and stick them in the form?s bits array. There will be issues of byte-endianness to get > right (squeak bitmaps are for some demented reason big-endian and I?d guess the pi YUV files are little-endian) and you?ll > have to fill in the top (or bottom, see endianness) byte to set the alpha correctly. > > It?ll be something along the lines of checking the sizes match up, reading the data into the form?s bits array and making > sure the bits all line up. > > Here?s a quick example from my pi2, since it tickled my curiousity > > in terminal - `raspiyuv -w 320 -h 208 -rgb -o smple.yuv` > in Squeak > Form extent: 320@208 depth: 32 -> inspect it > in the inspector - > |myfile alpha| > myfile := FileStream readOnlyFileNamed: ?/home/pi/sample.yuv?. > myfile binary. > bits size * 3 = myfile size ifFalse:[^nil]. > alpha := 16rFF<<24. > 1 to: bits size do: [ :i| |val| > val := myfile next. > val := val <<8 + myfile next. > val := val <<8 + myfile next. > val := alpha bitOr: val. > bits at: i put: val]. > myfile close > self display > > I get a pretty decent image displayed. Takes 250 mSec to read in on my pi2 with a cog-spur squeak. A bit over half that is > the cost of using the largeinteger ?alpha? to set the proper alpha value for each pixel. You *can* leave that out if > you?re going to simply do ?myform display? since the raw bitblt ignores the alpha. If you are going to be examining the > pixels as just rgb values, save the time - I see 120mS in that case. > > > Obviously once you have the general format sorted it ought to get moved into Form and tidied up as From > class>>readRGBFromFileNamed: or similar. > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful random insult:- If you give him a penny for his thoughts, you get change back. > > > > > > > > > From herbertkoenig at gmx.net Sun Aug 30 17:49:24 2015 From: herbertkoenig at gmx.net (=?UTF-8?Q?Herbert_K=c3=b6nig?=) Date: Sun Aug 30 17:49:27 2015 Subject: [squeak-dev] Get raw 24 Bit image data into a Form In-Reply-To: References: <55E1CC31.8020601@gmx.net> <55E31EF1.8010505@gmx.net> Message-ID: <55E34224.4090906@gmx.net> Hi Levente, I do that. I asked here because I found a bug in bmp saving of Raspistill. http://www.raspberrypi.org/forums/viewtopic.php?f=43&t=119050 6by9 suggested to use raspiyuv and I wanted to at least verify that raspiyuv doesn't have this bug. It doesn't. I can live with the bug because first thing I compute the difference between two consecutive images via BitBlt. This makes the problem vanish. On that I do a very specialized motion detection to identify cats using the garden as a toilet :-)). I only noticed the problem because I save the photos creating an alarm. Cheers, Herbert Am 30.08.2015 um 19:35 schrieb Levente Uzonyi: > Hi Herbert, > > Wouldn't it be better to use raspistill instead of raspiyuv, and > generate a jpg or png file directly? > > Levente > > On Sun, 30 Aug 2015, Herbert K?nig wrote: > >> Hi, >> >> this works with image size of 320 @ 208. On my A+ with a size of >> 1280*832 Tim's version takes 10-12 seconds without displaying the >> Form. Levente's >> version takes about 1.5 to 3 seconds. This is already too slow for me. >> >> Here: >> https://www.raspberrypi.org/documentation/raspbian/applications/camera.md >> (search for --rgb) >> suggests that padding for multiples of 16 may occur. >> I thought I would get away with just ignoring the end of the file by >> changing the test to (extent area * 3 <= file size) as long as x is >> dividable >> by 16. But already with 1296@832 which can both be divided by 16 some >> padding after each line sets in and the resulting image is garbled if >> that's >> not taken into account. >> >> I want 1296@972 image size to take advantage of the camera module's >> binning capability (adding four physical pixels to reduce noise) in >> my long >> night exposures. >> Finding out the buffer length after which they start padding and >> accounting for that will not help as it will make the code slower, >> even if not >> much. If you happen to know the buffer size of raspiyuv, please tell >> me so I can play a bit. >> >> Thanks to both for chiming in. I learned something :-)) >> >> Herbert >> >> >> | extent result | >> extent := 320 @ 208. >> result := StandardFileStream readOnlyFileNamed: 'sample.yuv' >> do: [ :file | >> file binary. >> extent area * 3 = file size ifTrue: [ >> | word bits form | >> form := Form extent: extent depth: 32. >> bits := form bits. >> word := 16rFF bitShift: 24. >> 1 to: bits size do: [ :i | >> word >> digitAt: 3 put: file next; >> digitAt: 2 put: file next; >> digitAt: 1 put: file next. >> bits at: i put: word ]. >> form ] ]. >> result display. >> >> Levente >> >> P.S.: This is usually the point when someone comes up with a >> pure bitblt solution providing further significant speedups. >> >> On Sat, 29 Aug 2015, tim Rowledge wrote: >> >> >> On 29-08-2015, at 8:13 AM, Herbert K?nig >> wrote: >> >> Hi, >> >> how do I go about reading a raw RGB 888 (24 bits >> deep output from raspiyuv) file into a Form? >> >> >> Well we need to understand the file format first to >> decode it and so far as some quick googling tells me the yuv files are >> completely raw; no header to tell us anything, just a >> long list of bytes. Since you can control the width and height of >> the image the camera takes (apparently, though it looks >> like it gets rounded up to 32 pixels in width and 16 in height?) I >> guess we can at least in principle assume the w & d for >> the data. The RGB888 is pretty much the Squeak pixels format for >> 32bpp anyway so there shouldn?t be too much of a problem. >> >> Basically >> take your picture and write to file >> open file as binary in Squeak `myFileStream := >> (FileStream readOnlyFileNamed: ?my.yuv?) binary` >> create a Form of appropriate size & depth `myForm := Form >> extent: width@height depth: 32` >> read bytes from the filestream and stick them in the >> form?s bits array. There will be issues of byte-endianness to get >> right (squeak bitmaps are for some demented reason >> big-endian and I?d guess the pi YUV files are little-endian) and you?ll >> have to fill in the top (or bottom, see endianness) byte >> to set the alpha correctly. >> >> It?ll be something along the lines of checking the sizes >> match up, reading the data into the form?s bits array and making >> sure the bits all line up. >> >> Here?s a quick example from my pi2, since it tickled my >> curiousity >> >> in terminal - `raspiyuv -w 320 -h 208 -rgb -o smple.yuv` >> in Squeak >> Form extent: 320@208 depth: 32 -> inspect it >> in the inspector - >> |myfile alpha| >> myfile := FileStream readOnlyFileNamed: >> ?/home/pi/sample.yuv?. >> myfile binary. >> bits size * 3 = myfile size ifFalse:[^nil]. >> alpha := 16rFF<<24. >> 1 to: bits size do: [ :i| |val| >> val := myfile next. >> val := val <<8 + myfile next. >> val := val <<8 + myfile next. >> val := alpha bitOr: val. >> bits at: i put: val]. >> myfile close >> self display >> >> I get a pretty decent image displayed. Takes 250 mSec to >> read in on my pi2 with a cog-spur squeak. A bit over half that is >> the cost of using the largeinteger ?alpha? to set the >> proper alpha value for each pixel. You *can* leave that out if >> you?re going to simply do ?myform display? since the raw >> bitblt ignores the alpha. If you are going to be examining the >> pixels as just rgb values, save the time - I see 120mS in >> that case. >> >> >> Obviously once you have the general format sorted it >> ought to get moved into Form and tidied up as From >> class>>readRGBFromFileNamed: or similar. >> >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> Useful random insult:- If you give him a penny for his >> thoughts, you get change back. >> >> >> >> >> >> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150830/06a490e2/attachment.htm From tim at rowledge.org Sun Aug 30 18:04:01 2015 From: tim at rowledge.org (tim Rowledge) Date: Sun Aug 30 18:04:08 2015 Subject: [squeak-dev] Get raw 24 Bit image data into a Form In-Reply-To: <55E31EF1.8010505@gmx.net> References: <55E1CC31.8020601@gmx.net> <55E31EF1.8010505@gmx.net> Message-ID: <2651B287-7CC9-4B15-9BA2-7BB378A8ACF9@rowledge.org> On 30-08-2015, at 8:19 AM, Herbert K?nig wrote: > this works with image size of 320 @ 208. On my A+ with a size of 1280*832 Tim's version takes 10-12 seconds without displaying the Form. Levente's version takes about 1.5 to 3 seconds. This is already too slow for me. > You?re not going to get hugely faster with any code that involves a cycle of writing a file from raspiyuv and then reading that file. The FS interface on the Pi simply isn?t all that quick. What you might be able to do is cut out the middle? err, fileman, and get access to the camera buffer directly. I have no idea exactly how the hardware works but for the Scratch camera UI we go via v4linux2 and mmap stuff. Maybe it?s possible to even side-step v4l2 ? As an example on my Pi2 - sudo modprobe bcm2835-v4l2 - to get the video4linux2 driver loaded |frameForm| (CameraPlugin cameraName: 1) ifNotNil: [|n frameExtent t| (CameraPlugin openCamera: 1 width: 1296 height: 832) ifNotNil: [ frameForm := Form extent: (CameraPlugin frameExtent: 1) depth: 32. frameExtent := frameForm extent. Delay waitMSecs: 400]. t := Time millisecondsToRun: [n := CameraPlugin getFrameForCamera: 1 into: frameForm bits]. CameraPlugin closeCamera: 1. n = 0 ifTrue: [^ false]. frameForm display. t] = 18mSec So, much faster it seems. The CameraPlugin code is available from the squeakvm.org svn tree easily enough and the Smalltalk code is easily sendable. The plugin itself is included in any recent Pi VM. Even if the A+ takes 3x longer it seems potentially useful to me. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Never write software that anthropomorphizes the machine. They hate that. From asqueaker at gmail.com Sun Aug 30 21:38:45 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sun Aug 30 21:38:47 2015 Subject: [squeak-dev] ByteArray accessors for 64-bit manipulation In-Reply-To: References: Message-ID: Hi Chris, I think these methods belong in the image with the fastest implementation we can do. I implemented 64-bit unsigned access for Ma Serializer back in 2005. I modeled my implementation after Andreas' original approach which tries to avoid LI arithmetic. I was curious whether your implementations would be faster, because if they are then it could benefit Magma. After loading "Ma Serializer" 1.5 (or head) into a trunk image, I used the following script to take comparison measurements: | smallN largeN maBa cbBa | smallN := ((2 raisedTo: 13) to: (2 raisedTo: 14)) atRandom. largeN := ((2 raisedTo: 63) to: (2 raisedTo: 64)) atRandom. maBa := ByteArray new: 8. cbBa := ByteArray new: 8. maBa maUint: 64 at: 0 put: largeN. cbBa unsignedLong64At: 1 put: largeN bigEndian: false. self assert: (cbBa maUnsigned64At: 1) = (maBa unsignedLong64At: 1 bigEndian: false). { 'cbc smallN write' -> [ cbBa unsignedLong64At: 1 put: smallN bigEndian: false] bench. 'ma smallN write' -> [cbBa maUint: 64 at: 0 put: smallN ] bench. 'cbc smallN access' -> [ cbBa unsignedLong64At: 1 bigEndian: false. ] bench. 'ma smallN access' -> [ cbBa maUnsigned64At: 1] bench. 'cbc largeN write' -> [ cbBa unsignedLong64At: 1 put: largeN bigEndian: false] bench. 'ma largeN write' -> [cbBa maUint: 64 at: 0 put: largeN ] bench. 'cbc largeN access' -> [ cbBa unsignedLong64At: 1 bigEndian: false ] bench. 'ma largeN access' -> [ cbBa maUnsigned64At: 1] bench. } Here are the results: 'cbc smallN write'->'3,110,000 per second. 322 nanoseconds per run.' . 'ma smallN write'->'4,770,000 per second. 210 nanoseconds per run.' . 'cbc smallN access'->'4,300,000 per second. 233 nanoseconds per run.' . 'ma smallN access'->'16,400,000 per second. 60.9 nanoseconds per run.' . 'cbc largeN write'->'907,000 per second. 1.1 microseconds per run.' . 'ma largeN write'->'6,620,000 per second. 151 nanoseconds per run.' . 'cbc largeN access'->'1,900,000 per second. 527 nanoseconds per run.' . 'ma largeN access'->'1,020,000 per second. 982 nanoseconds per run.' It looks like your 64-bit access is 86% faster for accessing the high-end of the 64-bit range, but slower in the other 3 metrics. Noticeably, it was only 14% as fast for writing the high-end of the 64-bit range, and similarly as much slower for small-number access.. On Fri, Aug 28, 2015 at 6:01 PM, Chris Cunningham wrote: > Hi. > > I've committed a change to the inbox with changes to allow getting/putting > 64bit values to ByteArrays (similar to 32 and 16 bit accessors). Could this > be added to trunk? > > Also, first time I used the selective commit function - very nice! the > changes I didn't want committed didn't, in fact, get commited. Just the > desirable bits! > > -cbc > > > From cunningham.cb at gmail.com Mon Aug 31 05:01:01 2015 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Mon Aug 31 05:01:03 2015 Subject: [squeak-dev] ByteArray accessors for 64-bit manipulation In-Reply-To: References: Message-ID: Hi Chris, I'm all for having the fastest that in the image that works. If you could make your version handle endianess, then I'm all for including it (at least in the 3 variants that are faster). My first use for this (interface for KAFKA) apparently requires bigEndianess, so I really want that supported. It might be best to keep my naming, though - it follows the name pattern that is already in the class. Or will yours also support 128? -cbc On Sun, Aug 30, 2015 at 2:38 PM, Chris Muller wrote: > Hi Chris, I think these methods belong in the image with the fastest > implementation we can do. > > I implemented 64-bit unsigned access for Ma Serializer back in 2005. > I modeled my implementation after Andreas' original approach which > tries to avoid LI arithmetic. I was curious whether your > implementations would be faster, because if they are then it could > benefit Magma. After loading "Ma Serializer" 1.5 (or head) into a > trunk image, I used the following script to take comparison > measurements: > > | smallN largeN maBa cbBa | smallN := ((2 raisedTo: 13) to: (2 > raisedTo: 14)) atRandom. > largeN := ((2 raisedTo: 63) to: (2 raisedTo: 64)) atRandom. > maBa := ByteArray new: 8. > cbBa := ByteArray new: 8. > maBa maUint: 64 at: 0 put: largeN. > cbBa unsignedLong64At: 1 put: largeN bigEndian: false. > self assert: (cbBa maUnsigned64At: 1) = (maBa unsignedLong64At: 1 > bigEndian: false). > { 'cbc smallN write' -> [ cbBa unsignedLong64At: 1 put: smallN > bigEndian: false] bench. > 'ma smallN write' -> [cbBa maUint: 64 at: 0 put: smallN ] bench. > 'cbc smallN access' -> [ cbBa unsignedLong64At: 1 bigEndian: false. ] > bench. > 'ma smallN access' -> [ cbBa maUnsigned64At: 1] bench. > 'cbc largeN write' -> [ cbBa unsignedLong64At: 1 put: largeN > bigEndian: false] bench. > 'ma largeN write' -> [cbBa maUint: 64 at: 0 put: largeN ] bench. > 'cbc largeN access' -> [ cbBa unsignedLong64At: 1 bigEndian: false ] bench. > 'ma largeN access' -> [ cbBa maUnsigned64At: 1] bench. > } > > Here are the results: > > 'cbc smallN write'->'3,110,000 per second. 322 nanoseconds per run.' . > 'ma smallN write'->'4,770,000 per second. 210 nanoseconds per run.' . > 'cbc smallN access'->'4,300,000 per second. 233 nanoseconds per run.' . > 'ma smallN access'->'16,400,000 per second. 60.9 nanoseconds per run.' . > 'cbc largeN write'->'907,000 per second. 1.1 microseconds per run.' . > 'ma largeN write'->'6,620,000 per second. 151 nanoseconds per run.' . > 'cbc largeN access'->'1,900,000 per second. 527 nanoseconds per run.' . > 'ma largeN access'->'1,020,000 per second. 982 nanoseconds per run.' > > It looks like your 64-bit access is 86% faster for accessing the > high-end of the 64-bit range, but slower in the other 3 metrics. > Noticeably, it was only 14% as fast for writing the high-end of the > 64-bit range, and similarly as much slower for small-number access.. > > > On Fri, Aug 28, 2015 at 6:01 PM, Chris Cunningham > wrote: > > Hi. > > > > I've committed a change to the inbox with changes to allow > getting/putting > > 64bit values to ByteArrays (similar to 32 and 16 bit accessors). Could > this > > be added to trunk? > > > > Also, first time I used the selective commit function - very nice! the > > changes I didn't want committed didn't, in fact, get commited. Just the > > desirable bits! > > > > -cbc > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150830/f979421d/attachment.htm From frankiecheezoli at yahoo.com Mon Aug 31 08:39:29 2015 From: frankiecheezoli at yahoo.com (frankiec) Date: Mon Aug 31 08:45:03 2015 Subject: [squeak-dev] Re: Regex In-Reply-To: References: Message-ID: <1441010369545-4847054.post@n4.nabble.com> I get "Error: attempt to index a non-existent element in an OrderedCollection" Any suggestions? -- View this message in context: http://forum.world.st/Regex-tp4842477p4847054.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at elte.hu Mon Aug 31 09:30:00 2015 From: leves at elte.hu (Levente Uzonyi) Date: Mon Aug 31 09:30:06 2015 Subject: [squeak-dev] Re: Regex In-Reply-To: <1441010369545-4847054.post@n4.nabble.com> References: <1441010369545-4847054.post@n4.nabble.com> Message-ID: Can you tell us what gives you this error? Levente On Mon, 31 Aug 2015, frankiec wrote: > I get "Error: attempt to index a non-existent element in an > OrderedCollection" > > Any suggestions? > > > > -- > View this message in context: http://forum.world.st/Regex-tp4842477p4847054.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From frankiecheezoli at yahoo.com Mon Aug 31 10:43:22 2015 From: frankiecheezoli at yahoo.com (frankiec) Date: Mon Aug 31 10:48:58 2015 Subject: [squeak-dev] Re: Regex In-Reply-To: References: <1441010369545-4847054.post@n4.nabble.com> Message-ID: <1441017802917-4847093.post@n4.nabble.com> I'm using a fresh Squeak 5.0 image and evaluating the code snippet: Installer squeakInbox addPackage: 'Regex-Core-ul.37.mcz'; addPackage: 'Regex-Tests-Core-ul.1.mcz'; install. Thanks for your help, I'm looking forward to using this. Frankie Levente Uzonyi-2 wrote > Can you tell us what gives you this error? > > Levente > > On Mon, 31 Aug 2015, frankiec wrote: > >> I get "Error: attempt to index a non-existent element in an >> OrderedCollection" >> >> Any suggestions? >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Regex-tp4842477p4847054.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> -- View this message in context: http://forum.world.st/Regex-tp4842477p4847093.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From sean at clipperadams.com Mon Aug 31 14:51:46 2015 From: sean at clipperadams.com (Sean P. DeNigris) Date: Mon Aug 31 14:57:23 2015 Subject: [squeak-dev] Re: PDX -- a quick and dirty roundup In-Reply-To: References: Message-ID: <1441032706704-4847184.post@n4.nabble.com> Chris Cunnington-4 wrote > I imagine other people had different impressions. Great summary! No matter how many Smalltalk conferences I attend, I am still struck by the spirit of cooperation and giving. All the apparent boundaries disappear - geographical, dialectical. Even the vendors and large commercial users sponsor open source events and projects because they seem to feel, as I do, that we are all in this together, and that whatever makes the community stronger, helps us all. And, as always, the social event was magical to an extent totally out of proportion to the community size - we're talking a serious live jazz band here! Thanks, Instantiations :) And, btw, I'm giving them a shout out especially because they sponsored the event in an extremely low key and cool way. It was mentioned in the agenda, but there were no giant corporate banners, mascots, etc. They were just there, part of our community, enjoying a great evening together. ----- Cheers, Sean -- View this message in context: http://forum.world.st/PDX-a-quick-and-dirty-roundup-tp4845309p4847184.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From stephan at stack.nl Mon Aug 31 15:25:48 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Mon Aug 31 15:25:59 2015 Subject: [squeak-dev] Re: What happened to Morph layering? In-Reply-To: References: Message-ID: On 25-08-15 03:12, Chris Muller wrote: > Found it. It was the removal of the call to #fullBounds (with a > "Sigh" from Andreas about it) in Morph>>#layoutProportionallyIn:. Removing that call sounds like a good idea. What was needed to make it work? Or doesn't it? Marcel has done a lot of clean-ups AFAIK. Stephan From btc at openinworld.com Mon Aug 31 16:04:47 2015 From: btc at openinworld.com (Ben Coman) Date: Mon Aug 31 16:05:10 2015 Subject: [squeak-dev] Re: PDX -- a quick and dirty roundup In-Reply-To: <1441032706704-4847184.post@n4.nabble.com> References: <1441032706704-4847184.post@n4.nabble.com> Message-ID: On Mon, Aug 31, 2015 at 10:51 PM, Sean P. DeNigris wrote: > Chris Cunnington-4 wrote >> I imagine other people had different impressions. > > Great summary! > > No matter how many Smalltalk conferences I attend, I am still struck by the > spirit of cooperation and giving. All the apparent boundaries disappear - > geographical, dialectical. Even the vendors and large commercial users > sponsor open source events and projects because they seem to feel, as I do, > that we are all in this together, and that whatever makes the community > stronger, helps us all. And, as always, the social event was magical to an > extent totally out of proportion to the community size - we're talking a > serious live jazz band here! Thanks, Instantiations :) And, btw, I'm giving > them a shout out especially because they sponsored the event in an extremely > low key and cool way. It was mentioned in the agenda, but there were no > giant corporate banners, mascots, etc. They were just there, part of our > community, enjoying a great evening together. Really nice to hear. There is always the chance that open source reduces the closed source market resulting in an antagonistic response, but there is an equal chance that "a rising tide lifts all boats." Many open source users would never have paid the commercial cost and so be lost to the greater Smalltalk community, but later their need might grow so the commercial cost is a small component and worthwhile changing over. cheers -ben From eliot.miranda at gmail.com Mon Aug 31 17:25:59 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Aug 31 17:26:02 2015 Subject: [squeak-dev] ByteArray accessors for 64-bit manipulation In-Reply-To: References: Message-ID: Hi Chrises, my vote would be to write these as 12 numbered primitives, (2,4 & 8 bytes) * (at: & at:put:) * (big & little endian) because they can be performance critical and implementing them like this means the maximum efficiency in both 32-bit and 64-bit Spur, plus the possibility of the JIT implementing the primitives. On Sun, Aug 30, 2015 at 10:01 PM, Chris Cunningham wrote: > Hi Chris, > > I'm all for having the fastest that in the image that works. If you could > make your version handle endianess, then I'm all for including it (at least > in the 3 variants that are faster). My first use for this (interface for > KAFKA) apparently requires bigEndianess, so I really want that supported. > > It might be best to keep my naming, though - it follows the name pattern > that is already in the class. Or will yours also support 128? > > -cbc > > On Sun, Aug 30, 2015 at 2:38 PM, Chris Muller wrote: > >> Hi Chris, I think these methods belong in the image with the fastest >> implementation we can do. >> >> I implemented 64-bit unsigned access for Ma Serializer back in 2005. >> I modeled my implementation after Andreas' original approach which >> tries to avoid LI arithmetic. I was curious whether your >> implementations would be faster, because if they are then it could >> benefit Magma. After loading "Ma Serializer" 1.5 (or head) into a >> trunk image, I used the following script to take comparison >> measurements: >> >> | smallN largeN maBa cbBa | smallN := ((2 raisedTo: 13) to: (2 >> raisedTo: 14)) atRandom. >> largeN := ((2 raisedTo: 63) to: (2 raisedTo: 64)) atRandom. >> maBa := ByteArray new: 8. >> cbBa := ByteArray new: 8. >> maBa maUint: 64 at: 0 put: largeN. >> cbBa unsignedLong64At: 1 put: largeN bigEndian: false. >> self assert: (cbBa maUnsigned64At: 1) = (maBa unsignedLong64At: 1 >> bigEndian: false). >> { 'cbc smallN write' -> [ cbBa unsignedLong64At: 1 put: smallN >> bigEndian: false] bench. >> 'ma smallN write' -> [cbBa maUint: 64 at: 0 put: smallN ] bench. >> 'cbc smallN access' -> [ cbBa unsignedLong64At: 1 bigEndian: false. ] >> bench. >> 'ma smallN access' -> [ cbBa maUnsigned64At: 1] bench. >> 'cbc largeN write' -> [ cbBa unsignedLong64At: 1 put: largeN >> bigEndian: false] bench. >> 'ma largeN write' -> [cbBa maUint: 64 at: 0 put: largeN ] bench. >> 'cbc largeN access' -> [ cbBa unsignedLong64At: 1 bigEndian: false ] >> bench. >> 'ma largeN access' -> [ cbBa maUnsigned64At: 1] bench. >> } >> >> Here are the results: >> >> 'cbc smallN write'->'3,110,000 per second. 322 nanoseconds per run.' . >> 'ma smallN write'->'4,770,000 per second. 210 nanoseconds per run.' . >> 'cbc smallN access'->'4,300,000 per second. 233 nanoseconds per run.' . >> 'ma smallN access'->'16,400,000 per second. 60.9 nanoseconds per run.' . >> 'cbc largeN write'->'907,000 per second. 1.1 microseconds per run.' . >> 'ma largeN write'->'6,620,000 per second. 151 nanoseconds per run.' . >> 'cbc largeN access'->'1,900,000 per second. 527 nanoseconds per run.' . >> 'ma largeN access'->'1,020,000 per second. 982 nanoseconds per run.' >> >> It looks like your 64-bit access is 86% faster for accessing the >> high-end of the 64-bit range, but slower in the other 3 metrics. >> Noticeably, it was only 14% as fast for writing the high-end of the >> 64-bit range, and similarly as much slower for small-number access.. >> >> >> On Fri, Aug 28, 2015 at 6:01 PM, Chris Cunningham >> wrote: >> > Hi. >> > >> > I've committed a change to the inbox with changes to allow >> getting/putting >> > 64bit values to ByteArrays (similar to 32 and 16 bit accessors). Could >> this >> > be added to trunk? >> > >> > Also, first time I used the selective commit function - very nice! the >> > changes I didn't want committed didn't, in fact, get commited. Just the >> > desirable bits! >> > >> > -cbc >> > >> > >> > >> >> > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150831/38a503d2/attachment.htm From asqueaker at gmail.com Mon Aug 31 18:35:34 2015 From: asqueaker at gmail.com (Chris Muller) Date: Mon Aug 31 18:35:38 2015 Subject: [squeak-dev] ByteArray accessors for 64-bit manipulation In-Reply-To: References: Message-ID: Sometimes the number of bytes is only known in a variable, so would it be possible to do 4 primitives which accept the number of bits (or bytes) as an argument? (uint:at: uint:at:put:) * (big endian, little endian) On Mon, Aug 31, 2015 at 12:25 PM, Eliot Miranda wrote: > Hi Chrises, > > my vote would be to write these as 12 numbered primitives, (2,4 & 8 > bytes) * (at: & at:put:) * (big & little endian) because they can be > performance critical and implementing them like this means the maximum > efficiency in both 32-bit and 64-bit Spur, plus the possibility of the JIT > implementing the primitives. > > On Sun, Aug 30, 2015 at 10:01 PM, Chris Cunningham > wrote: >> >> Hi Chris, >> >> I'm all for having the fastest that in the image that works. If you could >> make your version handle endianess, then I'm all for including it (at least >> in the 3 variants that are faster). My first use for this (interface for >> KAFKA) apparently requires bigEndianess, so I really want that supported. >> >> It might be best to keep my naming, though - it follows the name pattern >> that is already in the class. Or will yours also support 128? >> >> -cbc >> >> On Sun, Aug 30, 2015 at 2:38 PM, Chris Muller wrote: >>> >>> Hi Chris, I think these methods belong in the image with the fastest >>> implementation we can do. >>> >>> I implemented 64-bit unsigned access for Ma Serializer back in 2005. >>> I modeled my implementation after Andreas' original approach which >>> tries to avoid LI arithmetic. I was curious whether your >>> implementations would be faster, because if they are then it could >>> benefit Magma. After loading "Ma Serializer" 1.5 (or head) into a >>> trunk image, I used the following script to take comparison >>> measurements: >>> >>> | smallN largeN maBa cbBa | smallN := ((2 raisedTo: 13) to: (2 >>> raisedTo: 14)) atRandom. >>> largeN := ((2 raisedTo: 63) to: (2 raisedTo: 64)) atRandom. >>> maBa := ByteArray new: 8. >>> cbBa := ByteArray new: 8. >>> maBa maUint: 64 at: 0 put: largeN. >>> cbBa unsignedLong64At: 1 put: largeN bigEndian: false. >>> self assert: (cbBa maUnsigned64At: 1) = (maBa unsignedLong64At: 1 >>> bigEndian: false). >>> { 'cbc smallN write' -> [ cbBa unsignedLong64At: 1 put: smallN >>> bigEndian: false] bench. >>> 'ma smallN write' -> [cbBa maUint: 64 at: 0 put: smallN ] bench. >>> 'cbc smallN access' -> [ cbBa unsignedLong64At: 1 bigEndian: false. ] >>> bench. >>> 'ma smallN access' -> [ cbBa maUnsigned64At: 1] bench. >>> 'cbc largeN write' -> [ cbBa unsignedLong64At: 1 put: largeN >>> bigEndian: false] bench. >>> 'ma largeN write' -> [cbBa maUint: 64 at: 0 put: largeN ] bench. >>> 'cbc largeN access' -> [ cbBa unsignedLong64At: 1 bigEndian: false ] >>> bench. >>> 'ma largeN access' -> [ cbBa maUnsigned64At: 1] bench. >>> } >>> >>> Here are the results: >>> >>> 'cbc smallN write'->'3,110,000 per second. 322 nanoseconds per run.' . >>> 'ma smallN write'->'4,770,000 per second. 210 nanoseconds per run.' . >>> 'cbc smallN access'->'4,300,000 per second. 233 nanoseconds per run.' . >>> 'ma smallN access'->'16,400,000 per second. 60.9 nanoseconds per run.' . >>> 'cbc largeN write'->'907,000 per second. 1.1 microseconds per run.' . >>> 'ma largeN write'->'6,620,000 per second. 151 nanoseconds per run.' . >>> 'cbc largeN access'->'1,900,000 per second. 527 nanoseconds per run.' . >>> 'ma largeN access'->'1,020,000 per second. 982 nanoseconds per run.' >>> >>> It looks like your 64-bit access is 86% faster for accessing the >>> high-end of the 64-bit range, but slower in the other 3 metrics. >>> Noticeably, it was only 14% as fast for writing the high-end of the >>> 64-bit range, and similarly as much slower for small-number access.. >>> >>> >>> On Fri, Aug 28, 2015 at 6:01 PM, Chris Cunningham >>> wrote: >>> > Hi. >>> > >>> > I've committed a change to the inbox with changes to allow >>> > getting/putting >>> > 64bit values to ByteArrays (similar to 32 and 16 bit accessors). Could >>> > this >>> > be added to trunk? >>> > >>> > Also, first time I used the selective commit function - very nice! the >>> > changes I didn't want committed didn't, in fact, get commited. Just >>> > the >>> > desirable bits! >>> > >>> > -cbc >>> > >>> > >>> > >>> >> >> >> >> > > > > -- > _,,,^..^,,,_ > best, Eliot > > > From eliot.miranda at gmail.com Mon Aug 31 19:21:19 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Aug 31 19:21:22 2015 Subject: [Vm-dev] Re: [squeak-dev] ByteArray accessors for 64-bit manipulation In-Reply-To: References: Message-ID: On Mon, Aug 31, 2015 at 11:35 AM, Chris Muller wrote: > > Sometimes the number of bytes is only known in a variable, so would it > be possible to do 4 primitives which accept the number of bits (or > bytes) as an argument? (uint:at: uint:at:put:) * (big endian, little > endian) > Of course its possible, but such an architecture can hardly be quick. If one needs the flexible primitives then use them, but don't hobble the system by only providing them. Having a real 64-bit VM means that the use of 2 32-bit accesses is unnecessarily slow. Which would you rather, and which would you think would be faster (I don't know, but I have my suspicions): Expand the existing flexible integerAt: prims to integerAt:put:bytes:signed:bigEndian: (yuck), or implement this in terms of a wrapper something like ByteArray>>integerAt: index bytes: numBytes signed: signed bigEndian: bigEndian ^size >= 4 ifTrue: [size = 8 ifTrue: [value := self unsignedLong64At: index. bigEndian ifTrue: [value := self byteReverseEightBytes: value]. (sign := value bitShift: -63) ~= 0 ifTrue: "if the VM is intelligent about left shift of zero then this test is unnecessary..." [value := value - ((sign bitAnd: 1) bitShift: 64)]. ^value]. size = 4 ifTrue: [value := self unsignedLong32At: index. bigEndian ifTrue: [value := self byteReverseFourBytes: value]. (sign := value bitShift: -31) ~= 0 ifTrue: "if the VM is intelligent about left shift of zero then this test is unnecessary..." [value := value - ((sign bitAnd: 1) bitShift: 32)]. ^value]. ^self error: 'size must be a power of two from 1 to 8'] ifFalse: ... > > On Mon, Aug 31, 2015 at 12:25 PM, Eliot Miranda > wrote: > > Hi Chrises, > > > > my vote would be to write these as 12 numbered primitives, (2,4 & 8 > > bytes) * (at: & at:put:) * (big & little endian) because they can be > > performance critical and implementing them like this means the maximum > > efficiency in both 32-bit and 64-bit Spur, plus the possibility of the > JIT > > implementing the primitives. > > > > On Sun, Aug 30, 2015 at 10:01 PM, Chris Cunningham < > cunningham.cb@gmail.com> > > wrote: > >> > >> Hi Chris, > >> > >> I'm all for having the fastest that in the image that works. If you > could > >> make your version handle endianess, then I'm all for including it (at > least > >> in the 3 variants that are faster). My first use for this (interface > for > >> KAFKA) apparently requires bigEndianess, so I really want that > supported. > >> > >> It might be best to keep my naming, though - it follows the name pattern > >> that is already in the class. Or will yours also support 128? > >> > >> -cbc > >> > >> On Sun, Aug 30, 2015 at 2:38 PM, Chris Muller > wrote: > >>> > >>> Hi Chris, I think these methods belong in the image with the fastest > >>> implementation we can do. > >>> > >>> I implemented 64-bit unsigned access for Ma Serializer back in 2005. > >>> I modeled my implementation after Andreas' original approach which > >>> tries to avoid LI arithmetic. I was curious whether your > >>> implementations would be faster, because if they are then it could > >>> benefit Magma. After loading "Ma Serializer" 1.5 (or head) into a > >>> trunk image, I used the following script to take comparison > >>> measurements: > >>> > >>> | smallN largeN maBa cbBa | smallN := ((2 raisedTo: 13) to: (2 > >>> raisedTo: 14)) atRandom. > >>> largeN := ((2 raisedTo: 63) to: (2 raisedTo: 64)) atRandom. > >>> maBa := ByteArray new: 8. > >>> cbBa := ByteArray new: 8. > >>> maBa maUint: 64 at: 0 put: largeN. > >>> cbBa unsignedLong64At: 1 put: largeN bigEndian: false. > >>> self assert: (cbBa maUnsigned64At: 1) = (maBa unsignedLong64At: 1 > >>> bigEndian: false). > >>> { 'cbc smallN write' -> [ cbBa unsignedLong64At: 1 put: smallN > >>> bigEndian: false] bench. > >>> 'ma smallN write' -> [cbBa maUint: 64 at: 0 put: smallN ] bench. > >>> 'cbc smallN access' -> [ cbBa unsignedLong64At: 1 bigEndian: false. ] > >>> bench. > >>> 'ma smallN access' -> [ cbBa maUnsigned64At: 1] bench. > >>> 'cbc largeN write' -> [ cbBa unsignedLong64At: 1 put: largeN > >>> bigEndian: false] bench. > >>> 'ma largeN write' -> [cbBa maUint: 64 at: 0 put: largeN ] bench. > >>> 'cbc largeN access' -> [ cbBa unsignedLong64At: 1 bigEndian: false ] > >>> bench. > >>> 'ma largeN access' -> [ cbBa maUnsigned64At: 1] bench. > >>> } > >>> > >>> Here are the results: > >>> > >>> 'cbc smallN write'->'3,110,000 per second. 322 nanoseconds per run.' . > >>> 'ma smallN write'->'4,770,000 per second. 210 nanoseconds per run.' . > >>> 'cbc smallN access'->'4,300,000 per second. 233 nanoseconds per run.' > . > >>> 'ma smallN access'->'16,400,000 per second. 60.9 nanoseconds per > run.' . > >>> 'cbc largeN write'->'907,000 per second. 1.1 microseconds per run.' . > >>> 'ma largeN write'->'6,620,000 per second. 151 nanoseconds per run.' . > >>> 'cbc largeN access'->'1,900,000 per second. 527 nanoseconds per run.' > . > >>> 'ma largeN access'->'1,020,000 per second. 982 nanoseconds per run.' > >>> > >>> It looks like your 64-bit access is 86% faster for accessing the > >>> high-end of the 64-bit range, but slower in the other 3 metrics. > >>> Noticeably, it was only 14% as fast for writing the high-end of the > >>> 64-bit range, and similarly as much slower for small-number access.. > >>> > >>> > >>> On Fri, Aug 28, 2015 at 6:01 PM, Chris Cunningham > >>> wrote: > >>> > Hi. > >>> > > >>> > I've committed a change to the inbox with changes to allow > >>> > getting/putting > >>> > 64bit values to ByteArrays (similar to 32 and 16 bit accessors). > Could > >>> > this > >>> > be added to trunk? > >>> > > >>> > Also, first time I used the selective commit function - very nice! > the > >>> > changes I didn't want committed didn't, in fact, get commited. Just > >>> > the > >>> > desirable bits! > >>> > > >>> > -cbc > >>> > > >>> > > >>> > > >>> > >> > >> > >> > >> > > > > > > > > -- > > _,,,^..^,,,_ > > best, Eliot > > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150831/f5830957/attachment.htm From commits at source.squeak.org Mon Aug 31 22:53:22 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Aug 31 22:53:24 2015 Subject: [squeak-dev] The Inbox: Collections-cbc.651.mcz Message-ID: A new version of Collections was added to project The Inbox: http://source.squeak.org/inbox/Collections-cbc.651.mcz ==================== Summary ==================== Name: Collections-cbc.651 Author: cbc Time: 31 August 2015, 3:53:15.138 pm UUID: 1d7408f6-a290-0d4b-8b83-6a6a2e4f325e Ancestors: Collections-cbc.650 Faster #unsignedLong64At:bigEndian: =============== Diff against Collections-cbc.650 =============== Item was changed: ----- Method: ByteArray>>unsignedLong64At:bigEndian: (in category 'platform independent access') ----- unsignedLong64At: index bigEndian: aBool + "Avoid as much largeInteger as we can" + | b0 b2 b3 b5 b6 w n2 n3 | + + aBool ifFalse: [ + w := self at: index. + b6 := self at: index+1. + b5 := self at: index+2. + n2 := self at: index+3. + b3 := self at: index+4. + b2 := self at: index+5. + n3 := self at: index+6. + b0 := self at: index+7. + ] ifTrue: [ + b0 := self at: index. + n3 := self at: index+1. + b2 := self at: index+2. + b3 := self at: index+3. + n2 := self at: index+4. + b5 := self at: index+5. + b6 := self at: index+6. + w := self at: index+7. + ]. + + "Minimize LargeInteger arithmetic" + b6 = 0 ifFalse:[w := (b6 bitShift: 8) + w]. + b5 = 0 ifFalse:[w := (b5 bitShift: 16) + w]. + + b3 = 0 ifFalse:[n2 := (b3 bitShift: 8) + n2]. + b2 = 0 ifFalse:[n2 := (b2 bitShift: 16) + n2]. + n2 == 0 ifFalse: [w := (n2 bitShift: 24) + w]. + + b0 = 0 ifFalse:[n3 := (b0 bitShift: 8) + n3]. + n3 == 0 ifFalse: [w := (n3 bitShift: 48) + w]. + + ^w! - | n1 n2 | - aBool - ifTrue: [ - n2 := self unsignedLongAt: index bigEndian: true. - n1 := self unsignedLongAt: index+4 bigEndian: true. - ] - ifFalse: [ - n1 := self unsignedLongAt: index bigEndian: false. - n2 := self unsignedLongAt: index+4 bigEndian: false. - ]. - ^(n2 bitShift: 32) + n1!