In trying to see if anything had changed re WaveEditor etc I updated an image to update 16963. When I went to save this image a Squeak5.1-16963… I selected the last thre digits of the prior name (Squeak5.1-16549…) intending to type 963. Imagine my surprise - nay, alarm! - when I got ‘Squeak5.1-16(963) instead.
Oh my, I said to myself, what has Pooh done now.
As best I can work out this is a result of the change in TextEditor>enclose: that added ‘9’ some time ago (and which did not affect me since I normally turn off the annoying enclose stuff in preferences) combined with a more recent change to TextEditor>dispatchOnKeyboardEvent: wherein a use of TextEditor>enclose: was added near the end.
I see two obviously related Preferences for enclosing text. I see this as a dangerous thing, because multiple preferences interacting on the same issue can cause chaos, not to say confusion. And every time a preference is added it is yet another sheaf of potential problems to test.
So, yes, I can turn it off easily enough. But how could it ever be unsurprising to a user to get a(bc)d instead of the expected a9d ?
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Useful random insult:- Fell out of the family tree.
A new version of Collections was added to project The Inbox:
http://source.squeak.org/inbox/Collections-mt.812.mcz
==================== Summary ====================
Name: Collections-mt.812
Author: mt
Time: 18 December 2018, 11:58:09.289023 am
UUID: 64ff5a45-61b5-5642-aa46-9fbeac0215dd
Ancestors: Collections-eem.811
Adds a small scripting/debugging interface to evaluate code on a heterogeneous collection. Ignore errors on the way.
1. Example: A bunch of morphs whose n-th submorph should be made yellow. Would raise errors for morphs with less than n submorphs.
ActiveWorld submorphs try: [:ea | ea submorphs fifth color: Color yellow].
2. Example: Fetch the selected classes of all code browsers through the submorph interface.
| results |
results := OrderedCollection new.
ActiveWorld submorphs try: [:ea | results add: ea model selectedClass].
results explore.
=============== Diff against Collections-eem.811 ===============
Item was added:
+ ----- Method: Collection>>try: (in category 'enumerating') -----
+ try: aBlock
+ "Evaluate aBlock with each of the receiver's elements as the argument. On error, skip that element and continue."
+
+ ^ self try: aBlock ignore: Error!
Item was added:
+ ----- Method: Collection>>try:ignore: (in category 'enumerating') -----
+ try: aBlock ignore: exceptionOrExceptionSet
+ "Evaluate aBlock with each of the receiver's elements as the argument. On error, skip that element and continue."
+
+ ^ self
+ try: aBlock
+ ignore: exceptionOrExceptionSet
+ logged: false!
Item was added:
+ ----- Method: Collection>>try:ignore:logged: (in category 'enumerating') -----
+ try: aBlock ignore: exceptionOrExceptionSet logged: aBoolean
+ "Evaluate aBlock with each of the receiver's elements as the argument. On error, skip that element and continue."
+
+ ^ self do: [:ea |
+ [aBlock value: ea]
+ on: exceptionOrExceptionSet
+ do: [:err | aBoolean ifTrue: [Transcript showln: err messageText]]]!
Well, I've been running the latest code and VM every day on my laptop
as a Personal Squeaksource server and using it for all of my
development these last weeks.
It went so smoothly I also decided push on it by downloading the
entire squeaksource.com (17GB!) and starting it locally using this
same new code, but with different Repository combination more suitable
to that application (ImagePersistence + FileSystem). That exposed a
couple of minor bugs which are now fixed and committed to the /ss
repository. I'm going to bang on it one more time but I believe that
guy is ready to upgrade too!
If you happened to try Personal SqueakSource and have any negative
feedback, please let me know soon, otherwise I'll start thinking about
upgrading it on the server and kissing the timeouts goodbye.
- Chris
Karl Ramberg uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-kfr.249.mcz
==================== Summary ====================
Name: MorphicExtras-kfr.249
Author: kfr
Time: 31 December 2018, 9:35:25.929461 pm
UUID: 6205084e-5509-5840-a32a-1346e335ff5e
Ancestors: MorphicExtras-pre.248
Make TextOnCurve work again. Bounds in TextOnCurve are computed differently than in NewParagraph
=============== Diff against MorphicExtras-pre.248 ===============
Item was added:
+ ----- Method: TextOnCurve>>adjustRightX (in category 'private') -----
+ adjustRightX
+ "No-op for this class. TextOnCurve have computes bounds differently"!
Hi all,
I just noticed that Squeak-trunk does not use the primitives for
LargeIntegers bit operations (#34 to #37). Is there are good reason
for this (disabled in the VM?) or is this just a mistake? See:
SystemNavigation default browseAllSelect: [:cm | cm primitive between:
34 and: 37]
Fabio
An Opensmalltalk-vm Travis build job
https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/jobs/473535608
looks like it failed with a socket error, probably external network.
A bundle of failures look like this...
SocketStreamTest
7041f6_0fb1
✗ #testClassComment (10003ms)
TestFailure: Test timed out
Process>>pvtSignal:list:
[] in DelayWaitTimeout>>wait
<snip>
which is okay, but the following three with similar >10000ms timeout
did not produce "TestFailure: Test timed out "
but instead "MessageNotUnderstood" errors.
StringSocketTestCase
c43ad5_0fb1
✗ #testBasics (10001ms)
MessageNotUnderstood: UndefinedObject>>destroy
UndefinedObject(Object)>>doesNotUnderstand: #destroy
StringSocketTestCase>>tearDown
e360b0_0fb1
✗ #testBogusInput1 (10000ms)
MessageNotUnderstood: UndefinedObject>>destroy
UndefinedObject(Object)>>doesNotUnderstand: #destroy
StringSocketTestCase>>tearDown
e4f711_0fb1
✗ #testBogusInput2 (10002ms)
MessageNotUnderstood: UndefinedObject>>destroy
UndefinedObject(Object)>>doesNotUnderstand: #destroy
StringSocketTestCase>>tearDown
I'm not currently running Squeak, so I'm just reporting was I see in the CI
log
in case anyone was interested in touching-up such a corner case.
Is it preferable to report on Mantis? Or not important :)
cheers -ben
David T. Lewis uploaded a new version of Chronology-Core to project The Trunk:
http://source.squeak.org/trunk/Chronology-Core-dtl.17.mcz
==================== Summary ====================
Name: Chronology-Core-dtl.17
Author: dtl
Time: 15 December 2018, 6:44:08.809994 pm
UUID: 9d9b49d4-46f4-496f-bfd1-70fdb1641e43
Ancestors: Chronology-Core-dtl.16
Bootstrap UTCDateAndTime, step 2 of 5
Start using LXDateAndTime instead of DateAndTime.
Change instance creation in DateAndTime to create LXDateAndTime instances instead.
In the postscript, have all DateAndTime instances become LXDateAndTime.
=============== Diff against Chronology-Core-dtl.16 ===============
Item was changed:
----- Method: DateAndTime class>>fromSeconds: (in category 'smalltalk-80') -----
fromSeconds: seconds
"Answer a DateAndTime since the Squeak epoch: 1 January 1901"
+ ^ LXDateAndTime fromSeconds: seconds
+ " | integerSeconds nanos |
- | integerSeconds nanos |
integerSeconds := seconds truncated.
integerSeconds = seconds
ifTrue: [nanos := 0]
ifFalse: [nanos := (seconds - integerSeconds * NanosInSecond) asInteger].
^ self basicNew
ticks: (Array
with: SqueakEpoch
with: integerSeconds
with: nanos)
+ offset: self localOffset"!
- offset: self localOffset!
Item was changed:
----- Method: DateAndTime class>>julianDayNumber:offset: (in category 'squeak protocol') -----
+ julianDayNumber: anInteger offset: aDuration
+ ^ LXDateAndTime julianDayNumber: anInteger offset: aDuration
+ " ^ self basicNew
+ ticks: anInteger days ticks
+ offset: aDuration ;
+ yourself"!
- julianDayNumber: anInteger offset: aDuration
-
- ^self basicNew
- setJdn: anInteger
- seconds: 0
- nano: 0
- offset: aDuration!
Item was changed:
----- Method: DateAndTime class>>now (in category 'ansi protocol') -----
now
+
+ ^LXDateAndTime now.
+ " [ | timeArray |
+ timeArray := self primPosixMicrosecondClockWithOffset.
+ ^ self utcMicroseconds: timeArray first offset: timeArray second]
+ on: Error
+ do: [ ""Use old style primitive support""
+ ^self nowWithOffset: self localOffset]"!
- | clockAndOffset |
- clockAndOffset := self clock localMicrosecondClockWithOffset.
- (self automaticTimezone and:
- [self localOffset asSeconds ~= clockAndOffset second])
- ifTrue: [self localOffset: (Duration seconds: clockAndOffset second)].
- ^self now: clockAndOffset first offset: self localOffset!
Item was changed:
----- Method: DateAndTime class>>year:month:day:hour:minute:second:nanoSecond:offset: (in category 'squeak protocol') -----
year: year month: month day: day hour: hour minute: minute second: second nanoSecond: nanoCount offset: offset
"Return a DateAndTime"
+ ^ LXDateAndTime year: year month: month day: day hour: hour minute: minute second: second nanoSecond: nanoCount offset: offset
+ " | monthIndex daysInMonth p q r s julianDayNumber |
- | monthIndex daysInMonth p q r s julianDayNumber |
monthIndex := month isInteger ifTrue: [month] ifFalse: [Month indexOfMonth: month].
daysInMonth := Month
daysInMonth: monthIndex
forYear: year.
day < 1 ifTrue: [self error: 'day may not be zero or negative'].
day > daysInMonth ifTrue: [self error: 'day is after month ends'].
p := (monthIndex - 14) quo: 12.
q := year + 4800 + p.
r := monthIndex - 2 - (12 * p).
s := (year + 4900 + p) quo: 100.
julianDayNumber :=
( (1461 * q) quo: 4 ) +
( (367 * r) quo: 12 ) -
( (3 * s) quo: 4 ) +
( day - 32075 ).
^self basicNew
setJdn: julianDayNumber
seconds: hour * 60 + minute * 60 + second
nano: nanoCount
offset: offset;
+ yourself"!
- yourself!
Item was added:
+ ----- Method: LXDateAndTime>>floor (in category 'squeak protocol') -----
+ floor
+ "Answer a copy with magnitude rounded down to the nearest whole second"
+ ^self class
+ utcMicroseconds: utcMicroseconds - (utcMicroseconds \\ 1000000)
+ offset: localOffsetSeconds!
Item was changed:
----- Method: TimeStamp class>>current (in category 'squeak protocol') -----
current
+ ^self now!
- | ts ticks |
- ts := super now asTimeStamp.
- ticks := ts ticks.
- ticks at: 3 put: 0.
- ts ticks: ticks offset: ts offset.
- ^ ts
- !
Item was removed:
- ----- Method: TimeStamp class>>now (in category 'ansi protocol') -----
- now
- "Answer the current date and time as a TimeStamp."
-
- ^self current!
Item was changed:
----- Method: Timespan class>>defaultOffset (in category 'configuring') -----
defaultOffset
+ "Timespans created in the context of an offset will start in that offset. When no context is available, the defaultOffset for Timespans must be zero. For example, two ways to make a Date for today:
+ Date today. 'start is midnight at offset zero. Will compare successfully to other Date today results.'
+ DateAndTime now asDate. 'In this case, the start is midnight of the local time-zone. It can only compare equally to Dates of its time-zone.'"
+ ^ Duration zero!
- "Timespans created in the context of an offset will start in that offset. When no context is available, the defaultOffset for Timespans must be nil. For example, two ways to make a Date for today:
- Date today. 'start is midnight without offset. Will compare successfully to other Date today results.'
- DateAndTime now asDate. 'In this case, the start is midnight of the local time-zone. It can only compare equally to Dates of its time-zone or Dates without timezone.'"
- ^ nil!
Item was changed:
+ (PackageInfo named: 'Chronology-Core') postscript: '"Convert all instances of DateAndTime and TimeStamp to the equivalent LXDateAndTime and LXTimeStamp."
- (PackageInfo named: 'Chronology-Core') postscript: '"Ensure that the object history mark process uses DateAndTime>>floor rather than an earlier implementation that relied on a named instance variable."
+ | oldInstances newInstances |
+ Smalltalk garbageCollect.
+ oldInstances := DateAndTime allInstances, TimeStamp allInstances.
+ newInstances := oldInstances collect: [ :each |
+ each class == DateAndTime
+ ifTrue: [ each asLXDateAndTime ]
+ ifFalse: [ each asLXTimeStamp ] ].
+ oldInstances elementsForwardIdentityTo: newInstances.
+ Smalltalk garbageCollect.
+
+ "Ensure that the object history mark process uses DateAndTime>>floor rather than an earlier implementation that relied on a named instance variable."
+
Smalltalk at: #ObjectHistory ifPresent: [ :cls | cls current restartMarkProcess ].
'!