Pharo-users
By thread
pharo-users@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
- 7 participants
- 50354 messages
Re: [Pharo-users] 6.0 vm crash in FreeTypeFace
by Peter Uhnak
This bug resurfaced after switch to Spur about a year ago. I envy you that you ran into that only now. :)
(my favorite crashes for FT is during saving the image...)
P
On Wed, Dec 21, 2016 at 12:49:23PM -0300, Johan Fabry wrote:
> Hi all,
>
> Iâd like to report a vm crash of the 6.0 vm in a 5.0 image on MacOS El Capitan. It happened when running some tests, no Roassal stuff this time. Apparently the problem is in FreeTypeFace(FT2Handle)>pvtDestroyHandle
>
> VM: 201610211421 https://github.com/estebanlm/opensmalltalk-vm.git $ Date: Fri Oct 21 16:21:30 2016 +0200 $
> Plugins: 201610211421 https://github.com/estebanlm/opensmalltalk-vm.git $
>
> I do not know if this is a know problem so I am reporting it. Dump file in attachment
>
>
> --
> Does this mail seem too brief? Sorry for that, I donât mean to be rude! Please see http://emailcharter.org .
>
> Johan Fabry - http://pleiad.cl/~jfabry
> PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
>
Dec. 21, 2016
Re: [Pharo-users] [Moose-dev] Design Challenge: metrics missing value...
by Tudor Girba
Hi,
> On Dec 21, 2016, at 3:05 PM, stepharong <stepharong(a)free.fr> wrote:
>
>
>
>> Hi Alex,
>>
>> Following the design proposed by Stef, in your case you would use a different collection.
>
> Doru I have multiple missingValue so that they embed their own strategy.
> Now I do not know for the scenario of alex.
Yes, yes. And that is great.
It seemed to me that Alex wanted to find from the collection the elements that have a MissingValue, and for that he wants to use collect:. But, your collection collect: ignores the MissingValue. That is why I thought that he can serve his case with another collection type.
Cheers,
Doru
>>
>> Cheers,
>> Doru
>>
>>
>>> On Dec 21, 2016, at 8:13 AM, Alexandre Bergel <alexandre.bergel(a)me.com> wrote:
>>>
>>> Hi Stef,
>>>
>>> You are raising an interesting point to discuss. This MissingValue is indeed better than having -1
>>> Something to keep in mind: it may be that one would like to focus on the missing value and not really the value.
>>>
>>> Consider:
>>>
>>>> testCollect
>>>>
>>>> | uarray collected |
>>>> uarray := UniformOrderedCollection new.
>>>> uarray add: 10.
>>>> uarray add: 20.
>>>> uarray add: (MissingValue discarding).
>>>> collected := uarray collect: [ :each | each ].
>>>> self assert: collected size equals: 2.
>>>
>>> It could well be that I would like to be able to query over the MissingValue.
>>> Can something like possible: uarray collect: #isMissing
>>> ?
>>>
>>> Cheers,
>>> Alexandre
>>>
>>>
>>>> On Dec 20, 2016, at 10:15 PM, stepharong <stepharong(a)free.fr> wrote:
>>>>
>>>> Hi dear great OO designers
>>>>
>>>> Here is a little challenges for your brainy souls :)
>>>>
>>>> In Moose when we compute metrics it may happen than a tool (often external to pharo) does not compute a metrics
>>>> and when we request it in moose we check and often we return a not so good -1.
>>>>
>>>> I'm trying to brainstorm on a solution
>>>>
>>>> - first may be the simplest way is to not invoke a metrics when it is not computed. But it means that we should know it and that we should have a registration mechanism. After all this is probably the best solution.
>>>>
>>>> - Second we were thinking to use exception but when we have multiple entities missing one metrics.... I have serious doubts.
>>>>
>>>> - Second I was thinking about having the following behavior
>>>>
>>>> testCollect
>>>>
>>>> | uarray collected |
>>>> uarray := UniformOrderedCollection new.
>>>> uarray add: 10.
>>>> uarray add: 20.
>>>> uarray add: (MissingValue discarding).
>>>> collected := uarray collect: [ :each | each ].
>>>> self assert: collected size equals: 2.
>>>>
>>>> testDo
>>>>
>>>> | res uarray |
>>>> uarray := UniformOrderedCollection new.
>>>> uarray add: 10.
>>>> uarray add: 20.
>>>> uarray add: (MissingValue discarding).
>>>> uarray add: 40.
>>>> res := 0.
>>>> uarray do: [ :each | res := res + each ].
>>>> self assert: res equals: 70.
>>>>
>>>>
>>>> testCollectDefaulting
>>>>
>>>> | uarray collected |
>>>> uarray := UniformOrderedCollection new.
>>>> uarray add: 10.
>>>> uarray add: 20.
>>>> uarray add: (MissingValue default: 33).
>>>> collected := uarray collect: [ :each | each ].
>>>> self assert: collected size equals: 3.
>>>> self assert: collected third equals: 33
>>>>
>>>>
>>>> I basically started to implement
>>>>
>>>>
>>>> do: aBlock
>>>> "Refer to the comment in Collection|do:."
>>>> 1 to: self size do:
>>>> [:index | (self at: index) toDo: aBlock on: self]
>>>>
>>>>
>>>>
>>>> collect: aBlock
>>>> "Evaluate aBlock with each of the receiver's elements as the argument.
>>>> Collect the resulting values into a collection like the receiver. Answer
>>>> the new collection."
>>>>
>>>> | newCollection |
>>>> newCollection := self species new.
>>>> self
>>>> do: [ :each | each toCollect: aBlock on: newCollection ].
>>>> ^ newCollection
>>>>
>>>>
>>>> and
>>>>
>>>> DiscardingValue >> toCollect: aBlock on: aCollection
>>>> "discard computation"
>>>> ^ self
>>>>
>>>>
>>>> Object >> toCollect: aBlock on: aCollection
>>>>
>>>> ^ aCollection add: (aBlock value: self)
>>>>
>>>>
>>>> So I imagine that you see the design and I wanted to get your point of view.
>>>>
>>>> --
>>>> Using Opera a kind of bad mail client but far better than thunderbird
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> Moose-dev(a)list.inf.unibe.ch
>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> Moose-dev(a)list.inf.unibe.ch
>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>> www.feenk.com
>>
>> "If you interrupt the barber while he is cutting your hair,
>> you will end up with a messy haircut."
>>
>>
>
>
> --
> Using Opera's mail client: http://www.opera.com/mail/
--
www.tudorgirba.com
www.feenk.com
âThe smaller and more pervasive the hardware becomes, the more physical the software gets."
Dec. 21, 2016
Re: [Pharo-users] NeoJSON
by Sven Van Caekenberghe
Stef,
Do you still have trouble with this ?
It is really hard for me to help you without a reproducible case.
Sven
> On 16 Dec 2016, at 21:02, stepharong <stepharong(a)free.fr> wrote:
>
>>
>> Strange.
>>
>> In Neo-JSON-Core-SvenVanCaekenberghe.37 in the class comment of NeoJSONMapper last paragraph before the examples.
>
> sure I just meant that it was not visible enough.
> We should add for example
>
> XXX >> neoJsonMapping: aMapper
>
> aMapper for: self do: [ :mapping |
> mapping mapInstVars:
> #(#title #kind #hasDoc #grade #stars #isCollectorEdition #paidPrice #language #zone)]
>
>
>
>>
>>> Now do you have an idea why I got this other missing class mapping for bytestring?
>>
>> You must have done something wrong ;-)
>>
>> NeoJSONWriter toString: { 'string'. #symbol. 1. Float pi }.
>>
>> '["string","symbol",1,3.141592653589793]'
>
> I do not think so because my objects totally stupid.
> So this is why I was surprised.
>
>
> here are two
>
> exampleKlonoa
> <sampleInstance>
> ^ self new
> title: 'Klonoa';
> ps2;
> threeStar;
> grade: '(16/15)';
> paidPrice: 1
>
>
> exampleWildArm
> <sampleInstance>
> ^ self new
> title: 'Wild Arm';
> ps2;
> threeStar;
> grade: '(16/15)';
> paidPrice: 1
>
> only strings, numbers and symbols.
> this ByteString looked strange.
>
>
>>
>>> Stef
>>>
>>> On Fri, 16 Dec 2016 15:25:40 +0100, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>>>
>>>>
>>>>> On 16 Dec 2016, at 15:23, stepharong <stepharong(a)free.fr> wrote:
>>>>>
>>>>> Ok I see.
>>>>>
>>>>> I was doing
>>>>>
>>>>> GameCollection >> neoJsonOn: neoJSONWriter
>>>>>
>>>>> neoJSONWriter
>>>>> writeObject: games
>>>>>
>>>>>
>>>>> GameItem >> neoJsonOn: neoJSONWriter
>>>>> self class instanceVariables
>>>>> do: [ :each |
>>>>> neoJSONWriter writeObject: (self instVarNamed: each) ]
>>>>>
>>>>>
>>>>> Now it did not work because byteString is not covered and I found that strange.
>>>>>
>>>>> I will use your solution.
>>>>>
>>>>> I read the section 5 before so there is something missing there.
>>>>> I will see how I can add an example.
>>>>>
>>>>> May be we should improve the class comment of mapper stating this class methods.
>>>>
>>>> It is right there, in NeoJSONMapper's class comment
>>>>
>>>> ...
>>>> A mapping can be specified explicitely on a mapper, or can be resolved using the #neoJsonMapping: class method.
>>>> ...
>>>>
>>>> This is the superclass of both NeoJSONReader and NeoJSONWriter.
>>>>
>>>> But we should add it to the book chapter too.
>>>>
>>>>> Stef
>>>>
>>>
>>>
>>> --
>>> Using Opera's mail client: http://www.opera.com/mail/
>>
>
>
> --
> Using Opera's mail client: http://www.opera.com/mail/
Dec. 21, 2016
Re: [Pharo-users] 6.0 vm crash in FreeTypeFace
by Sabine Manaa
Hi Johan,
I think it is the same as this one:
https://pharo.fogbugz.com/f/cases/18872#BugEvent.180477
Regards
Sabine
2016-12-21 16:35 GMT+01:00 jfabry [via Smalltalk] <
ml-node+s1294792n4927846h21(a)n4.nabble.com>:
> Hi all,
>
> Iâd like to report a vm crash of the 6.0 vm in a 5.0 image on MacOS El
> Capitan. It happened when running some tests, no Roassal stuff this time.
> Apparently the problem is in FreeTypeFace(FT2Handle)>pvtDestroyHandle
>
> VM: 201610211421 https://github.com/estebanlm/opensmalltalk-vm.git $
> Date: Fri Oct 21 16:21:30 2016 +0200 $
> Plugins: 201610211421 https://github.com/estebanlm/opensmalltalk-vm.git $
>
> I do not know if this is a know problem so I am reporting it. Dump file in
> attachment
>
>
>
> --
> Does this mail seem too brief? Sorry for that, I donât mean to be rude!
> Please see http://emailcharter.org .
>
> Johan Fabry - http://pleiad.cl/~jfabry
> PLEIAD and RyCh labs - Computer Science Department (DCC) - University
> of Chile
>
>
> *crash.dmp* (9K) Download Attachment
> <http://forum.world.st/attachment/4927846/0/crash.dmp>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.world.st/6-0-vm-crash-in-FreeTypeFace-tp4927846.html
> To start a new topic under Pharo Smalltalk Users, email
> ml-node+s1294792n1310670h65(a)n4.nabble.com
> To unsubscribe from Pharo Smalltalk Users, click here
> <http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&no…>
> .
> NAML
> <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instan…>
>
--
View this message in context: http://forum.world.st/6-0-vm-crash-in-FreeTypeFace-tp4927846p4927848.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Dec. 21, 2016
6.0 vm crash in FreeTypeFace
by Johan Fabry
Hi all,
Iâd like to report a vm crash of the 6.0 vm in a 5.0 image on MacOS El Capitan. It happened when running some tests, no Roassal stuff this time. Apparently the problem is in FreeTypeFace(FT2Handle)>pvtDestroyHandle
VM: 201610211421 https://github.com/estebanlm/opensmalltalk-vm.git $ Date: Fri Oct 21 16:21:30 2016 +0200 $
Plugins: 201610211421 https://github.com/estebanlm/opensmalltalk-vm.git $
I do not know if this is a know problem so I am reporting it. Dump file in attachment
--
Does this mail seem too brief? Sorry for that, I donât mean to be rude! Please see http://emailcharter.org .
Johan Fabry - http://pleiad.cl/~jfabry
PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
Dec. 21, 2016
Re: [Pharo-users] [Moose-dev] Re: Design Challenge: metrics missing value...
by Alexandre Bergel
> Doru I have multiple missingValue so that they embed their own strategy.
> Now I do not know for the scenario of alex.
For example, obtaining the classes for which metrics cannot be computed (e.g., source code is missing).
Alexandre
>
>>
>> Cheers,
>> Doru
>>
>>
>>> On Dec 21, 2016, at 8:13 AM, Alexandre Bergel <alexandre.bergel(a)me.com> wrote:
>>>
>>> Hi Stef,
>>>
>>> You are raising an interesting point to discuss. This MissingValue is indeed better than having -1
>>> Something to keep in mind: it may be that one would like to focus on the missing value and not really the value.
>>>
>>> Consider:
>>>
>>>> testCollect
>>>>
>>>> | uarray collected |
>>>> uarray := UniformOrderedCollection new.
>>>> uarray add: 10.
>>>> uarray add: 20.
>>>> uarray add: (MissingValue discarding).
>>>> collected := uarray collect: [ :each | each ].
>>>> self assert: collected size equals: 2.
>>>
>>> It could well be that I would like to be able to query over the MissingValue.
>>> Can something like possible: uarray collect: #isMissing
>>> ?
>>>
>>> Cheers,
>>> Alexandre
>>>
>>>
>>>> On Dec 20, 2016, at 10:15 PM, stepharong <stepharong(a)free.fr> wrote:
>>>>
>>>> Hi dear great OO designers
>>>>
>>>> Here is a little challenges for your brainy souls :)
>>>>
>>>> In Moose when we compute metrics it may happen than a tool (often external to pharo) does not compute a metrics
>>>> and when we request it in moose we check and often we return a not so good -1.
>>>>
>>>> I'm trying to brainstorm on a solution
>>>>
>>>> - first may be the simplest way is to not invoke a metrics when it is not computed. But it means that we should know it and that we should have a registration mechanism. After all this is probably the best solution.
>>>>
>>>> - Second we were thinking to use exception but when we have multiple entities missing one metrics.... I have serious doubts.
>>>>
>>>> - Second I was thinking about having the following behavior
>>>>
>>>> testCollect
>>>>
>>>> | uarray collected |
>>>> uarray := UniformOrderedCollection new.
>>>> uarray add: 10.
>>>> uarray add: 20.
>>>> uarray add: (MissingValue discarding).
>>>> collected := uarray collect: [ :each | each ].
>>>> self assert: collected size equals: 2.
>>>>
>>>> testDo
>>>>
>>>> | res uarray |
>>>> uarray := UniformOrderedCollection new.
>>>> uarray add: 10.
>>>> uarray add: 20.
>>>> uarray add: (MissingValue discarding).
>>>> uarray add: 40.
>>>> res := 0.
>>>> uarray do: [ :each | res := res + each ].
>>>> self assert: res equals: 70.
>>>>
>>>>
>>>> testCollectDefaulting
>>>>
>>>> | uarray collected |
>>>> uarray := UniformOrderedCollection new.
>>>> uarray add: 10.
>>>> uarray add: 20.
>>>> uarray add: (MissingValue default: 33).
>>>> collected := uarray collect: [ :each | each ].
>>>> self assert: collected size equals: 3.
>>>> self assert: collected third equals: 33
>>>>
>>>>
>>>> I basically started to implement
>>>>
>>>>
>>>> do: aBlock
>>>> "Refer to the comment in Collection|do:."
>>>> 1 to: self size do:
>>>> [:index | (self at: index) toDo: aBlock on: self]
>>>>
>>>>
>>>>
>>>> collect: aBlock
>>>> "Evaluate aBlock with each of the receiver's elements as the argument.
>>>> Collect the resulting values into a collection like the receiver. Answer
>>>> the new collection."
>>>>
>>>> | newCollection |
>>>> newCollection := self species new.
>>>> self
>>>> do: [ :each | each toCollect: aBlock on: newCollection ].
>>>> ^ newCollection
>>>>
>>>>
>>>> and
>>>>
>>>> DiscardingValue >> toCollect: aBlock on: aCollection
>>>> "discard computation"
>>>> ^ self
>>>>
>>>>
>>>> Object >> toCollect: aBlock on: aCollection
>>>>
>>>> ^ aCollection add: (aBlock value: self)
>>>>
>>>>
>>>> So I imagine that you see the design and I wanted to get your point of view.
>>>>
>>>> --
>>>> Using Opera a kind of bad mail client but far better than thunderbird
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> Moose-dev(a)list.inf.unibe.ch
>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> Moose-dev(a)list.inf.unibe.ch
>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>> www.feenk.com
>>
>> "If you interrupt the barber while he is cutting your hair,
>> you will end up with a messy haircut."
>>
>>
>
>
> --
> Using Opera's mail client: http://www.opera.com/mail/
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)list.inf.unibe.ch
> https://www.list.inf.unibe.ch/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Dec. 21, 2016
Re: [Pharo-users] [Moose-dev] Re: Design Challenge: metrics missing value...
by stepharong
Hi damien
why not :)
Now I do not know if may be is helping me in my scenario.
On Wed, 21 Dec 2016 13:54:12 +0100, Damien Pollet
<damien.pollet(a)gmail.com> wrote:
> On a more general note, what do you think of how it's done in other
> languages (Haskell's "Maybe") ?
>
> We already have it in the form of nil / all other objects and #ifNil:,
> but that would make it explicit with a couple of classes:
> Maybe subclass: ActualValue
> Maybe subclass: MissingValue
> and a #default: or #orElse: accessor to get the wrapped value,
> defaulting to something else, or some block-evaluating message similar
> to #ifNotNilDo:
>
> On 21 December 2016 at 12:05, Tudor Girba <tudor(a)tudorgirba.com> wrote:
>> Hi,
>>
>> I forgot to mention that another option I played with was to always use
>> a metric object, and never numbers. So, numberOfLinesOfCode would
>> return a MetricValue. I think the same idea is >>present in acqoncagua.
>>
>> Cheers,
>> Doru
>>
>> --
>> www.tudorgirba.com
>>
>> "Every thing has its own flow"
>>
>>> On 21 Dec 2016, at 08:21, Tudor Girba <tudor(a)tudorgirba.com> wrote:
>>>
>>> Hi Alex,
>>>
>>> Following the design proposed by Stef, in your case you would use a
>>> different collection.
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>>> On Dec 21, 2016, at 8:13 AM, Alexandre Bergel
>>>> <alexandre.bergel(a)me.com> wrote:
>>>>
>>>> Hi Stef,
>>>>
>>>> You are raising an interesting point to discuss. This MissingValue is
>>>> indeed better than having -1
>>>> Something to keep in mind: it may be that one would like to focus on
>>>> the missing value and not really the value.
>>>>
>>>> Consider:
>>>>
>>>>> testCollect
>>>>>
>>>>> | uarray collected |
>>>>> uarray := UniformOrderedCollection new.
>>>>> uarray add: 10.
>>>>> uarray add: 20.
>>>>> uarray add: (MissingValue discarding).
>>>>> collected := uarray collect: [ :each | each ].
>>>>> self assert: collected size equals: 2.
>>>>
>>>> It could well be that I would like to be able to query over the
>>>> MissingValue.
>>>> Can something like possible: uarray collect: #isMissing
>>>> ?
>>>>
>>>> Cheers,
>>>> Alexandre
>>>>
>>>>
>>>>> On Dec 20, 2016, at 10:15 PM, stepharong <stepharong(a)free.fr> wrote:
>>>>>
>>>>> Hi dear great OO designers
>>>>>
>>>>> Here is a little challenges for your brainy souls :)
>>>>>
>>>>> In Moose when we compute metrics it may happen than a tool (often
>>>>> external to pharo) does not compute a metrics
>>>>> and when we request it in moose we check and often we return a not
>>>>> so good -1.
>>>>>
>>>>> I'm trying to brainstorm on a solution
>>>>>
>>>>> - first may be the simplest way is to not invoke a metrics when it
>>>>> is not computed. But it means that we should know it and that we
>>>>> should have a registration mechanism. After all this is >>probably
>>>>> the best solution.
>>>>>
>>>>> - Second we were thinking to use exception but when we have multiple
>>>>> entities missing one metrics.... I have serious doubts.
>>>>>
>>>>> - Second I was thinking about having the following behavior
>>>>>
>>>>> testCollect
>>>>>
>>>>> | uarray collected |
>>>>> uarray := UniformOrderedCollection new.
>>>>> uarray add: 10.
>>>>> uarray add: 20.
>>>>> uarray add: (MissingValue discarding).
>>>>> collected := uarray collect: [ :each | each ].
>>>>> self assert: collected size equals: 2.
>>>>>
>>>>> testDo
>>>>>
>>>>> | res uarray |
>>>>> uarray := UniformOrderedCollection new.
>>>>> uarray add: 10.
>>>>> uarray add: 20.
>>>>> uarray add: (MissingValue discarding).
>>>>> uarray add: 40.
>>>>> res := 0.
>>>>> uarray do: [ :each | res := res + each ].
>>>>> self assert: res equals: 70.
>>>>>
>>>>>
>>>>> testCollectDefaulting
>>>>>
>>>>> | uarray collected |
>>>>> uarray := UniformOrderedCollection new.
>>>>> uarray add: 10.
>>>>> uarray add: 20.
>>>>> uarray add: (MissingValue default: 33).
>>>>> collected := uarray collect: [ :each | each ].
>>>>> self assert: collected size equals: 3.
>>>>> self assert: collected third equals: 33
>>>>>
>>>>>
>>>>> I basically started to implement
>>>>>
>>>>>
>>>>> do: aBlock
>>>>> "Refer to the comment in Collection|do:."
>>>>> 1 to: self size do:
>>>>> [:index | (self at: index) toDo: aBlock on: self]
>>>>>
>>>>>
>>>>>
>>>>> collect: aBlock
>>>>> "Evaluate aBlock with each of the receiver's elements as the
>>>>> argument.
>>>>> Collect the resulting values into a collection like the receiver.
>>>>> Answer
>>>>> the new collection."
>>>>>
>>>>> | newCollection |
>>>>> newCollection := self species new.
>>>>> self
>>>>> do: [ :each | each toCollect: aBlock on: newCollection ].
>>>>> ^ newCollection
>>>>>
>>>>>
>>>>> and
>>>>>
>>>>> DiscardingValue >> toCollect: aBlock on: aCollection
>>>>> "discard computation"
>>>>> ^ self
>>>>>
>>>>>
>>>>> Object >> toCollect: aBlock on: aCollection
>>>>>
>>>>> ^ aCollection add: (aBlock value: self)
>>>>>
>>>>>
>>>>> So I imagine that you see the design and I wanted to get your point
>>>>> of view.
>>>>>
>>>>> --
>>>>> Using Opera a kind of bad mail client but far better than thunderbird
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> Moose-dev(a)list.inf.unibe.ch
>>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> Moose-dev(a)list.inf.unibe.ch
>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>
>>> --
>>> www.tudorgirba.com
>>> www.feenk.com
>>>
>>> "If you interrupt the barber while he is cutting your hair,
>>> you will end up with a messy haircut."
>>>
>> _______________________________________________
>> Moose-dev mailing list
>> Moose-dev(a)list.inf.unibe.ch
>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>
>
>
> --Damien Pollet
> type less, do more [ | ] http://people.untyped.org/damien.pollet
--
Using Opera's mail client: http://www.opera.com/mail/
Dec. 21, 2016
Re: [Pharo-users] [Moose-dev] Design Challenge: metrics missing value...
by stepharong
On Wed, 21 Dec 2016 12:05:32 +0100, Tudor Girba <tudor(a)tudorgirba.com>
wrote:
> Hi,
>
> I forgot to mention that another option I played with was to always use
> a metric object, and never numbers. So, numberOfLinesOfCode would return
> a MetricValue. I think the same idea is present in acqoncagua.
Yes in fact may be we should hold the value as raw data and create on
demande the metricValue.
to avoid to have millions on them.
Or a kind of flightweight
>
> Cheers,
> Doru
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
>> On 21 Dec 2016, at 08:21, Tudor Girba <tudor(a)tudorgirba.com> wrote:
>>
>> Hi Alex,
>>
>> Following the design proposed by Stef, in your case you would use a
>> different collection.
>>
>> Cheers,
>> Doru
>>
>>
>>> On Dec 21, 2016, at 8:13 AM, Alexandre Bergel
>>> <alexandre.bergel(a)me.com> wrote:
>>>
>>> Hi Stef,
>>>
>>> You are raising an interesting point to discuss. This MissingValue is
>>> indeed better than having -1
>>> Something to keep in mind: it may be that one would like to focus on
>>> the missing value and not really the value.
>>>
>>> Consider:
>>>
>>>> testCollect
>>>>
>>>> | uarray collected |
>>>> uarray := UniformOrderedCollection new.
>>>> uarray add: 10.
>>>> uarray add: 20.
>>>> uarray add: (MissingValue discarding).
>>>> collected := uarray collect: [ :each | each ].
>>>> self assert: collected size equals: 2.
>>>
>>> It could well be that I would like to be able to query over the
>>> MissingValue.
>>> Can something like possible: uarray collect: #isMissing
>>> ?
>>>
>>> Cheers,
>>> Alexandre
>>>
>>>
>>>> On Dec 20, 2016, at 10:15 PM, stepharong <stepharong(a)free.fr> wrote:
>>>>
>>>> Hi dear great OO designers
>>>>
>>>> Here is a little challenges for your brainy souls :)
>>>>
>>>> In Moose when we compute metrics it may happen than a tool (often
>>>> external to pharo) does not compute a metrics
>>>> and when we request it in moose we check and often we return a not so
>>>> good -1.
>>>>
>>>> I'm trying to brainstorm on a solution
>>>>
>>>> - first may be the simplest way is to not invoke a metrics when it is
>>>> not computed. But it means that we should know it and that we should
>>>> have a registration mechanism. After all this is probably the best
>>>> solution.
>>>>
>>>> - Second we were thinking to use exception but when we have multiple
>>>> entities missing one metrics.... I have serious doubts.
>>>>
>>>> - Second I was thinking about having the following behavior
>>>>
>>>> testCollect
>>>>
>>>> | uarray collected |
>>>> uarray := UniformOrderedCollection new.
>>>> uarray add: 10.
>>>> uarray add: 20.
>>>> uarray add: (MissingValue discarding).
>>>> collected := uarray collect: [ :each | each ].
>>>> self assert: collected size equals: 2.
>>>>
>>>> testDo
>>>>
>>>> | res uarray |
>>>> uarray := UniformOrderedCollection new.
>>>> uarray add: 10.
>>>> uarray add: 20.
>>>> uarray add: (MissingValue discarding).
>>>> uarray add: 40.
>>>> res := 0.
>>>> uarray do: [ :each | res := res + each ].
>>>> self assert: res equals: 70.
>>>>
>>>>
>>>> testCollectDefaulting
>>>>
>>>> | uarray collected |
>>>> uarray := UniformOrderedCollection new.
>>>> uarray add: 10.
>>>> uarray add: 20.
>>>> uarray add: (MissingValue default: 33).
>>>> collected := uarray collect: [ :each | each ].
>>>> self assert: collected size equals: 3.
>>>> self assert: collected third equals: 33
>>>>
>>>>
>>>> I basically started to implement
>>>>
>>>>
>>>> do: aBlock
>>>> "Refer to the comment in Collection|do:."
>>>> 1 to: self size do:
>>>> [:index | (self at: index) toDo: aBlock on: self]
>>>>
>>>>
>>>>
>>>> collect: aBlock
>>>> "Evaluate aBlock with each of the receiver's elements as the
>>>> argument.
>>>> Collect the resulting values into a collection like the receiver.
>>>> Answer
>>>> the new collection."
>>>>
>>>> | newCollection |
>>>> newCollection := self species new.
>>>> self
>>>> do: [ :each | each toCollect: aBlock on: newCollection ].
>>>> ^ newCollection
>>>>
>>>>
>>>> and
>>>>
>>>> DiscardingValue >> toCollect: aBlock on: aCollection
>>>> "discard computation"
>>>> ^ self
>>>>
>>>>
>>>> Object >> toCollect: aBlock on: aCollection
>>>>
>>>> ^ aCollection add: (aBlock value: self)
>>>>
>>>>
>>>> So I imagine that you see the design and I wanted to get your point
>>>> of view.
>>>>
>>>> --
>>>> Using Opera a kind of bad mail client but far better than thunderbird
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> Moose-dev(a)list.inf.unibe.ch
>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> Moose-dev(a)list.inf.unibe.ch
>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>> www.feenk.com
>>
>> "If you interrupt the barber while he is cutting your hair,
>> you will end up with a messy haircut."
>>
>
--
Using Opera's mail client: http://www.opera.com/mail/
Dec. 21, 2016
Re: [Pharo-users] [Moose-dev] Design Challenge: metrics missing value...
by stepharong
> Hi Alex,
>
> Following the design proposed by Stef, in your case you would use a
> different collection.
Doru I have multiple missingValue so that they embed their own strategy.
Now I do not know for the scenario of alex.
>
> Cheers,
> Doru
>
>
>> On Dec 21, 2016, at 8:13 AM, Alexandre Bergel <alexandre.bergel(a)me.com>
>> wrote:
>>
>> Hi Stef,
>>
>> You are raising an interesting point to discuss. This MissingValue is
>> indeed better than having -1
>> Something to keep in mind: it may be that one would like to focus on
>> the missing value and not really the value.
>>
>> Consider:
>>
>>> testCollect
>>>
>>> | uarray collected |
>>> uarray := UniformOrderedCollection new.
>>> uarray add: 10.
>>> uarray add: 20.
>>> uarray add: (MissingValue discarding).
>>> collected := uarray collect: [ :each | each ].
>>> self assert: collected size equals: 2.
>>
>> It could well be that I would like to be able to query over the
>> MissingValue.
>> Can something like possible: uarray collect: #isMissing
>> ?
>>
>> Cheers,
>> Alexandre
>>
>>
>>> On Dec 20, 2016, at 10:15 PM, stepharong <stepharong(a)free.fr> wrote:
>>>
>>> Hi dear great OO designers
>>>
>>> Here is a little challenges for your brainy souls :)
>>>
>>> In Moose when we compute metrics it may happen than a tool (often
>>> external to pharo) does not compute a metrics
>>> and when we request it in moose we check and often we return a not so
>>> good -1.
>>>
>>> I'm trying to brainstorm on a solution
>>>
>>> - first may be the simplest way is to not invoke a metrics when it is
>>> not computed. But it means that we should know it and that we should
>>> have a registration mechanism. After all this is probably the best
>>> solution.
>>>
>>> - Second we were thinking to use exception but when we have multiple
>>> entities missing one metrics.... I have serious doubts.
>>>
>>> - Second I was thinking about having the following behavior
>>>
>>> testCollect
>>>
>>> | uarray collected |
>>> uarray := UniformOrderedCollection new.
>>> uarray add: 10.
>>> uarray add: 20.
>>> uarray add: (MissingValue discarding).
>>> collected := uarray collect: [ :each | each ].
>>> self assert: collected size equals: 2.
>>>
>>> testDo
>>>
>>> | res uarray |
>>> uarray := UniformOrderedCollection new.
>>> uarray add: 10.
>>> uarray add: 20.
>>> uarray add: (MissingValue discarding).
>>> uarray add: 40.
>>> res := 0.
>>> uarray do: [ :each | res := res + each ].
>>> self assert: res equals: 70.
>>>
>>>
>>> testCollectDefaulting
>>>
>>> | uarray collected |
>>> uarray := UniformOrderedCollection new.
>>> uarray add: 10.
>>> uarray add: 20.
>>> uarray add: (MissingValue default: 33).
>>> collected := uarray collect: [ :each | each ].
>>> self assert: collected size equals: 3.
>>> self assert: collected third equals: 33
>>>
>>>
>>> I basically started to implement
>>>
>>>
>>> do: aBlock
>>> "Refer to the comment in Collection|do:."
>>> 1 to: self size do:
>>> [:index | (self at: index) toDo: aBlock on: self]
>>>
>>>
>>>
>>> collect: aBlock
>>> "Evaluate aBlock with each of the receiver's elements as the argument.
>>> Collect the resulting values into a collection like the receiver.
>>> Answer
>>> the new collection."
>>>
>>> | newCollection |
>>> newCollection := self species new.
>>> self
>>> do: [ :each | each toCollect: aBlock on: newCollection ].
>>> ^ newCollection
>>>
>>>
>>> and
>>>
>>> DiscardingValue >> toCollect: aBlock on: aCollection
>>> "discard computation"
>>> ^ self
>>>
>>>
>>> Object >> toCollect: aBlock on: aCollection
>>>
>>> ^ aCollection add: (aBlock value: self)
>>>
>>>
>>> So I imagine that you see the design and I wanted to get your point of
>>> view.
>>>
>>> --
>>> Using Opera a kind of bad mail client but far better than thunderbird
>>> _______________________________________________
>>> Moose-dev mailing list
>>> Moose-dev(a)list.inf.unibe.ch
>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> Moose-dev(a)list.inf.unibe.ch
>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "If you interrupt the barber while he is cutting your hair,
> you will end up with a messy haircut."
>
>
--
Using Opera's mail client: http://www.opera.com/mail/
Dec. 21, 2016
Re: [Pharo-users] Resetting Ring ?
by Sven Van Caekenberghe
> On 21 Dec 2016, at 14:49, Nicolai Hess <nicolaihess(a)gmail.com> wrote:
>
>
>
> 2016-12-20 11:45 GMT+01:00 Sven Van Caekenberghe <sven(a)stfx.eu>:
> In a 4.0 image I got in a situation where it seems Ring is out of sync (I am getting errors of missing meta classes on each accept). I vaguely remember there being an expression to reset/reinitialise Ring ?
>
> I do not remember any case in which Ring had to be reseted.
> Some more info about wthe error, where does it try to access meta classes ?
After a while, it went away, sorry.
> All I remember is resetting RPackage:
>
> RPackageOrganizer initializeDefaultFromMC.
I believe that was what I was looking for. Thanks, Nicolai !
> Does anyone remember ?
>
> Thx,
>
> Sven
>
Dec. 21, 2016