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
=============================================
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 <RxmLink> The entry point into the actual matcher.
stream <Stream> The stream currently being matched against.
markerPositions <Array of: Integer> Positions of markers' matches.
markerCount <Integer> Number of markers.
lastResult <Boolean> Whether the latest match attempt succeeded or not.
lastChar <Character | nil> 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 <aStream> on the <writeStream>, except for the matches. Replace each match with <aString>."
| 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 <aStream> on the <writeStream>, except for the matches. For each match, evaluate <aBlock> passing the matched substring as the argument. Expect the block to answer a String, and write the answer to <writeStream> 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 ]!
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' }!
... 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
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!