The next meeting of the UK Smalltalk User Group will be on Wednesday,
August 25th.
Marcus Denker will talk about Variables in Pharo.
We like to say that “Everything is an Object” in Smalltalk. This is true in
many cases: Classes, methods, even the execution stack are reflectively
available as objects.
This talk shows how this idea can be extended to Variables and how Pharo
implements first-class Variables for Globals, instance Variables, Class
Variables, and even temporary variables.
This presentation explores the Variable hierarchy, shows how variables
simplify the compiler and how the reflective API provided by variables is
used by the debugger.
In a hands-on tutorial, we extend the language by defining new kinds of
Variables.
Marcus ( https://marcusdenker.de/ ) is a permanent researcher at INRIA
Lille - Nord Europe ( http://www.inria.fr/lille/ ). Before, he was a
postdoc at the PLEIAD lab/DCC University of Chile and the Software
Composition Group, University of Bern. His research focuses on reflection
and meta-programming for dynamic languages. Marcus Denker received a PhD in
Computer Science from the University of Bern/Switzerland in 2008 and a
Dipl.-Inform. (MSc) from the University of Karlsruhe/Germany in 2004. He
co-founded Zweidenker GmbH ( https://zweidenker.de/ ) in 2009.
Given the current COVID-19 restrictions, this will be an online meeting
from home.
If you'd like to join us, please sign up in advance on the meeting's Meetup
page ( https://www.meetup.com/UKSTUG/events/cbklbrycclbhc/ ) to receive the
meeting details. Don’t forget to bring your laptop and drinks!
Eliot Miranda uploaded a new version of FFI-Kernel to project FFI:
http://source.squeak.org/FFI/FFI-Kernel-eem.204.mcz
==================== Summary ====================
Name: FFI-Kernel-eem.204
Author: eem
Time: 13 August 2021, 8:31:51.330962 pm
UUID: 09eff658-357f-4556-b74d-d328b259b8e1
Ancestors: FFI-Kernel-mt.203
3 times faster ExternalAddress class>>fromInteger:
=============== Diff against FFI-Kernel-mt.203 ===============
Item was changed:
----- Method: ExternalAddress class>>fromInteger: (in category 'instance creation') -----
fromInteger: anInteger
+ "Interpret the given integer as an address pointing to an external memory area.
+ Answer an ExternalAddress to that address."
+ <primitive: #primitiveExternalAddressFromInteger module: #SqueakFFIPrims>
- "Read the given interger as an address pointing to an external memory area."
-
| bytes |
bytes := ByteArray basicNew: self wordSize.
bytes integerAt: 1 put: anInteger size: bytes size signed: false.
^ bytes changeClassTo: self!
Is anyone out there interested in, and able to spend the time, to try to sort out an update of the Debian tarball stuff?
A long time ago we went through some considerable effort to get Squeak into the system and it seems to have languished ever since. It would make us look somewhat more contemporary if we could get an updated package built and inserted.
Please, if you can help, let us know.
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: RWD: Rewind Disk
Marcel Taeumel uploaded a new version of FFI-Kernel to project FFI:
http://source.squeak.org/FFI/FFI-Kernel-mt.203.mcz
==================== Summary ====================
Name: FFI-Kernel-mt.203
Author: mt
Time: 13 August 2021, 1:19:00.926799 pm
UUID: 15800863-014f-ea44-bd88-5b0ebb465a50
Ancestors: FFI-Kernel-mt.202
For backwards compatibility in terms of performance, add the integer primitives to the old-style ByteArray interface.
=============== Diff against FFI-Kernel-mt.202 ===============
Item was changed:
----- Method: ByteArray>>signedLongAt: (in category '*FFI-Kernel-examples') -----
signedLongAt: byteOffset
"For documentation and convenient exploration only. Type-safe access to byte arrays or external addresses SHOULD happen via external objects that have a type set such as instances of ExternalStructure and ExternalData."
+ <primitive: #primitiveSignedInt32At module: #SqueakFFIPrims error: ec>
-
^ ExternalType int32_t handle: self at: byteOffset!
Item was changed:
----- Method: ByteArray>>signedLongAt:put: (in category '*FFI-Kernel-examples') -----
signedLongAt: byteOffset put: value
"For documentation and convenient exploration only. Type-safe access to byte arrays or external addresses SHOULD happen via external objects that have a type set such as instances of ExternalStructure and ExternalData."
+ <primitive: #primitiveSignedInt32AtPut module: #SqueakFFIPrims error: ec>
-
^ ExternalType int32_t handle: self at: byteOffset put: value!
Item was changed:
----- Method: ByteArray>>signedLongLongAt: (in category '*FFI-Kernel-examples') -----
signedLongLongAt: byteOffset
"For documentation and convenient exploration only. Type-safe access to byte arrays or external addresses SHOULD happen via external objects that have a type set such as instances of ExternalStructure and ExternalData."
+ <primitive: #primitiveSignedInt64At module: #SqueakFFIPrims error: ec>
-
^ ExternalType int64_t handle: self at: byteOffset!
Item was changed:
----- Method: ByteArray>>signedLongLongAt:put: (in category '*FFI-Kernel-examples') -----
signedLongLongAt: byteOffset put: value
"For documentation and convenient exploration only. Type-safe access to byte arrays or external addresses SHOULD happen via external objects that have a type set such as instances of ExternalStructure and ExternalData."
+ <primitive: #primitiveSignedInt64AtPut module: #SqueakFFIPrims error: ec>
-
^ ExternalType int64_t handle: self at: byteOffset put: value!
Item was changed:
----- Method: ByteArray>>signedShortAt: (in category '*FFI-Kernel-examples') -----
signedShortAt: byteOffset
"For documentation and convenient exploration only. Type-safe access to byte arrays or external addresses SHOULD happen via external objects that have a type set such as instances of ExternalStructure and ExternalData."
+ <primitive: #primitiveSignedInt16At module: #SqueakFFIPrims error: ec>
-
^ ExternalType int16_t handle: self at: byteOffset!
Item was changed:
----- Method: ByteArray>>signedShortAt:put: (in category '*FFI-Kernel-examples') -----
signedShortAt: byteOffset put: value
"For documentation and convenient exploration only. Type-safe access to byte arrays or external addresses SHOULD happen via external objects that have a type set such as instances of ExternalStructure and ExternalData."
+ <primitive: #primitiveSignedInt16AtPut module: #SqueakFFIPrims error: ec>
-
^ ExternalType int16_t handle: self at: byteOffset put: value!
Item was changed:
----- Method: ByteArray>>unsignedLongAt: (in category '*FFI-Kernel-examples') -----
unsignedLongAt: byteOffset
"For documentation and convenient exploration only. Type-safe access to byte arrays or external addresses SHOULD happen via external objects that have a type set such as instances of ExternalStructure and ExternalData."
+ <primitive: #primitiveUnsignedInt32At module: #SqueakFFIPrims error: ec>
-
^ ExternalType uint32_t handle: self at: byteOffset!
Item was changed:
----- Method: ByteArray>>unsignedLongAt:put: (in category '*FFI-Kernel-examples') -----
unsignedLongAt: byteOffset put: value
"For documentation and convenient exploration only. Type-safe access to byte arrays or external addresses SHOULD happen via external objects that have a type set such as instances of ExternalStructure and ExternalData."
+ <primitive: #primitiveUnsignedInt32AtPut module: #SqueakFFIPrims error: ec>
-
^ ExternalType uint32_t handle: self at: byteOffset put: value!
Item was changed:
----- Method: ByteArray>>unsignedLongLongAt: (in category '*FFI-Kernel-examples') -----
unsignedLongLongAt: byteOffset
"For documentation and convenient exploration only. Type-safe access to byte arrays or external addresses SHOULD happen via external objects that have a type set such as instances of ExternalStructure and ExternalData."
+ <primitive: #primitiveUnsignedInt64At module: #SqueakFFIPrims error: ec>
-
^ ExternalType uint64_t handle: self at: byteOffset!
Item was changed:
----- Method: ByteArray>>unsignedLongLongAt:put: (in category '*FFI-Kernel-examples') -----
unsignedLongLongAt: byteOffset put: value
"For documentation and convenient exploration only. Type-safe access to byte arrays or external addresses SHOULD happen via external objects that have a type set such as instances of ExternalStructure and ExternalData."
+ <primitive: #primitiveUnsignedInt64AtPut module: #SqueakFFIPrims error: ec>
-
^ ExternalType uint64_t handle: self at: byteOffset put: value!
Item was changed:
----- Method: ByteArray>>unsignedShortAt: (in category '*FFI-Kernel-examples') -----
unsignedShortAt: byteOffset
"For documentation and convenient exploration only. Type-safe access to byte arrays or external addresses SHOULD happen via external objects that have a type set such as instances of ExternalStructure and ExternalData."
+ <primitive: #primitiveUnsignedInt16At module: #SqueakFFIPrims error: ec>
-
^ ExternalType uint16_t handle: self at: byteOffset!
Item was changed:
----- Method: ByteArray>>unsignedShortAt:put: (in category '*FFI-Kernel-examples') -----
unsignedShortAt: byteOffset put: value
"For documentation and convenient exploration only. Type-safe access to byte arrays or external addresses SHOULD happen via external objects that have a type set such as instances of ExternalStructure and ExternalData."
+ <primitive: #primitiveUnsignedInt16AtPut module: #SqueakFFIPrims error: ec>
-
^ ExternalType uint16_t handle: self at: byteOffset put: value!
Marcel Taeumel uploaded a new version of Regex-Core to project The Trunk:
http://source.squeak.org/trunk/Regex-Core-tobe.60.mcz
==================== Summary ====================
Name: Regex-Core-tobe.60
Author: tobe
Time: 12 August 2021, 11:27:45.831532 am
UUID: 80ec8d3d-9a84-4928-be0e-1b65787f895b
Ancestors: Regex-Core-ct.59
When an escaped character appeared in a charset, we did not handle adjacent ranges correctly
See RxParserTest>>testCharacterSetWithEscapedAndRange for examples.
=============== Diff against Regex-Core-ct.59 ===============
Item was changed:
----- Method: RxCharSetParser>>parseEscapeChar (in category 'parsing') -----
parseEscapeChar
+ | first |
self match: $\.
+ first := (RxsPredicate forEscapedLetter: lookahead)
+ ifNil: [ RxsCharacter with: lookahead ].
+ self next == $- ifFalse: [^ elements add: first].
+ self next ifNil: [
+ elements add: first.
+ ^ self addChar: $-].
+ self addRangeFrom: first character to: lookahead.
- elements add: ((RxsPredicate forEscapedLetter: lookahead)
- ifNil: [ RxsCharacter with: lookahead ]).
self next!
Marcel Taeumel uploaded a new version of Regex-Tests-Core to project The Trunk:
http://source.squeak.org/trunk/Regex-Tests-Core-tobe.13.mcz
==================== Summary ====================
Name: Regex-Tests-Core-tobe.13
Author: tobe
Time: 12 August 2021, 11:28:42.158361 am
UUID: 2ae5d8ba-6382-4b3b-9a07-7e10d0889a2c
Ancestors: Regex-Tests-Core-ct.12
Complements Regex-Core-tobe.60
=============== Diff against Regex-Tests-Core-ct.12 ===============
Item was added:
+ ----- Method: RxParserTest>>testCharacterSetWithEscapedAndRange (in category 'tests') -----
+ testCharacterSetWithEscapedAndRange
+
+ " two examples of where a - should not parse as a range "
+ self assert: ('[\+-]' asRegex matches: '+').
+ self assert: ('[\+\-]' asRegex matches: '-').
+
+ " construct a range from an escaped + (43) to digit 4 (52) "
+ self assert: ('[\+-4]' asRegex matches: '3')!
Marcel Taeumel uploaded a new version of Regex-Tests-Core to project The Trunk:
http://source.squeak.org/trunk/Regex-Tests-Core-mt.16.mcz
==================== Summary ====================
Name: Regex-Tests-Core-mt.16
Author: mt
Time: 13 August 2021, 12:31:24.998724 pm
UUID: cde10f88-8cb5-a442-8d8c-6e53444970d2
Ancestors: Regex-Tests-Core-mt.15, Regex-Tests-Core-tobe.13
Merge
=============== Diff against Regex-Tests-Core-mt.15 ===============
Item was added:
+ ----- Method: RxParserTest>>testCharacterSetWithEscapedAndRange (in category 'tests') -----
+ testCharacterSetWithEscapedAndRange
+
+ " two examples of where a - should not parse as a range "
+ self assert: ('[\+-]' asRegex matches: '+').
+ self assert: ('[\+\-]' asRegex matches: '-').
+
+ " construct a range from an escaped + (43) to digit 4 (52) "
+ self assert: ('[\+-4]' asRegex matches: '3')!