[Glass] createStone test 3.6.0 failed

Dale Henrichs dale.henrichs at gemtalksystems.com
Mon Nov 30 18:46:04 PST 2020


I've got a fix[1] queued up for 
ScaledDecimal>>_printAsDateAndTimeANSISecondsOn:[2]. It looks like I 
should be able to push the fix tomorrow (travis runs take a loooooooong 
time these days).

Dale

[1] https://github.com/GsDevKit/GsDevKit/issues/131
[2] https://travis-ci.org/github/glassdb/glass/builds/746889098

On 11/30/20 6:30 PM, Dale Henrichs wrote:
>
> That was my guess ... so `Locale decimalPoint` returns a $, ... as it 
> should?
>
> Dale
>
> On 11/30/20 11:39 AM, Marten Feldtmann wrote:
>> My decimal point here in Germany is $, and therefore NOT $.
>>
>>
>> Marten
>>> Dale Henrichs via Glass <glass at lists.gemtalksystems.com> hat am 
>>> 30.11.2020 20:08 geschrieben:
>>>
>>>
>>> Marten,
>>>
>>> Could you confirm that your `Locale decimalPoint` is not $. ... I'm 
>>> assuming that that's the case, but I would like a confirmation ...
>>>
>>> Thanks,
>>>
>>> Dale
>>>
>>> On 11/30/20 10:13 AM, Dale Henrichs wrote:
>>>>
>>>> Hold the phone ... it turns out that your the code in 3.6.0 is 
>>>> expecting there to be a $. in the printString for a ScaledDecimal, 
>>>> and I'm going to assume that you've got a comma ... I should be 
>>>> able to patch that this afternoon ...
>>>>
>>>> Sorry for the confusion, but I _assumed_ that the unexpected format 
>>>> error was related to an instance variable reference in a method 
>>>> executed against a Small* class, since we had that problem along 
>>>> the way during the development of 3.6.0 ...
>>>>
>>>> Also not that the old implementation of 
>>>> ScaledDecimal>>_printAsDateAndTimeANSISecondsOn: has the same test 
>>>> (for $.), so I guess it _is_ surprising that you haven't hit this 
>>>> problem before ... hmm, maybe we fixed a bug with ScaledDecimal so 
>>>> that it's printString uses the local for printing ...
>>>>
>>>> Dale
>>>>
>>>> On 11/30/20 10:02 AM, Dale Henrichs wrote:
>>>>>
>>>>> could you send me the implementation of 
>>>>> SmallScaledDecimal(ScaledDecimal)>>_printAsDateAndTimeANSISecondsOn: 
>>>>> in your image?
>>>>>
>>>>> Use the following topaz command in a topaz session, logged in as 
>>>>> DataCurator:
>>>>>
>>>>>     lookup ScaledDecimal>>_printAsDateAndTimeANSISecondsOn:
>>>>>
>>>>> From the error you are getting it seems that you must be touching 
>>>>> an instance variable in ScaledDecimal in the method that causes 
>>>>> the message to fail with the "unexpected format" message..
>>>>>
>>>>> For the record here is the old implementation (from 3.5.4):
>>>>>
>>>>>     topaz 1> lookup ScaledDecimal>>_printAsDateAndTimeANSISecondsOn:
>>>>>          category: '*squeak'
>>>>>     method: ScaledDecimal
>>>>>     _printAsDateAndTimeANSISecondsOn: aStream
>>>>>
>>>>>              | string i |
>>>>>              "Adding 100 causes a very tiny loss of precission but makes parsing much easier"
>>>>>              string := (self + 100) asString.
>>>>>              (string at: 4) = $. ifFalse: [self error: 'unexpected format'].
>>>>>              i := string size.
>>>>>              [
>>>>>                      (string at: i) = $0 or: [ (string at: i) = $. ].
>>>>>              ] whileTrue: [
>>>>>                      i := i - 1.
>>>>>              ].
>>>>>              aStream nextPutAll: (string copyFrom: 2 to: i).
>>>>>     %
>>>>>
>>>>> and the new implementation (for 3.6.0):
>>>>>
>>>>>     topaz 1> lookup ScaledDecimal>>_printAsDateAndTimeANSISecondsOn:
>>>>>          category: '*squeak'
>>>>>     method: ScaledDecimal
>>>>>     _printAsDateAndTimeANSISecondsOn: aStream
>>>>>        | string i noDecimalPoint |
>>>>>        "Adding 100 causes a very tiny loss of precission but makes parsing much easier"
>>>>>        self = 0
>>>>>          ifTrue: [ aStream nextPutAll: '00' ]
>>>>>          ifFalse: [
>>>>>            string := (self + 100) asString.
>>>>>            (string at: 4) = $.
>>>>>              ifFalse: [ self error: 'unexpected format' ].
>>>>>            i := string size.
>>>>>            noDecimalPoint := true.
>>>>>            [
>>>>>            | char |
>>>>>            "strip trailing 0's"
>>>>>            char := string at: i.
>>>>>            noDecimalPoint
>>>>>              ifTrue: [ noDecimalPoint := char ~= $. ].
>>>>>            noDecimalPoint and: [ char = $0 ] ]
>>>>>              whileTrue: [ i := i - 1 ].
>>>>>            noDecimalPoint
>>>>>              ifFalse: [
>>>>>                "don't include the decimal point in the printString, if $. is last character"
>>>>>                i := i - 1 ].
>>>>>            aStream nextPutAll: (string copyFrom: 2 to: i) ]
>>>>>     %
>>>>>
>>>>> I pretty much compared all of the code loaded into the image, and 
>>>>> other than an older version of AST-Core (AST-Core-dkh.105 instead 
>>>>> of AST-Core-dkh.106) ... so the RB git repo is apparently not on 
>>>>> the latest version ...
>>>>>
>>>>> The code in question is in Squeak.v36-dkh.351 and you have loaded 
>>>>> that version as well ...
>>>>>
>>>>> Dale
>>>>>
>>>>> On 11/27/20 12:06 AM, Marten Feldtmann via Glass wrote:
>>>>>> Hey,
>>>>>>
>>>>>> actually something must be strange on my system. The original 
>>>>>> error is still there, but I was able to create a stone using 
>>>>>> "createStone -g test 3.6.0", but I can't do anything with it.
>>>>>>
>>>>>> I tried Jade 2.4.6 with this running stone, but Jade complains 
>>>>>> (while connecting and starting) a compile error ...
>>>>>>
>>>>>> _keysForDictionary: aDictionary
>>>>>>
>>>>>> and as I understand it complains an undefined symbol (which seems 
>>>>>> to be the parameter aDictionary):
>>>>>>
>>>>>> | keys |
>>>>>>
>>>>>>
>>>>>> (aDictionary isKindOf: RubyHash) ifFalse:[ ^super _keysForDictionary: aDictionary ]
>>>>>>
>>>>>>
>>>>>>                                                                        ^1
>>>>>>
>>>>>>
>>>>>>
>>>>>> I know it does not make much sense ...
>>>>>>
>>>>>>
>>>>>>
>>>>>> Marten
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Glass mailing list
>>>>>> Glass at lists.gemtalksystems.com
>>>>>> https://lists.gemtalksystems.com/mailman/listinfo/glass
>>> _______________________________________________ Glass mailing list 
>>> Glass at lists.gemtalksystems.com 
>>> https://lists.gemtalksystems.com/mailman/listinfo/glass 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gemtalksystems.com/mailman/private/glass/attachments/20201130/244ee3f2/attachment-0001.htm>


More information about the Glass mailing list