I have been reworking the initial session stack to use a SessionOperation which does Protocol Selection. Some progress in defining and implementing a new feature of ParrotTalk Automated Protocol Selection - PAPS. Heh.
http://callistohouse.club/index.php/2019/06/08/redesigning-parrottalk-for-a…
“With full implementations of SSL (TLS v1.2) [1] and SSH [2] in Squeak’s Cryptography project, a FrameAnalyzer May be able to automatically detect frame specification for a given incoming frame and choose non-ParrotTalk frames and hence distinguish a variety of Protocol SessionOperations (SessionOperations_v3_6, SessionOperations_v3_7, SessionOperations_v3_8, SSL_TLS_1_2, SSL_TLS_v1_3, SSH). That would be a powerful capability.
[1] SSL – http://www.squeaksource.com/Cryptography/SSL-CDavidShaffer.19.mcz
[2] SSH – http://www.squeaksource.com/Cryptography/SSH-rww.12.mcz “
Kindly,
Robert
robert(a)callistohouse.club
http://callistohouse.club
Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1240.mcz
==================== Summary ====================
Name: Kernel-mt.1240
Author: mt
Time: 7 June 2019, 9:12:01.366409 am
UUID: dd6c5483-af4c-7f4c-b7cf-05fcf73a3c47
Ancestors: Kernel-mt.1239
Extends commentary to point to #cull:.
=============== Diff against Kernel-mt.1239 ===============
Item was changed:
----- Method: BlockClosure>>valueWithPossibleArgument: (in category 'evaluating') -----
valueWithPossibleArgument: anArg
+ "Evaluate the block represented by the receiver. If the block requires one argument, use anArg, if it requires more than one, fill up the rest with nils. See also #cull: if you want to raise an exception for incompatible blocks instead."
- "Evaluate the block represented by the receiver.
- If the block requires one argument, use anArg, if it requires more than one,
- fill up the rest with nils."
| a |
numArgs = 0 ifTrue: [^self value].
numArgs = 1 ifTrue: [^self value: anArg].
a := Array new: numArgs.
a at: 1 put: anArg.
^self valueWithArguments: a!
Hi everyone,
due to some student projects I came to notice an issue with FFI for which I wanted to ask whether anyone knows anything about it (in order to avoid tackling a solved / impossible issue).
The problem manifests when trying to load a library which is not the system library and not the FFIPlugin on a 64bit Windows (and one other platform which I currently do not remember, I think it was MacOS). The main problem is that the external module is not found, although it is at a location in which it should be found. This happens on a variety of VMs.
You can reproduce this by installing the latest FFI from source.squeak.org and then copying SqueakFFIPrims.dll to SqueakFFIPrims2.dll, changing a few of the FFITestLibrary cdecls to point to the copied dll, and then run the tests.
The system32 and user32 libraries and the ordinary SqueakFFIPlugin code is running just fine, so I get the impression that I am missing something basic here. I am grateful for any insights on this. Otherwise my next step would be to create a debug build and dive into the inner workings of the FFI plugin :)
Bests
Patrick
Chris Muller uploaded a new version of Collections to project The Inbox:
http://source.squeak.org/inbox/Collections-cmm.836.mcz
==================== Summary ====================
Name: Collections-cmm.836
Author: cmm
Time: 4 June 2019, 2:34:30.820747 pm
UUID: 95d228d9-2fda-4e35-9665-d1daf90cbd99
Ancestors: Collections-cmm.835
- Move utility methods of Collection to 'utilities'.
- #joinSeparatedBy: is useful even for non-SequenceableCollections.
- Speed up String>>#subStrings:.
=============== Diff against Collections-cmm.835 ===============
Item was changed:
+ ----- Method: Collection>>asCommaString (in category 'utilities') -----
- ----- Method: Collection>>asCommaString (in category 'printing') -----
asCommaString
"Return collection printed as 'a, b, c' "
+ ^ self joinSeparatedBy: ', '!
-
- ^String streamContents: [:s | self asStringOn: s delimiter: ', ']
- !
Item was changed:
+ ----- Method: Collection>>asCommaStringAnd (in category 'utilities') -----
- ----- Method: Collection>>asCommaStringAnd (in category 'printing') -----
asCommaStringAnd
"Return collection printed as 'a, b and c' "
^String streamContents: [:s | self asStringOn: s delimiter: ', ' last: ' and ']
!
Item was changed:
+ ----- Method: Collection>>asStringOn:delimiter: (in category 'utilities') -----
- ----- Method: Collection>>asStringOn:delimiter: (in category 'printing') -----
asStringOn: aStream delimiter: delimString
"Print elements on a stream separated
with a delimiter String like: 'a, b, c'
Uses #asString instead of #print:."
self do: [:elem | aStream nextPutAll: elem asString]
separatedBy: [aStream nextPutAll: delimString]!
Item was changed:
+ ----- Method: Collection>>asStringOn:delimiter:last: (in category 'utilities') -----
- ----- Method: Collection>>asStringOn:delimiter:last: (in category 'printing') -----
asStringOn: aStream delimiter: delimString last: lastDelimString
"Print elements on a stream separated
with a delimiter between all the elements and with
a special one before the last like: 'a, b and c'.
Uses #asString instead of #print:
Note: Feel free to improve the code to detect the last element."
| n sz |
n := 1.
sz := self size.
self do: [:elem |
n := n + 1.
aStream nextPutAll: elem asString]
separatedBy: [
aStream nextPutAll: (n = sz ifTrue: [lastDelimString] ifFalse: [delimString])]!
Item was changed:
+ ----- Method: Collection>>histogramOf: (in category 'utilities') -----
- ----- Method: Collection>>histogramOf: (in category 'converting') -----
histogramOf: aBlock
^ self collect: aBlock as: Bag!
Item was added:
+ ----- Method: Collection>>join (in category 'utilities') -----
+ join
+ "Example: #(H e l l o W o r l d) join = 'HelloWorld'."
+ ^ self joinSeparatedBy: String empty!
Item was added:
+ ----- Method: Collection>>joinSeparatedBy: (in category 'utilities') -----
+ joinSeparatedBy: aString
+ "Returns a string, which is a concatenation of each element's string representation separated by another string."
+ ^ String streamContents:
+ [ : stream | self asStringOn: stream delimiter: aString ]!
Item was changed:
+ ----- Method: Collection>>topologicallySortedUsing: (in category 'utilities') -----
- ----- Method: Collection>>topologicallySortedUsing: (in category 'converting') -----
topologicallySortedUsing: aSortBlock
"Answer a SortedCollection whose elements are the elements of the
receiver, but topologically sorted. The topological order is defined
by the argument, aSortBlock."
| aSortedCollection |
aSortedCollection := SortedCollection new: self size.
aSortedCollection sortBlock: aSortBlock.
self do: [:each | aSortedCollection addLast: each]. "avoids sorting"
^ aSortedCollection sortTopologically
!
Item was removed:
- ----- Method: SequenceableCollection>>join (in category 'converting') -----
- join
- "Example: #(H e l l o W o r l d) join = 'HelloWorld'. "
-
- ^ self joinSeparatedBy: ''!
Item was removed:
- ----- Method: SequenceableCollection>>joinSeparatedBy: (in category 'converting') -----
- joinSeparatedBy: aSeparator
- "Returns a string, which is a concatenation of each element's string representation separated by another string."
-
- ^ String streamContents: [:stream |
- self
- do: [:ea | stream nextPutAll: ea asString]
- separatedBy: [stream nextPutAll: aSeparator asString]]!
Item was changed:
----- Method: String>>subStrings: (in category 'converting') -----
subStrings: separators
+ "Answer an array containing the substrings in the receiver separated by the elements of separators."
- "Answer an array containing the substrings in the receiver separated
- by the elements of separators."
| char result sourceStream subString |
+ (separators isString or:
+ [ separators allSatisfy:
+ [ : element | element isCharacter ] ]) ifFalse: [ ^ self error: 'separators must be Characters.' ].
- #Collectn.
- "Changed 2000/04/08 For ANSI <readableString> protocol."
- (separators isString or:[separators allSatisfy: [:element | element isCharacter]]) ifFalse:
- [^ self error: 'separators must be Characters.'].
sourceStream := ReadStream on: self.
result := OrderedCollection new.
+ subString := WriteStream on: String empty.
+ [ sourceStream atEnd ] whileFalse:
+ [ char := sourceStream next.
+ (separators includes: char)
+ ifTrue:
+ [ subString isEmpty ifFalse:
+ [ result add: subString contents.
+ subString resetContents ] ]
+ ifFalse: [ subString nextPut: char ] ].
+ subString isEmpty ifFalse: [ result add: subString contents ].
- subString := String new.
- [sourceStream atEnd]
- whileFalse:
- [char := sourceStream next.
- (separators includes: char)
- ifTrue: [subString notEmpty
- ifTrue:
- [result add: subString copy.
- subString := String new]]
- ifFalse: [subString := subString , (String with: char)]].
- subString notEmpty ifTrue: [result add: subString copy].
^ result asArray!
During some discussing stuff with Subbu it was pointed out that we have (had) a broken Comics Sans font in the image and that it wasn't licensed etc.
I noticed fonts.google.com and would like to ask if anyone is interested in doing some work to choose a few nice fonts and incorporate them for the next release. Perhaps better yet would be a tool to find/list/import them from that site etc.
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Meets quality standards: It compiles without errors.
Chris Muller uploaded a new version of CollectionsTests to project The Inbox:
http://source.squeak.org/inbox/CollectionsTests-cmm.312.mcz
==================== Summary ====================
Name: CollectionsTests-cmm.312
Author: cmm
Time: 4 June 2019, 3:32:07.434178 pm
UUID: b63a7b5c-085b-4479-bc8d-8910d2afeeaf
Ancestors: CollectionsTests-mt.311
Additional test for #joinSeparatedBy: describes the expected behavior for unordered collections.
=============== Diff against CollectionsTests-mt.311 ===============
Item was added:
+ ----- Method: CollectionTest>>testJoin (in category 'tests') -----
+ testJoin
+ | joined |
+ self assert: #(a b c d e) join = 'abcde'.
+ self assert: (#(a b c) joinSeparatedBy: '|') = 'a|b|c'.
+ joined := (#(a b c) asSet) joinSeparatedBy: '|'.
+ self assert: (#(2 4) allSatisfy: [ : index | (joined at: index) = $| ]).
+ self assert: (#(1 3 5) allSatisfy: [ : index | 'abc' includes: (joined at: index) ])!
Item was removed:
- ----- Method: SequenceableCollectionTest>>testJoin (in category 'tests - converting') -----
- testJoin
-
- self assert: #(a b c d e) join = 'abcde'.
- self assert: (#(a b c) joinSeparatedBy: '|') = 'a|b|c'.!