Chris Cunningham uploaded a new version of Squeak-Version to project The Inbox:
http://source.squeak.org/inbox/Squeak-Version-cbc.5132.mcz
==================== Summary ====================
Name: Squeak-Version-cbc.5132
Author: cbc
Time: 25 January 2018, 1:22:39.044095 pm
UUID: 9d1afcba-a654-d04d-b823-7a1487ee0c78
Ancestors: Squeak-Version-mt.5131
Add class SqueakVersion to hold documentation about this package - how to use, why to use.
Also, remove previous preamble/postscript, since they are forced in a load prior to this one.
Finally, added to postscript the removal of the packages (Exceptions, FlexibleVocabularies, ScriptLoader) from the image.
=============== Diff against Squeak-Version-mt.5131 ===============
Item was removed:
- (PackageInfo named: 'Squeak-Version') preamble: '"This is a hack to finalize #MethodContext -> Context renaming.
- The #bootstrapContext left two problems:
- 1) there is a binding #MethodContext => Context.
- 2) ContextPart still think it has Context as subclass, though this one changed its superclass.
- We must make sure that the removal of these class won''t destroy Context."
-
- Smalltalk globals unbind: #MethodContext.
- [Undeclared at: #MethodContext put: Context copy] on: AttemptToWriteReadOnlyGlobal do: [:exc | exc resume: true].
-
- ContextPart ifNil: [^self].
- ContextPart isBehavior ifFalse: [^self].
- ContextPart instVarAt: 6 put: (ContextPart subclasses select: [:e | e superclass = ContextPart])
- '!
Item was added:
+ SystemOrganization addCategory: #'Squeak-Version'!
Item was added:
+ Object subclass: #SqueakVersion
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Squeak-Version'!
+
+ !SqueakVersion commentStamp: 'cbc 1/25/2018 11:57' prior: 0!
+ This class exists soley as a description of this package, and how it should be used.
+
+ When a package is removed from the trunk update process, you will need to increase the version number of the Squeak-Version package (this one) by the version number of the package removed + 1. This ensures that the trunk build number keeps increasing.
+
+ An example:
+ When you unload a package, let's say Universes-mt.48, you add 49 (48 + 1) to the version number of Squeak-Version and save it.
+ Additionally, add in the package postscript the code to actually unload the package from the image as well:
+ ---------- package postscript ----------
+ (MCPackage named: 'Universes') unload.
+
+ Why is this important?
+
+ The Squeak Trunk update (build) number (or Squeak "version") is thesum of versions of all the base packages.
+ This works great as long as we update packages and occassionally add new packages to Trunk.
+ However, when we remove packages from the base system, we must bump Squeak-Version's version by the removed package's version number, so that the aggregate version number doesn't decrease.
+
+ In addition, folks have started to use the postscript of this package to actually remove the packages from the image that are removed from the Trunk updating process. This is especially useful if the package is empty before it was removed - then it removes cruft from users images.
+ !
Item was changed:
+ (PackageInfo named: 'Squeak-Version') postscript: '#( ''Exceptions'' ''FlexibleVocabularies'' ''ScriptLoader'' ) do: [:package|
+ (MCPackage named: package) workingCopy unload.
+ (MCPackage named: package) workingCopy unregister.
+ ].'!
- (PackageInfo named: 'Squeak-Version') postscript: '(MCPackage named: ''311Deprecated'') unload.
- (MCPackage named: ''SmallLand-ColorTheme'') unload.'!
I spent time straightening out Foward Error Correction, using Reed Solomon encoding with Galois Fields. I mostly have it working for some algorithms, but still have an issue with AZTEC_DATA_10, and perhaps AZTEC_DATA_12. AZTEC_PARAM, AZTEC_DATA_6 and AZTEC_DATA_10 ar working, as well as DATA_MATRIX_FIELD_256 and QR_CODE_FIELD_256. I do not know if it is pluganizable, that would be super if code split into image and plugin, naturally. I have more testing to do to get those couple of algorithms working, then I will turn to QRCode and get that working.
Thank you. Here is the code...
http://www.squeaksource.com/Cryptography/fec-HenryHouse.7.mcz
- HH
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1391.mcz
==================== Summary ====================
Name: Morphic-mt.1391
Author: mt
Time: 25 January 2018, 11:08:01.098657 am
UUID: b014edf4-b643-aa45-93da-314b58b16517
Ancestors: Morphic-mt.1390
Because of the changes in WorldState>>displayWorldSafely: to reduce the number of interactions and debuggers, remove the restoring loop in MorphicProject>>restore. It is not needed anymore and caused another bug when discarding an emergency evaluator.
=============== Diff against Morphic-mt.1390 ===============
Item was changed:
----- Method: MorphicProject>>restore (in category 'display') -----
restore
- "Display world safely. Catch all errors to avoid image freeze. We assume that the world will avoid drawing erroneous morphs twice"
+ world displayWorldSafely.!
- | finished |
- finished := false.
-
- [finished] whileFalse: [
- [world displayWorldSafely. finished := true]
- on: Error do: [:err | world fullRepaintNeeded]].
- !
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1390.mcz
==================== Summary ====================
Name: Morphic-mt.1390
Author: mt
Time: 25 January 2018, 9:52:54.634682 am
UUID: 9e8d30da-71db-904c-8e9f-3fd71c497ad9
Ancestors: Morphic-mt.1389
Fixes error recursion handling for Morphic's interactive debugger.
You can do-it this now in your workspace:
[1 halt] fork.
Processor yield.
2 halt.
=============== Diff against Morphic-mt.1389 ===============
Item was changed:
----- Method: Debugger class>>morphicOpenOn:context:label:contents:fullView: (in category '*Morphic-opening') -----
morphicOpenOn: process context: context label: title contents: contentsStringOrNil fullView: full
"Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger."
+
+ ErrorRecursionGuard critical: [
+
+ | errorWasInUIProcess debugger |
+ ErrorRecursion ifTrue: [
+ "self assert: process == Project current uiProcess -- DOCUMENTATION ONLY"
+ self clearErrorRecursion.
+ ^ Project current handleFatalDrawingError: title].
+
+ [ErrorRecursion not & Preferences logDebuggerStackToFile
+ ifTrue: [Smalltalk logSqueakError: title inContext: context]]
+ on: Error
+ do: [:ex | ex return: nil].
+
- ErrorRecursionGuard critical:
- [ | errorWasInUIProcess debugger |
- ErrorRecursion ifTrue:
- [ "self assert: process == Project current uiProcess -- DOCUMENTATION ONLY"
- ErrorRecursion := false.
- ^ Project current handleFatalDrawingError: title ].
- [ ErrorRecursion not & Preferences logDebuggerStackToFile ifTrue:
- [ Smalltalk
- logSqueakError: title
- inContext: context ] ]
- on: Error
- do: [ : ex | ex return: nil ].
- ErrorRecursion := true.
errorWasInUIProcess := Project current spawnNewProcessIfThisIsUI: process.
+
"Schedule debugging in deferred UI message because
+ 1) If process is the current UI process, it is already broken.
+ 2) If process is some other process, it must not execute UI code"
+ Project current addDeferredUIMessage: [
+ self setErrorRecursion.
+
+ debugger := self new process: process controller: nil context: context.
- 1) If process is the current UI process, it is already broken.
- 2) If process is some other process, it must not execute UI code"
- Project current addDeferredUIMessage:
- [ debugger := self new
- process: process
- controller: nil
- context: context.
full
+ ifTrue: [debugger openFullNoSuspendLabel: title]
+ ifFalse: [debugger openNotifierContents: contentsStringOrNil label: title].
- ifTrue: [ debugger openFullNoSuspendLabel: title ]
- ifFalse:
- [ debugger
- openNotifierContents: contentsStringOrNil
- label: title ].
debugger errorWasInUIProcess: errorWasInUIProcess.
+
"Try drawing the debugger tool at least once to avoid freeze."
Project current world displayWorldSafely.
+
+ self clearErrorRecursion]].
+
+ process suspend.!
- ErrorRecursion := false ]].
- process suspend !
Item was changed:
----- Method: WorldState>>displayWorldSafely: (in category 'update cycle') -----
displayWorldSafely: aWorld
"Update this world's display and keep track of errors during draw methods."
| finished errors previousClasses |
finished := false.
errors := nil.
[finished] whileFalse: [
[aWorld displayWorld. finished := true] on: Error do: [:ex |
"Handle a drawing error"
| err rcvr errCtx errMorph |
err := ex description.
rcvr := ex receiver.
errCtx := thisContext.
[
errCtx := errCtx sender.
"Search the sender chain to find the morph causing the problem"
[errCtx notNil and:[(errCtx receiver isMorph) not]]
whileTrue:[errCtx := errCtx sender].
"If we're at the root of the context chain then we have a fatal drawing problem"
errCtx ifNil:[^Project current handleFatalDrawingError: err].
errMorph := errCtx receiver.
"If the morph causing the problem has already the #drawError flag set,
then search for the next morph above in the caller chain."
errMorph hasProperty: #errorOnDraw
] whileTrue.
errMorph setProperty: #errorOnDraw toValue: true.
"Catch all errors, one for each receiver class."
errors ifNil: [errors := OrderedCollection new].
previousClasses ifNil: [previousClasses := IdentitySet new].
(previousClasses includes: rcvr class) ifFalse: [
previousClasses add: rcvr class.
errors add: (Process forContext: ex signalerContext copyStack priority: Processor activeProcess priority) -> err].
aWorld fullRepaintNeeded.
]].
"Open debuggers for all different errors found."
errors ifNotNil: [
+ Debugger setErrorRecursion.
+ errors do: [:ea |
- [errors do: [:ea |
(Debugger new process: ea key controller: nil context: ea key suspendedContext)
errorWasInUIProcess: Processor activeProcess = Project current uiProcess;
openNotifierContents: nil label: ea value].
"Try to draw the debuggers or else there will be no chance to escape from this catch-drawing-error loop."
+ ActiveWorld displayWorld.
+ Debugger clearErrorRecursion].!
- ActiveWorld displayWorld] on: Error do: [:ex | Project current handleFatalDrawingError: ex description] ].!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.794.mcz
==================== Summary ====================
Name: Tools-mt.794
Author: mt
Time: 25 January 2018, 9:48:23.38719 am
UUID: 479b2546-02dd-1748-b7ef-df974876abef
Ancestors: Tools-mt.793
Adds public interface to indicate error recursion. To be used in Morphic's drawing loop.
=============== Diff against Tools-mt.793 ===============
Item was added:
+ ----- Method: Debugger class>>clearErrorRecursion (in category 'error recursion') -----
+ clearErrorRecursion
+ ErrorRecursion := false.!
Item was added:
+ ----- Method: Debugger class>>setErrorRecursion (in category 'error recursion') -----
+ setErrorRecursion
+ ErrorRecursion := true.!
Marcel Taeumel uploaded a new version of GetText to project The Trunk:
http://source.squeak.org/trunk/GetText-mt.45.mcz
==================== Summary ====================
Name: GetText-mt.45
Author: mt
Time: 25 January 2018, 8:22:39.68505 am
UUID: 959000e7-a12c-3346-85c2-ef8e2971e862
Ancestors: GetText-tpr.44
Fixes GetText to not use the deprecated API call.
=============== Diff against GetText-tpr.44 ===============
Item was changed:
----- Method: LanguageEditor>>report (in category 'gui methods') -----
report
+
+ UIManager default
+ edit: self reportString
+ label: 'report' translated.!
- self reportString openInWorkspaceWithTitle: 'report' translated!
Marcel Taeumel uploaded a new version of ToolBuilder-Kernel to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Kernel-mt.119.mcz
==================== Summary ====================
Name: ToolBuilder-Kernel-mt.119
Author: mt
Time: 25 January 2018, 8:21:36.14705 am
UUID: 9e4f959b-c041-064a-8d5b-267780eebb19
Ancestors: ToolBuilder-Kernel-mt.118
As a replacement for the convenient but deprecated #openInWorkspaceWithTitle:, add #edit to both String and Text.
If you really need a title for that appearing workspace, just use UIManager >> #edit:label:.
=============== Diff against ToolBuilder-Kernel-mt.118 ===============
Item was added:
+ ----- Method: String>>edit (in category '*toolbuilder-kernel') -----
+ edit
+
+ UIManager default edit: self.!
Item was added:
+ ----- Method: Text>>edit (in category '*ToolBuilder-Kernel') -----
+ edit
+
+ UIManager default edit: self.!
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.780.mcz
==================== Summary ====================
Name: Collections-mt.780
Author: mt
Time: 25 January 2018, 8:17:31.08605 am
UUID: 20b43cba-f50d-4f4c-97f7-85d93f6bd4f5
Ancestors: Collections-eem.779
Adds convenience API to Text that matches the one in String. Reduces the need for #asString is many cases. Look into Text's protocol "Converting" so see what we already have in this regard.
This is basically a tooling thing where texts (i.e. formatted strings) appear in places where you would just work with the String API.
=============== Diff against Collections-eem.779 ===============
Item was added:
+ ----- Method: Text>>asSymbol (in category 'converting') -----
+ asSymbol
+
+ ^ self asString asSymbol
+ !
Item was added:
+ ----- Method: Text>>withoutLeadingBlanks (in category 'converting') -----
+ withoutLeadingBlanks
+ "Return a copy of the receiver from which leading blanks have been trimmed."
+
+ | first |
+ first := string indexOfAnyOf: CharacterSet nonSeparators startingAt: 1.
+ first = 0 ifTrue: [ ^'' ]. "no non-separator character"
+ first = 1 ifTrue: [ ^self copy ].
+ ^self
+ copyFrom: first
+ to: self size
+ !