Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 5 participants
- 144618 messages
Spec/FastTable context menus
by Nicolai Hess
We had some bugs like
18707
<https://pharo.fogbugz.com/f/cases/18707/Cannot-open-the-context-menu-in-Ver…>
Cannot open the context menu in Versionner
MenuMorph(Object)>>doesNotUnderstand: #addMenuGroup:
I don't think the fix is right. We should not handle morphic objects in
spec without
an adapter.
(and case 18584
<https://pharo.fogbugz.com/f/cases/18584/DNU-on-showing-menu-in-PointerExplo…>
DNU on showing menu in PointerExplorer)
July 11, 2016
Re: [Pharo-dev] SessionManager and SystemSettings?
by Nicolai Hess
2016-07-10 23:49 GMT+02:00 Yuriy Tymchuk <yuriy.tymchuk(a)me.com>:
> Settings should work now
>
>
Yes!
Thanks :-)
> On 26 Jun 2016, at 04:56, Juraj Kubelka <juraj.kubelka(a)icloud.com> wrote:
>
> Thanks Yuriy!
>
> Last time, there was a problem on Jenkins. I do not have access to check
> it or change it.
> It is necessary that cleanUp process is called as a last command on
> Jenkins.
>
> The other thing is to find out another solution. The current solution
> expects that an instance variable is unset in a fresh (downloaded) image.
> And this variable is set when the image is opened.
>
> Cheers,
> Juraj
>
> On Jun 25, 2016, at 17:25, Yuriy Tymchuk <yuriy.tymchuk(a)me.com> wrote:
>
> cc Juraj
>
> On 25 Jun 2016, at 22:28, Nicolai Hess <nicolaihess(a)gmail.com> wrote:
>
>
>
> 2016-06-23 15:32 GMT+02:00 Esteban Lorenzano <estebanlm(a)gmail.com>:
>
>>
>> > On 23 Jun 2016, at 15:29, Cyril Ferlicot Delbecque <
>> cyril.ferlicot(a)gmail.com> wrote:
>> >
>> >
>> >
>> > On 23/06/2016 15:07, Christophe Demarey wrote:
>> >> What happens if you execute
>> >> 'SystemSettingsPersistence resumeSystemSettingsâ in a 60103 image?
>> >> If nothing happens, it could be that 'SystemSettingsPersistence
>> >> instVarNamed: âalreadyResumedââ is true
>> >>
>> >> I checked the startupList and PharoCommandLineHandler>>#runPreferences
>> >> but nothing changed there.
>> >>
>> >>
>> >
>> >
>> > I think I read something about a script esteban added to clear the
>> > ever-growing stack. Couldn't it be that? Maybe it open the image and the
>>
>> > system setting think he already loaded the settings.
>>
>> no it shouldnât⦠and *my* preferences are correctly loaded :)
>>
>
> Can we please fix this.
> I work a lot with fresh images, and now every time a start a new image and
> trying to access a repository I have to remmember
> to set the network proxy settings.
>
>
>>
>> >
>> >>
>> >
>> > --
>> > Cyril Ferlicot
>> >
>> > http://www.synectique.eu
>> >
>> > 165 Avenue Bretagne
>> > Lille 59000 France
>> >
>>
>
>
>
>
July 11, 2016
Re: [Pharo-dev] changing compiled byte arrays
by Tudor Girba
Thanks, indeed!
Doru
> On Jul 10, 2016, at 7:28 PM, stepharo <stepharo(a)free.fr> wrote:
>
> thanks for all the energy you put in getting non mutable objects. I will bring a nicer system.
>
> Stef
>
> Le 10/7/16 à 12:06, Clément Bera a écrit :
>> Allright. But the problem happens for any literal you mutate, not only byte arrays.
>>
>> For example this one:
>>
>> foo
>> #(true nil 10) at: 2 put: 50.
>> ^ #(true nil 10)
>>
>> Answers... #(true 50 10)
>>
>> The most common problems are with Array, not ByteArray.
>>
>> Even worse, it can happen with LargeIntegers, Floats, ScaledDecimal, etc.
>>
>> Hopefully read-only objects will solve most of the problems.
>>
>>
>>
>> On Sun, Jul 10, 2016 at 10:51 AM, Peter Uhnák <i.uhnak(a)gmail.com> wrote:
>> Thanks for the explanation!
>>
>> I've this byte array syntax for the first time and I don't think that I will be making heavy use of it, so it shouldn't be a too big problem â since now I understand the behavior, so I can keep it in mind.
>>
>> Thanks,
>> Peter
>>
>> On Sun, Jul 10, 2016 at 7:43 AM, Clément Bera <bera.clement(a)gmail.com> wrote:
>> This is the normal behavior. You are mutating the method's literal, which becomes different. The instance is per method, so even if you do:
>>
>> foo
>> #[1 2 3] at: 2 put: 50.
>> ^ #[1 2 3]
>>
>> You get #[1 50 3], which is easy to understand in this example, but can be very tricky to understand in some cases.
>>
>> I've introduced recently "read-only" objects (Object>>#isReadOnlyObject and co). I am waiting for the VM repo merge which should happen in the next few weeks to have this feature in the default Pharo VM, then I will be able to compile method literals "read-only" by default. With this feature, the #at:put: store will fail telling you that you cannot store into a read-only object, which will solve the common problem, when one does not mutate a literal on purpose.
>>
>> Now as in Pharo everything is reflective, it will always be possible to mark back the literal as "writable", mutate it, and still have this behavior.
>>
>> Best,
>> Clement
>>
>>
>> On Sat, Jul 9, 2016 at 10:22 PM, Peter Uhnák <i.uhnak(a)gmail.com> wrote:
>> Is this normal behavior?
>>
>> cls := Object subclass: #Something.
>>
>> cls compile: 'array
>> ^ #[1 2 3 4]'.
>>
>> cls new array. "#[1 2 3 4]"
>>
>> cls new array at: 1 put: 55.
>>
>> cls new array. "#[55 2 3 4]"
>>
>> (cls>>#array) sourceCode "'array
>> ^ #[1 2 3 4]'"
>>
>>
>> So I can permanently change the compiled byte array in the method, which is weird.
>>
>> Shouldn't the behavior be either
>>
>> a) don't change the original byte array
>>
>> or
>>
>> b) change the source code
>>
>> Thanks,
>> Peter
>>
>>
>>
>
--
www.tudorgirba.com
www.feenk.com
"We cannot reach the flow of things unless we let go."
July 11, 2016
Re: [Pharo-dev] UDBCSQLite3Statement>>at:putDateTime: and DateAndTime>>readFrom:defaultOffset:
by Sven Van Caekenberghe
Hi,
Regarding the DateAndTime change.
> On 11 Jul 2016, at 07:52, Alistair Grant <akgrant0710(a)gmail.com> wrote:
>
> I've finally got this to the point where I think it can be submitted.
>
> The previous version missed a case (sql between). To keep backward
> compatibility with earlier versions of UDBC SQLite3 I've sacrificed a
> bit of conformaty and made the representation:
>
> YYYY-MM-DD HH:MM:SS.ssssss
>
> (the difference being microseconds instead of millseconds). My limited
> interoperability testing (Python / Django) suggests this shouldn't be a
> problem.
>
> The tricky bit is that it affects four different packages:
>
> 1. UDBC-SQLite-Base (UDBCSQLite3Statement, PierceNg.49)
> 2. Glorp (UDBCSQLite3Platform, AlistairGrant.129)
> 3. Kernel (DateAndTime, TheIntegrator.2293)
> 4. Kernel-Tests (DateAndTimeTest, TheIntegrator.65)
>
> I assume that I can create a fogbugz issue and submit a single slice
> that will contain the changes to DateAndTime and DateAndTimeTest for
> Pharo 6.
Yes, please create a slice. But first for Pharo 6, then back port to 5.
I assume that your change is adding the default timezone parameter ?
A small remark: in your unit tests, don't compare string output, but objects. In the 1st test, compare to Duration zero, in the second to 2 hours.
Sven
> What's the best way to submit this for Pharo 5?
>
> The Glorp changes are dependent on the Kernel changes, and the
> UDBC-SQLite-Base changes are dependent on the Glorp changes.
>
> I guess that for Glorp, the best way is to include the Kernel changes as
> an extension for Pharo 5.
>
> How is a dependency such as that between UDBC-SQLite-Base and Glorp
> normally handled?
>
> Thanks!
> Alistair
>
>
> 'From Pharo5.0 of 16 April 2015 [Latest update: #50760] on 10 July 2016 at 10:29:14.682983 am'!
>
> !DateAndTime class methodsFor: 'input' stamp: 'AlistairGrant 6/25/2016 22:55'!
> readFrom: aStream defaultOffset: defaultOffset
> "Parse and return a new DateAndTime instance from stream,
> as a Date, an optional Time and an optional TimeZone offset.
> The time defaults to midnight, the timezone to defaultOffset"
> "self readFrom: '2013-03-04T23:47:52.876+01:00' readStream"
>
> | date time offset |
> date := Date readFrom: aStream.
> [ aStream atEnd or: [ '0123456789Z+-' includes: aStream peek ] ]
> whileFalse: [ aStream next ].
> ('0123456789' includes: aStream peek)
> ifTrue: [ time := Time readFrom: aStream ]
> ifFalse: [ time := Time midnight ].
> aStream skipSeparators.
> offset := self readTimezoneOffsetFrom: aStream default: defaultOffset.
> ^ self
> year: date year
> month: date monthIndex
> day: date dayOfMonth
> hour: time hour
> minute: time minute
> second: time second
> nanoSecond: time nanoSecond
> offset: offset! !
>
> !DateAndTime class methodsFor: 'input' stamp: 'AlistairGrant 6/25/2016 22:55'!
> readFrom: aStream
> "Parse and return a new DateAndTime instance from stream,
> as a Date, an optional Time and an optional TimeZone offset.
> The time defaults to midnight, the timezone to the local offset"
> "self readFrom: '2013-03-04T23:47:52.876+01:00' readStream"
>
> ^self readFrom: aStream defaultOffset: self localOffset.! !
>
> !DateAndTime class methodsFor: 'input' stamp: 'AlistairGrant 6/25/2016 22:47'!
> readTimezoneOffsetFrom: stream default: defaultOffset
> "Read and return an optional timezone offset in the form of
> [+|-]hh[[separator]mm[[separator]ss]] or Z from stream as a duration.
> If there is no offset, return the defaultOffset."
>
> | sign hour minute second |
> (stream peekFor: $Z) ifTrue: [ ^ Duration zero ].
> hour := minute := second := 0.
> ^ ('+-' includes: stream peek)
> ifTrue: [
> sign := stream next = $- ifTrue: [ -1 ] ifFalse: [ 1 ].
> hour := self readTwoDigitIntegerFrom: stream.
> (self readOptionalSeparatorFrom: stream)
> ifNotNil: [
> minute := self readTwoDigitIntegerFrom: stream.
> (self readOptionalSeparatorFrom: stream)
> ifNotNil: [
> second := Integer readFrom: stream ] ].
> Duration seconds: sign * ((hour * 3600) + (minute * 60) + second) ]
> ifFalse: [ defaultOffset ]! !
>
> !DateAndTime class methodsFor: 'input' stamp: 'AlistairGrant 6/25/2016 22:47'!
> readTimezoneOffsetFrom: stream
> "Read and return an optional timezone offset in the form of
> [+|-]hh[[separator]mm[[separator]ss]] or Z from stream as a duration.
> If there is no offset, return the local offset."
>
> ^self readTimezoneOffsetFrom: stream default: self localOffset! !
>
>
> !DateAndTimeTest methodsFor: 'tests - offset' stamp: 'AlistairGrant 7/3/2016 21:18'!
> testReadFromDefaultOffsetNotSpecified
> "self debug: #testReadFromDefaultOffsetSpecified"
>
> self assert: (DateAndTime readFrom: '2016-07-03T21:16:16.708241' readStream defaultOffset: Duration zero) offset printString equals: '0:00:00:00'.
> ! !
>
> !DateAndTimeTest methodsFor: 'tests - offset' stamp: 'AlistairGrant 7/3/2016 21:17'!
> testReadFromDefaultOffsetSpecified
> "self debug: #testReadFromDefaultOffsetSpecified"
>
> self assert: (DateAndTime readFrom: '2016-07-03T21:16:16.708241+02:00' readStream defaultOffset: Duration zero) offset printString equals: '0:02:00:00'.
> ! !
>
>
>
> 'From Pharo5.0 of 16 April 2015 [Latest update: #50760] on 10 July 2016 at 10:29:18.333218 am'!
>
> !UDBCSQLite3Platform methodsFor: 'conversion-times' stamp: 'AlistairGrant 7/3/2016 09:33'!
> toTimestamp: anObject for: aType
> "From DatabasePlatform."
>
> anObject isNil ifTrue: [^nil].
> anObject class = Dialect timestampClass ifTrue: [^anObject asUTC].
> anObject isInteger ifTrue: [^anObject].
> ^anObject asDateAndTime asUTC! !
>
> !UDBCSQLite3Platform methodsFor: 'conversion-times' stamp: 'AlistairGrant 7/3/2016 19:32'!
> printTimestamp: aTimestamp on: stream for: aType
>
> aTimestamp isNil ifTrue: [stream nextPutAll: 'NULL'. ^self].
> stream
> nextPut: $';
> nextPutAll: (self class datetimeToString: aTimestamp);
> nextPut: $'.! !
>
>
> !UDBCSQLite3Platform class methodsFor: 'conversion' stamp: 'AlistairGrant 7/3/2016 19:30'!
> datetimeToString: aDateAndTime
> "Convert the supplied DateAndTime to something close to SQLite3's text timestamp format:
>
> YYYY-MM-DD HH:MM:SS.ssssss
>
> To keep backward compatibility with previous versions, microseconds are supplied instead of milliseconds (what SQLite3 officially supports). Most other applications seem to handle this OK."
> | string |
>
> aDateAndTime class = Dialect timestampClass ifFalse: [ ^aDateAndTime ].
> string := UDBCSQLite3DateTimeString
> streamContents: [ :stream |
> | utc n len |
> utc := aDateAndTime asDateAndTime asUTC.
> utc printYMDOn: stream.
> stream nextPut: Character space.
> utc printHMSOn: stream.
> n := utc nanoSecond.
> n ~= 0
> ifTrue: [ len := 9.
> [ n \\ 10 = 0 ]
> whileTrue: [ n := n / 10.
> len := len - 1 ].
> stream nextPut: $..
> n
> printOn: stream
> base: 10
> length: len
> padded: true ] ].
> ^string! !
>
>
> !UDBCSQLite3Statement methodsFor: 'public - accessing' stamp: 'AlistairGrant 7/2/2016 22:54'!
> dateTimeAt: aColumn
> | utc |
> utc := DateAndTime
> readFrom: (self library stringFrom: handle at: aColumn) readStream
> defaultOffset: Duration zero.
> ^ utc offset: DateAndTime localOffset! !
>
> !UDBCSQLite3Statement methodsFor: 'public - accessing' stamp: 'AlistairGrant 7/3/2016 19:42'!
> at: aColumn putDateTime: aDateTime
> "Put the supplied DateAndTime in column aColumn.
>
> SQLite3 supports three date/time formats: text, real (Julian day), integer (unix seconds).
> We use the ISO8601 text format: YYYY-MM-DD HH:MM:SS.SSS
> See https://www.sqlite.org/datatype3.html"
>
> | s |
> s := UDBCSQLite3Platform datetimeToString: aDateTime asDateAndTime.
> ^ self library with: handle at: aColumn putString: s! !
>
July 11, 2016
Re: [Pharo-dev] UDBCSQLite3Statement>>at:putDateTime: and DateAndTime>>readFrom:defaultOffset:
by Alistair Grant
I've finally got this to the point where I think it can be submitted.
The previous version missed a case (sql between). To keep backward
compatibility with earlier versions of UDBC SQLite3 I've sacrificed a
bit of conformaty and made the representation:
YYYY-MM-DD HH:MM:SS.ssssss
(the difference being microseconds instead of millseconds). My limited
interoperability testing (Python / Django) suggests this shouldn't be a
problem.
The tricky bit is that it affects four different packages:
1. UDBC-SQLite-Base (UDBCSQLite3Statement, PierceNg.49)
2. Glorp (UDBCSQLite3Platform, AlistairGrant.129)
3. Kernel (DateAndTime, TheIntegrator.2293)
4. Kernel-Tests (DateAndTimeTest, TheIntegrator.65)
I assume that I can create a fogbugz issue and submit a single slice
that will contain the changes to DateAndTime and DateAndTimeTest for
Pharo 6.
What's the best way to submit this for Pharo 5?
The Glorp changes are dependent on the Kernel changes, and the
UDBC-SQLite-Base changes are dependent on the Glorp changes.
I guess that for Glorp, the best way is to include the Kernel changes as
an extension for Pharo 5.
How is a dependency such as that between UDBC-SQLite-Base and Glorp
normally handled?
Thanks!
Alistair
'From Pharo5.0 of 16 April 2015 [Latest update: #50760] on 10 July 2016 at 10:29:14.682983 am'!
!DateAndTime class methodsFor: 'input' stamp: 'AlistairGrant 6/25/2016 22:55'!
readFrom: aStream defaultOffset: defaultOffset
"Parse and return a new DateAndTime instance from stream,
as a Date, an optional Time and an optional TimeZone offset.
The time defaults to midnight, the timezone to defaultOffset"
"self readFrom: '2013-03-04T23:47:52.876+01:00' readStream"
| date time offset |
date := Date readFrom: aStream.
[ aStream atEnd or: [ '0123456789Z+-' includes: aStream peek ] ]
whileFalse: [ aStream next ].
('0123456789' includes: aStream peek)
ifTrue: [ time := Time readFrom: aStream ]
ifFalse: [ time := Time midnight ].
aStream skipSeparators.
offset := self readTimezoneOffsetFrom: aStream default: defaultOffset.
^ self
year: date year
month: date monthIndex
day: date dayOfMonth
hour: time hour
minute: time minute
second: time second
nanoSecond: time nanoSecond
offset: offset! !
!DateAndTime class methodsFor: 'input' stamp: 'AlistairGrant 6/25/2016 22:55'!
readFrom: aStream
"Parse and return a new DateAndTime instance from stream,
as a Date, an optional Time and an optional TimeZone offset.
The time defaults to midnight, the timezone to the local offset"
"self readFrom: '2013-03-04T23:47:52.876+01:00' readStream"
^self readFrom: aStream defaultOffset: self localOffset.! !
!DateAndTime class methodsFor: 'input' stamp: 'AlistairGrant 6/25/2016 22:47'!
readTimezoneOffsetFrom: stream default: defaultOffset
"Read and return an optional timezone offset in the form of
[+|-]hh[[separator]mm[[separator]ss]] or Z from stream as a duration.
If there is no offset, return the defaultOffset."
| sign hour minute second |
(stream peekFor: $Z) ifTrue: [ ^ Duration zero ].
hour := minute := second := 0.
^ ('+-' includes: stream peek)
ifTrue: [
sign := stream next = $- ifTrue: [ -1 ] ifFalse: [ 1 ].
hour := self readTwoDigitIntegerFrom: stream.
(self readOptionalSeparatorFrom: stream)
ifNotNil: [
minute := self readTwoDigitIntegerFrom: stream.
(self readOptionalSeparatorFrom: stream)
ifNotNil: [
second := Integer readFrom: stream ] ].
Duration seconds: sign * ((hour * 3600) + (minute * 60) + second) ]
ifFalse: [ defaultOffset ]! !
!DateAndTime class methodsFor: 'input' stamp: 'AlistairGrant 6/25/2016 22:47'!
readTimezoneOffsetFrom: stream
"Read and return an optional timezone offset in the form of
[+|-]hh[[separator]mm[[separator]ss]] or Z from stream as a duration.
If there is no offset, return the local offset."
^self readTimezoneOffsetFrom: stream default: self localOffset! !
!DateAndTimeTest methodsFor: 'tests - offset' stamp: 'AlistairGrant 7/3/2016 21:18'!
testReadFromDefaultOffsetNotSpecified
"self debug: #testReadFromDefaultOffsetSpecified"
self assert: (DateAndTime readFrom: '2016-07-03T21:16:16.708241' readStream defaultOffset: Duration zero) offset printString equals: '0:00:00:00'.
! !
!DateAndTimeTest methodsFor: 'tests - offset' stamp: 'AlistairGrant 7/3/2016 21:17'!
testReadFromDefaultOffsetSpecified
"self debug: #testReadFromDefaultOffsetSpecified"
self assert: (DateAndTime readFrom: '2016-07-03T21:16:16.708241+02:00' readStream defaultOffset: Duration zero) offset printString equals: '0:02:00:00'.
! !
'From Pharo5.0 of 16 April 2015 [Latest update: #50760] on 10 July 2016 at 10:29:18.333218 am'!
!UDBCSQLite3Platform methodsFor: 'conversion-times' stamp: 'AlistairGrant 7/3/2016 09:33'!
toTimestamp: anObject for: aType
"From DatabasePlatform."
anObject isNil ifTrue: [^nil].
anObject class = Dialect timestampClass ifTrue: [^anObject asUTC].
anObject isInteger ifTrue: [^anObject].
^anObject asDateAndTime asUTC! !
!UDBCSQLite3Platform methodsFor: 'conversion-times' stamp: 'AlistairGrant 7/3/2016 19:32'!
printTimestamp: aTimestamp on: stream for: aType
aTimestamp isNil ifTrue: [stream nextPutAll: 'NULL'. ^self].
stream
nextPut: $';
nextPutAll: (self class datetimeToString: aTimestamp);
nextPut: $'.! !
!UDBCSQLite3Platform class methodsFor: 'conversion' stamp: 'AlistairGrant 7/3/2016 19:30'!
datetimeToString: aDateAndTime
"Convert the supplied DateAndTime to something close to SQLite3's text timestamp format:
YYYY-MM-DD HH:MM:SS.ssssss
To keep backward compatibility with previous versions, microseconds are supplied instead of milliseconds (what SQLite3 officially supports). Most other applications seem to handle this OK."
| string |
aDateAndTime class = Dialect timestampClass ifFalse: [ ^aDateAndTime ].
string := UDBCSQLite3DateTimeString
streamContents: [ :stream |
| utc n len |
utc := aDateAndTime asDateAndTime asUTC.
utc printYMDOn: stream.
stream nextPut: Character space.
utc printHMSOn: stream.
n := utc nanoSecond.
n ~= 0
ifTrue: [ len := 9.
[ n \\ 10 = 0 ]
whileTrue: [ n := n / 10.
len := len - 1 ].
stream nextPut: $..
n
printOn: stream
base: 10
length: len
padded: true ] ].
^string! !
!UDBCSQLite3Statement methodsFor: 'public - accessing' stamp: 'AlistairGrant 7/2/2016 22:54'!
dateTimeAt: aColumn
| utc |
utc := DateAndTime
readFrom: (self library stringFrom: handle at: aColumn) readStream
defaultOffset: Duration zero.
^ utc offset: DateAndTime localOffset! !
!UDBCSQLite3Statement methodsFor: 'public - accessing' stamp: 'AlistairGrant 7/3/2016 19:42'!
at: aColumn putDateTime: aDateTime
"Put the supplied DateAndTime in column aColumn.
SQLite3 supports three date/time formats: text, real (Julian day), integer (unix seconds).
We use the ISO8601 text format: YYYY-MM-DD HH:MM:SS.SSS
See https://www.sqlite.org/datatype3.html"
| s |
s := UDBCSQLite3Platform datetimeToString: aDateTime asDateAndTime.
^ self library with: handle at: aColumn putString: s! !
July 11, 2016
Re: [Pharo-dev] SessionManager and SystemSettings?
by Yuriy Tymchuk
Settings should work now
> On 26 Jun 2016, at 04:56, Juraj Kubelka <juraj.kubelka(a)icloud.com> wrote:
>
> Thanks Yuriy!
>
> Last time, there was a problem on Jenkins. I do not have access to check it or change it.
> It is necessary that cleanUp process is called as a last command on Jenkins.
>
> The other thing is to find out another solution. The current solution expects that an instance variable is unset in a fresh (downloaded) image. And this variable is set when the image is opened.
>
> Cheers,
> Juraj
>
>> On Jun 25, 2016, at 17:25, Yuriy Tymchuk <yuriy.tymchuk(a)me.com <mailto:yuriy.tymchuk@me.com>> wrote:
>>
>> cc Juraj
>>
>>> On 25 Jun 2016, at 22:28, Nicolai Hess <nicolaihess(a)gmail.com <mailto:nicolaihess@gmail.com>> wrote:
>>>
>>>
>>>
>>> 2016-06-23 15:32 GMT+02:00 Esteban Lorenzano <estebanlm(a)gmail.com <mailto:estebanlm@gmail.com>>:
>>>
>>> > On 23 Jun 2016, at 15:29, Cyril Ferlicot Delbecque <cyril.ferlicot(a)gmail.com <mailto:cyril.ferlicot@gmail.com>> wrote:
>>> >
>>> >
>>> >
>>> > On 23/06/2016 15:07, Christophe Demarey wrote:
>>> >> What happens if you execute
>>> >> 'SystemSettingsPersistence resumeSystemSettingsâ in a 60103 image?
>>> >> If nothing happens, it could be that 'SystemSettingsPersistence
>>> >> instVarNamed: âalreadyResumedââ is true
>>> >>
>>> >> I checked the startupList and PharoCommandLineHandler>>#runPreferences
>>> >> but nothing changed there.
>>> >>
>>> >>
>>> >
>>> >
>>> > I think I read something about a script esteban added to clear the
>>> > ever-growing stack. Couldn't it be that? Maybe it open the image and the
>>>
>>> > system setting think he already loaded the settings.
>>>
>>> no it shouldnât⦠and *my* preferences are correctly loaded :)
>>>
>>> Can we please fix this.
>>> I work a lot with fresh images, and now every time a start a new image and trying to access a repository I have to remmember
>>> to set the network proxy settings.
>>>
>>>
>>> >
>>> >>
>>> >
>>> > --
>>> > Cyril Ferlicot
>>> >
>>> > http://www.synectique.eu <http://www.synectique.eu/>
>>> >
>>> > 165 Avenue Bretagne
>>> > Lille 59000 France
>>> >
>>
>
July 10, 2016
Re: [Pharo-dev] Athens Font Rendering Bug
by J.F. Rick
Interesting. Why is it then correct in BitBlt rendering and not correct in
Athens rendering? Does this mean it can be fixed at the Smalltalk level? If
so, give me a hint of where to look and I'll see if I can find a solution.
Cheers,
Jeff
On Sun, Jul 10, 2016 at 1:12 PM Aliaksei Syrel <alex.syrel(a)gmail.com> wrote:
> Hi
>
> Actually it is not Athens bug. Problem is in string extent measurement
> done by text morph. Athens (Cairo in the end) only renders string glyphs
> created by FreeType2 on positions specified by someone else (morphic in
> this case).
>
> Cheers
> Alex
> On Jul 10, 2016 6:16 PM, "J.F. Rick" <self(a)je77.com> wrote:
>
>> Perhaps other people have already reported this for Bloc but something is
>> wrong with the font rendering of Athens. Here's the code and how it is
>> rendered in Athens vs how it is rendered in BitBlt. It seems like Athens
>> adds more space between letters than is supposed to be there.
>>
>> tMorph := TextMorph new.
>> font1 := TextFontReference toFont: (LogicalFont familyName: 'Arial'
>> fallbackFamilyNames: nil pointSize: 28 stretchValue: 5 weightValue: 400
>> slantValue: 0).
>> font2 := (TextFontReference toFont: (StrikeFont familyName: 'Atlanta'
>> size: 11)).
>> t1 := 'this is font1' asText addAttribute: font1.
>> t2 := ' and this is font2' asText addAttribute: font2.
>> tMorph contents: (t1,t2).
>>
>> Cheers,
>>
>> Jeff
>>
>
July 10, 2016
Re: [Pharo-dev] changing compiled byte arrays
by stepharo
thanks for all the energy you put in getting non mutable objects. I will
bring a nicer system.
Stef
Le 10/7/16 à 12:06, Clément Bera a écrit :
> Allright. But the problem happens for any literal you mutate, not only
> byte arrays.
>
> For example this one:
>
> foo
> #(true nil 10) at: 2 put: 50.
> ^#(true nil 10)
>
> Answers... #(true 50 10)
>
> The most common problems are with Array, not ByteArray.
>
> Even worse, it can happen with LargeIntegers, Floats, ScaledDecimal, etc.
>
> Hopefully read-only objects will solve most of the problems.
>
>
>
> On Sun, Jul 10, 2016 at 10:51 AM, Peter Uhnák <i.uhnak(a)gmail.com
> <mailto:i.uhnak@gmail.com>> wrote:
>
> Thanks for the explanation!
>
> I've this byte array syntax for the first time and I don't think
> that I will be making heavy use of it, so it shouldn't be a too
> big problem â since now I understand the behavior, so I can keep
> it in mind.
>
> Thanks,
> Peter
>
> On Sun, Jul 10, 2016 at 7:43 AM, Clément Bera
> <bera.clement(a)gmail.com <mailto:bera.clement@gmail.com>> wrote:
>
> This is the normal behavior. You are mutating the method's
> literal, which becomes different. The instance is per method,
> so even if you do:
>
> foo
> #[1 2 3] at: 2 put: 50.
> ^ #[1 2 3]
>
> You get #[1 50 3], which is easy to understand in this
> example, but can be very tricky to understand in some cases.
>
> I've introduced recently "read-only" objects
> (Object>>#isReadOnlyObject and co). I am waiting for the VM
> repo merge which should happen in the next few weeks to have
> this feature in the default Pharo VM, then I will be able to
> compile method literals "read-only" by default. With this
> feature, the #at:put: store will fail telling you that you
> cannot store into a read-only object, which will solve the
> common problem, when one does not mutate a literal on purpose.
>
> Now as in Pharo everything is reflective, it will always be
> possible to mark back the literal as "writable", mutate it,
> and still have this behavior.
>
> Best,
> Clement
>
>
> On Sat, Jul 9, 2016 at 10:22 PM, Peter Uhnák
> <i.uhnak(a)gmail.com <mailto:i.uhnak@gmail.com>> wrote:
>
> Is this normal behavior?
>
> cls := Object subclass: #Something.
>
> cls compile: 'array
> ^ #[1 2 3 4]'.
>
> cls new array. "#[1 2 3 4]"
>
> cls new array at: 1 put: 55.
>
> cls new array. "#[55 2 3 4]"
>
> (cls>>#array) sourceCode "'array
> ^ #[1 2 3 4]'"
>
>
> So I can permanently change the compiled byte array in the
> method, which is weird.
>
> Shouldn't the behavior be either
>
> a) don't change the original byte array
>
> or
>
> b) change the source code
>
> Thanks,
> Peter
>
>
>
>
July 10, 2016
[pharo-project/pharo-core] 050429: 60143
by GitHub
Branch: refs/heads/6.0
Home: https://github.com/pharo-project/pharo-core
Commit: 0504295369123552c37af83ad82b566ebbe30c16
https://github.com/pharo-project/pharo-core/commit/0504295369123552c37af83a…
Author: Jenkins Build Server <board(a)pharo-project.org>
Date: 2016-07-10 (Sun, 10 Jul 2016)
Changed paths:
M AST-Core.package/RBParser.class/definition.st
M AST-Core.package/RBParser.class/instance/private-parsing/parseMethod.st
M HelpSystem-Core.package/ClassAPIHelpBuilder.class/definition.st
A HelpSystem-Core.package/ClassAPIHelpBuilder.class/instance/accessing/addMethodsWithoutComment.st
A HelpSystem-Core.package/ClassAPIHelpBuilder.class/instance/accessing/addMethodsWithoutComment_.st
M HelpSystem-Core.package/ClassAPIHelpBuilder.class/instance/initialization/initialize.st
M HelpSystem-Core.package/ClassAPIHelpBuilder.class/instance/private building/buildMethodTopicsOn_for_.st
A HelpSystem-Core.package/CustomHelp.class/class/accessing/bookDescription.st
M HelpSystem-Core.package/CustomHelpHelpBuilder.class/instance/private/createTopicFrom_.st
M HelpSystem-Core.package/HelpHowToHelpTopicsFromCode.class/class/pages/step2.st
A Network-Tests.package/NeoUUIDGeneratorTests.class/README.md
A Network-Tests.package/NeoUUIDGeneratorTests.class/definition.st
A Network-Tests.package/NeoUUIDGeneratorTests.class/instance/private/timeFromUUID_.st
A Network-Tests.package/NeoUUIDGeneratorTests.class/instance/setup/setUp.st
A Network-Tests.package/NeoUUIDGeneratorTests.class/instance/testing/testDefault.st
A Network-Tests.package/NeoUUIDGeneratorTests.class/instance/testing/testOne.st
A Network-Tests.package/NeoUUIDGeneratorTests.class/instance/testing/testSpeed.st
A Network-Tests.package/NeoUUIDGeneratorTests.class/instance/testing/testTwoDifferentGenerator.st
A Network-Tests.package/NeoUUIDGeneratorTests.class/instance/testing/testTwoSameGenerator.st
A Network-Tests.package/NeoUUIDGeneratorTests.class/instance/testing/testUniqueness.st
A Network-UUID.package/NeoUUIDGenerator.class/README.md
A Network-UUID.package/NeoUUIDGenerator.class/class/accessing/default.st
A Network-UUID.package/NeoUUIDGenerator.class/class/accessing/next.st
A Network-UUID.package/NeoUUIDGenerator.class/class/initialization/initialize.st
A Network-UUID.package/NeoUUIDGenerator.class/class/system startup/startUp.st
A Network-UUID.package/NeoUUIDGenerator.class/definition.st
A Network-UUID.package/NeoUUIDGenerator.class/instance/accessing/next.st
A Network-UUID.package/NeoUUIDGenerator.class/instance/accessing/placeFields_.st
A Network-UUID.package/NeoUUIDGenerator.class/instance/accessing/randomGenerator.st
A Network-UUID.package/NeoUUIDGenerator.class/instance/initialize/initialize.st
A Network-UUID.package/NeoUUIDGenerator.class/instance/private/clockOn_.st
A Network-UUID.package/NeoUUIDGenerator.class/instance/private/computeNodeIdentifier.st
A Network-UUID.package/NeoUUIDGenerator.class/instance/private/nextCounter16.st
A Network-UUID.package/NeoUUIDGenerator.class/instance/private/nextRandom16.st
A Network-UUID.package/NeoUUIDGenerator.class/instance/private/setVariantAndVersion_.st
M OpalCompiler-Core.package/IRBytecodeDecompiler.class/instance/quick methods/quickMethod.st
M OpalCompiler-Core.package/IRBytecodeGenerator.class/instance/private/quickMethodPrim.st
R OpalCompiler-Core.package/IRBytecodeGenerator.class/instance/private/quickPrimSpecialConstants.st
A OpalCompiler-Core.package/OpalEncoder.class/class/bytecode decoding/quickPrimSpecialConstants.st
M OpalCompiler-Tests.package/IRPrinterTest.class/instance/testing/testRemoteTemp.st
M OpalCompiler-Tests.package/OCBytecodeDecompilerTest.class/instance/examples/remoteTemp.st
M OpalCompiler-Tests.package/OCCompiledMethodIntegrityTests.class/instance/test/testBlockTemps.st
M OpalCompiler-Tests.package/OCCompiledMethodIntegrityTests.class/instance/test/testNotUsedArgument.st
M OpalCompiler-Tests.package/OCCompiledMethodIntegrityTests.class/instance/test/testPragmas.st
M OpalCompiler-Tests.package/OCCompiledMethodIntegrityTests.class/instance/test/testPrimitive.st
M OpalCompiler-Tests.package/OCCompiledMethodIntegrityTests.class/instance/test/testRemoteTempInVector.st
M OpalCompiler-Tests.package/OCCompilerNotifyingTest.class/instance/testing-byteCode limits/testTooManyLiterals.st
R ScriptLoader60.package/ScriptLoader.class/instance/pharo - scripts/script60142.st
A ScriptLoader60.package/ScriptLoader.class/instance/pharo - scripts/script60143.st
R ScriptLoader60.package/ScriptLoader.class/instance/pharo - updates/update60142.st
A ScriptLoader60.package/ScriptLoader.class/instance/pharo - updates/update60143.st
M ScriptLoader60.package/ScriptLoader.class/instance/public/commentForCurrentUpdate.st
M System-Changes.package/ChangeSet.class/instance/private/changeRecorderFor_.st
Log Message:
-----------
60143
18705 SistaV1 Bytecode: Opal tests down to 23 failures, 4 errors
https://pharo.fogbugz.com/f/cases/18705
18709 Improvements in CustomHelp and ClassAPIHelpBuilder
https://pharo.fogbugz.com/f/cases/18709
18714 can not rename a class
https://pharo.fogbugz.com/f/cases/18714
18710 remove "currentScope" from RBParser
https://pharo.fogbugz.com/f/cases/18710
18713 Load NeoUUIDGenerator without using it
https://pharo.fogbugz.com/f/cases/18713
http://files.pharo.org/image/60/60143.zip
July 10, 2016
[pharo-project/pharo-core]
by GitHub
Branch: refs/tags/60143
Home: https://github.com/pharo-project/pharo-core
July 10, 2016