Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- 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
December 2015
- 990 messages
Re: [Pharo-dev] #sum:, #detectSum:, #sumNumbers:
by Chris Cunningham
<uncontrolled snipping>
On Thu, Dec 3, 2015 at 5:48 AM, Ben Coman <btc(a)openinworld.com> wrote:
>
>
> * Points are summable " { 2@2 . 3@3 } " --> 5@5. But then " 2@2 +
> 1 " --> 3@3 , so " {} sum " returning 0 would seem to not
> cause any error in this case.
>
>
> cheers -ben
but points aren't commutative:
2@2 + 1 " = 3@3"
1 + 2@2 " = 3@2"
Of course, 0 wouldn't be an issue, unless you wanted to access x or y!
-cbc
Dec. 3, 2015
Explanation how to use GT Debugger and GT SUnit Debugger with DarkThem in Pharo 4.0 [was] Using Re: [Moose-dev] Re: showing a diff on #assert:equals:
by Mariano Martinez Peck
Andrei... you rock!!! It works. I copy paste it here so that others can
take advantage too.
Look also the attached screenshot :)
Doru...you were right..you THINK you don't need a any other tool, until
someone comes with a little example as a debugger for test cases...wow...
those are moldable tools!!!!
The code I used (with the hack of the override) is this:
http://ws.stfx.eu/ME85BCYIPSU8
(of course, I published the code via the playground hahahha)
Thank you!
On Thu, Dec 3, 2015 at 3:53 PM, Andrei Chis <chisvasileandrei(a)gmail.com>
wrote:
> Ahh. Wrong order for loading packages in my previous instructions.
> You should load first DebuggerExtensions and then the debuggers.
>
> Cheers,
> Andrei
>
> On Thu, Dec 3, 2015 at 7:39 PM, Mariano Martinez Peck <
> marianopeck(a)gmail.com> wrote:
>
>>
>>
>> On Thu, Dec 3, 2015 at 1:15 PM, Andrei Chis <chisvasileandrei(a)gmail.com>
>> wrote:
>>
>>> Hi Mariano,
>>>
>>> To get it working in Pharo 4 you should:
>>>
>>> - load GT-Debugger-AndreiChis.249 from AndreiChis/GTDebuggerPharo4
>>> - load GT-SUnitDebugger-AndreiChis.18 from AndreiChis/GTDebuggerPharo4
>>> - load DebuggerExtensions-AndreiChis.9 from Pharo/Debugger
>>> - register the debuggers:
>>> - GTGenericStackDebugger registerExtraToolsOn: Smalltalk tools.
>>> - GTSUnitDebugger registerExtraToolsOn: Smalltalk tools
>>>
>>> Like this the spec debugger is still the default one and you still have
>>> to start GTDebugger from the pre debug window.
>>> You can register GTDebugger as the default one (GTGenericStackDebugger
>>> registerToolsOn: Smalltalk tools) but it will not switch to the SUnit
>>> extension automatically (that only works in Pharo 5). You'll need to switch
>>> to it from the context menu of the stack.
>>>
>>> Let me know how it goes.
>>>
>>>
>> Hi Andrei,
>>
>> I tried what you said with the following script in a virgin 4.0:
>>
>> Gofer it
>> smalltalkhubUser: 'AndreiChis' project: 'GTDebuggerPharo4';
>> version: 'GT-Debugger-AndreiChis.250';
>> version: 'GT-SUnitDebugger-AndreiChis.19';
>> load.
>> Gofer it
>> smalltalkhubUser: 'Pharo' project: 'Debugger';
>> version: 'DebuggerExtensions-AndreiChis.9';
>> load.
>> (Smalltalk at: #GTGenericStackDebugger) registerExtraToolsOn: Smalltalk
>> tools.
>> (Smalltalk at: #GTSUnitDebugger) registerExtraToolsOn: Smalltalk tools.
>>
>>
>> However, as soon as I try to debug something I get the following error.
>> It seems I am missing the class GTSUnitActivationPredicate.
>>
>>
>> UndefinedObject(Object)>>doesNotUnderstand: #new
>> GTSUnitDebugSession class>>activationPredicate
>> GTSUnitDebugger class>>handlesContext:
>> [ :aPair | aPair key handlesContext: aContext ] in
>> PharoCommonTools(ToolRegistry)>>debuggersWithRanksForContext: in Block: [
>> :aPair | aPair key handlesContext: aContext ]
>> OrderedCollection>>select:
>> PharoCommonTools(ToolRegistry)>>debuggersWithRanksForContext:
>> PharoCommonTools(ToolRegistry)>>debuggerDispatcherFor:
>> GTTemporaryPreDebugChangeDebuggerAction>>executeAction
>> GTTemporaryPreDebugChangeDebuggerAction(DebugAction)>>execute
>> ....
>>
>> Any idea?
>>
>> Weird thing is that I am NOT opening a debugger of a SUnit.. but a
>> regular debugger.
>> Maybe the registration part of your script is wrong?
>>
>> Thanks in advance,
>>
>>
>>> Cheers,
>>> Andrei
>>>
>>> On Wed, Dec 2, 2015 at 5:37 PM, Mariano Martinez Peck <
>>> marianopeck(a)gmail.com> wrote:
>>>
>>>>
>>>>
>>>> On Wed, Dec 2, 2015 at 1:31 PM, Andrei Chis <chisvasileandrei(a)gmail.com
>>>> > wrote:
>>>>
>>>>>
>>>>>
>>>>> On Wed, Dec 2, 2015 at 5:24 PM, Mariano Martinez Peck <
>>>>> marianopeck(a)gmail.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Dec 2, 2015 at 1:02 PM, Andrei Chis <
>>>>>> chisvasileandrei(a)gmail.com> wrote:
>>>>>>
>>>>>>> I think it's not straightforward to get it to work in Pharo 4.
>>>>>>> I'm not sure you can load the latest version of GTools into Pharo 4.
>>>>>>>
>>>>>>>
>>>>>> That's what I was thinking :(
>>>>>>
>>>>>>
>>>>>>> You can load just the packages for GT-Debugger, GT-SUnitDebugger and
>>>>>>> DebuggerExtensions, however, it would not work by default as there were
>>>>>>> some changes to the API of the debugger. You'll also need to backport
>>>>>>> those changes, but that might be more work.
>>>>>>> If you really want to use it I could make a version that uses the
>>>>>>> old API.
>>>>>>>
>>>>>>>
>>>>>> I don't want you loose much time if I am the only one wanting this.
>>>>>> Personally, for my real client-paying job I won't be able to move to 5.0
>>>>>> until it's released. But then I can wait.
>>>>>>
>>>>>
>>>>>> However, I would like to at least give it a quick try to the dirty
>>>>>> solution. As you said, maybe loading those 3 packages and bringing some
>>>>>> slices (the ones of the debugger api might work). mmmmm but I guess this
>>>>>> will break the Spec Debugger right? Unless the slides also updates that..
>>>>>> Do you remember which were the debugger changes?
>>>>>>
>>>>>
>>>>> There are 4 slices that you need to load
>>>>> I tried loading the first one (https://pharo.fogbugz.com/f/cases/17069)
>>>>> and my image hangs...
>>>>>
>>>>> I'll see tomorrow if I can make a quick and dirty refactoring to get
>>>>> it to work just for Pharo 4.
>>>>>
>>>>>
>>>> Super !!! Let us know!
>>>>
>>>>
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> On Wed, Dec 2, 2015 at 4:07 PM, Mariano Martinez Peck <
>>>>>>> marianopeck(a)gmail.com> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Dec 2, 2015 at 11:53 AM, Andrei Chis <
>>>>>>>> chisvasileandrei(a)gmail.com> wrote:
>>>>>>>>
>>>>>>>>> I splitted the code pane into two to also show the setUp/tearDown
>>>>>>>>> code.
>>>>>>>>> A button/checkbox to hide/show this pane could be next.
>>>>>>>>>
>>>>>>>>>
>>>>>>>> Coool!!!
>>>>>>>> Andrei, let me ask, would this work in Pharo 4.0? If true, then I
>>>>>>>> should only load gt debugger or a new version of the whole GT suite ?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Cheers,
>>>>>>>>> Andrei
>>>>>>>>>
>>>>>>>>> On Wed, Dec 2, 2015 at 1:09 PM, Mariano Martinez Peck <
>>>>>>>>> marianopeck(a)gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Wed, Dec 2, 2015 at 9:02 AM, Juraj Kubelka <
>>>>>>>>>> juraj.kubelka(a)gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> On Dec 1, 2015, at 17:47, Andrei Chis <
>>>>>>>>>>> chisvasileandrei(a)gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi Mariano
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Dec 1, 2015 at 12:59 PM, Mariano Martinez Peck <
>>>>>>>>>>> marianopeck(a)gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Tue, Dec 1, 2015 at 7:31 AM, Andrei Chis <
>>>>>>>>>>>> chisvasileandrei(a)gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Tue, Dec 1, 2015 at 1:05 AM, Mariano Martinez Peck <
>>>>>>>>>>>>> marianopeck(a)gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Uhhh that's very cool. Quick question, what happens if the
>>>>>>>>>>>>>> textual representation of the actual vs expected is the same yet the
>>>>>>>>>>>>>> objects are not #= ?
>>>>>>>>>>>>>> It shows no diff and then I must go to see the inspector?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> These textual representations can be customized per each
>>>>>>>>>>>>> object type, however if they are the same now it just shows the diff pane
>>>>>>>>>>>>> with no differences.
>>>>>>>>>>>>> Another idea would be to also show two inspectors side-by-side
>>>>>>>>>>>>> apart from the diff.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> A side-by-side inspector would be another really cool addition
>>>>>>>>>>>> for when the string comparison won't work.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> Then even if you see or not a difference in the textual diff,
>>>>>>>>>>>>> you could use the inspector to look at differences between the state.
>>>>>>>>>>>>> Also right now the diff is textual. Adding better diff widgets
>>>>>>>>>>>>> for specific data types would help.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>> Oh yes. But I think that adding a side-by-side inspector would
>>>>>>>>>>>> be a great second step in which you know you can always fall back no matter
>>>>>>>>>>>> which kind of object.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I added two side by side inspectors. I still need to
>>>>>>>>>>> improve/disable navigation in these embedded inspectors
>>>>>>>>>>>
>>>>>>>>>>> <debugger.png>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> BTW...since we are near Christmas... it would be terrific to
>>>>>>>>>>>> have a button somewhere to show/hide the #setUp method besides the code
>>>>>>>>>>>> representing the piece of stack you clicked. Sometimes when I am debugging
>>>>>>>>>>>> test failures that had a setup I always have to open another window with
>>>>>>>>>>>> the setup because I don't remember everything I did there and that's useful
>>>>>>>>>>>> information to understand what a test could have failed. There was a
>>>>>>>>>>>> Nautilus plugin for that some time ago.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Sounds like an useful feature. I'll give a try implementing it.
>>>>>>>>>>> Or if you are faster you can give it a try :)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I like the idea. Maybe having a âsetUp tab; next to âSourceâ tab
>>>>>>>>>>> whenever we browse a test case object in debugger? Or it could be part of
>>>>>>>>>>> the inspector the same way you did âDiffâ tab.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> I think the MAIN point for me is to be able to see the setUp AT
>>>>>>>>>> THE SAME time with the code of the failing error. If I have to click
>>>>>>>>>> another tab to see the setup and then another click to go back to see my
>>>>>>>>>> test, then I gain nothing. Maybe splitting (either vertically or
>>>>>>>>>> horizontally) the area where now you see the method source (of the selected
>>>>>>>>>> stack) in order to also see (fixed) the setUp ? Or .. maybe a new tab in
>>>>>>>>>> the below (expected vs current, etc) called "setUp". That way, at least I
>>>>>>>>>> can see the method and the setUp all together (Ok, I cannot see the
>>>>>>>>>> expected vs current, but ok)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Cheers,
>>>>>>>>>>> Juraj
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Cheers,
>>>>>>>>>>> Andrei
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Cheers,
>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Moose-dev mailing list
>>>>>>>>>>> Moose-dev(a)list.inf.unibe.ch
>>>>>>>>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Moose-dev mailing list
>>>>>>>>>>> Moose-dev(a)list.inf.unibe.ch
>>>>>>>>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Mariano
>>>>>>>>>> http://marianopeck.wordpress.com
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Moose-dev mailing list
>>>>>>>>>> Moose-dev(a)list.inf.unibe.ch
>>>>>>>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Moose-dev mailing list
>>>>>>>>> Moose-dev(a)list.inf.unibe.ch
>>>>>>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Mariano
>>>>>>>> http://marianopeck.wordpress.com
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Moose-dev mailing list
>>>>>>>> Moose-dev(a)list.inf.unibe.ch
>>>>>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Moose-dev mailing list
>>>>>>> Moose-dev(a)list.inf.unibe.ch
>>>>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Mariano
>>>>>> http://marianopeck.wordpress.com
>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> Moose-dev(a)list.inf.unibe.ch
>>>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> Moose-dev(a)list.inf.unibe.ch
>>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Mariano
>>>> http://marianopeck.wordpress.com
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> Moose-dev(a)list.inf.unibe.ch
>>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> Moose-dev(a)list.inf.unibe.ch
>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>>
>>>
>>
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.com
>>
>> _______________________________________________
>> Moose-dev mailing list
>> Moose-dev(a)list.inf.unibe.ch
>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>
>>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)list.inf.unibe.ch
> https://www.list.inf.unibe.ch/listinfo/moose-dev
>
>
--
Mariano
http://marianopeck.wordpress.com
Dec. 3, 2015
Re: [Pharo-dev] Differences Compiler vs. OpalCompiler (or parser)
by Marcus Denker
> On 20 Nov 2015, at 22:37, Nicolai Hess <nicolaihess(a)gmail.com> wrote:
>
> GTDummyExamples class
> d: anInteger
> <gtExample>
> <label: 'Dummy #d:, depends #c:'>
> <description: 'should raise an exception as the argument is not anInteger'>
> <depends: #c:>
> <raises: Literal constant expected -> MessageNotUnderstood>
>
> ^ 1 + anInteger
>
> The old Parser complains about the class name "MessageNotUnderstood" used as a pragma
> argument without being a string or symbol
>
> Opal does not complain
>
> Is Opals behavior intended ?
>
it actually is compiled as a literal⦠maybe the idea was that it follows how literal arrays work? #(thisisasymbol).
But yes, it it confusing and should be changed.
>
>
> From squeaks bugtracker : http://bugs.squeak.org/view.php?id=7770 <http://bugs.squeak.org/view.php?id=7770>
>
> Cascading message sends to super.
>
> Compiler refuses to compile
> super
> initialize;
> setListProperties
>
>
> It looks like Opal would compile this to
>
> super initialize.
> super setListProperties.
>
> Intended ?
We just use RBParser (or started with RBParser). I think it is intended.
> Do we want to keep it?
>
Yes, I actually like it.
> NBNativeCodeGen
> parseOptions: optionsArray
> uses association symbol -> block instead of block -> block
> for caseOf arguments.
> The old parser does not accept this.
>
I would say that we change it to be like the old and change set one user.
Marcus
Dec. 3, 2015
Re: [Pharo-dev] Semantic analysis doesn't compute RBArgumentNode instances
by Martin Dias
Done:
https://pharo.fogbugz.com/f/cases/17179/Semantic-analysis-doesn-t-compute-R…
On Thu, Dec 3, 2015 at 2:30 PM, Marcus Denker <marcus.denker(a)inria.fr>
wrote:
> yes !
> > On 03 Dec 2015, at 14:16, Martin Dias <tinchodias(a)gmail.com> wrote:
> >
> > Hi,
> >
> > In Pharo 4, the RBExplicitVariableParser computed the argument variables
> as RBArgumentNodes:
> >
> > (Integer >> #bitAnd:) parseTree arguments
> > "--> an OrderedCollection(RBArgumentNode(n))"
> >
> > In Pharo 50191, such parser was removed (case 16026) because "semantic
> analysis" does the same job. However, it does not exactly the same job:
> argument variables are now parsed as generic variable nodes:
> >
> > (Integer >> #bitAnd:) parseTree doSemanticAnalysis arguments
> > "an OrderedCollection(RBVariableNode(n))"
> >
> > Anyway, it works well with other variables, e.g. temporaries:
> >
> > (Integer >> #bitAnd:) parseTree doSemanticAnalysis temporaries
> > "an OrderedCollection(RBTemporaryNode(norm))"
> >
> > Should I create a bug entry?
> >
> > Cheers,
> > Martin
>
>
>
Dec. 3, 2015
How to listen Monticello load start/end (and origin of changes)
by Martin Dias
Hi,
Doru asked me how does Epicea listen this information, and I created a
snippet to demo it *in a plain Pharo 5 image* (no need to load Epicea
before). Maybe somebody else is interested, that's why I share it with
everybody.
You can open a Transcript and evaluate the following snippet. After
evaluation, you can add new methods in Nautilus and see the log in the
Transcript. (The code is not very nice).
Cheers,
Martin
"Listen load start"
Job jobAnnouncer
when: JobStart
do: [ :aJobStart |
| owner |
owner := aJobStart job owner.
(owner isKindOf: MCVersionLoader)
ifTrue: [ ('Starting to load ', owner versions asArray asString) logCr ] ].
"Listen load end"
Job jobAnnouncer
when: JobEnd
do: [ :aJobEnd |
| owner |
owner := aJobEnd job owner.
(owner isKindOf: MCVersionLoader)
ifTrue: [ ('Ending to load ', owner versions asArray asString) logCr ] ].
"Listen changes in the middle"
SystemAnnouncer uniqueInstance
when: MethodAdded
do: [ :aMethodAdded |
| mcLoaderJobOrNil |
mcLoaderJobOrNil :=
Job current
ifNil: [ nil ]
ifNotNil: [ :currentJob |
currentJob
lookup: [ :job | job owner isKindOf: MCVersionLoader ]
ifNone: [ nil ] ].
(aMethodAdded methodAdded printString, ' --- ',
(mcLoaderJobOrNil
ifNil: [ 'no info' ]
ifNotNil: [ 'while loading ', mcLoaderJobOrNil owner versions asArray
asString ])) logCr ].
"Try it loading"
Gofer it
smalltalkhubUser: 'MartinDias' project: 'AlarmClock';
package: 'AlarmClock';
load.
Dec. 3, 2015
Re: [Pharo-dev] VoyageMongo and cache compaction
by Holger Freyther
> On 03 Dec 2015, at 09:58, Holger Freyther <holger(a)freyther.de> wrote:
>
> Hi guys,
> This is a write "heavy" workload but at no point in time more than a couple of objects will
> be in the cache. So somehow the VOMongoCache>>#compactIfNeeded check does not
> trigger and/or given the difference in the sizes of the dictionary it is possible that some of
> the dead objects are not removed from the timestamp cache.
the keyword here is "delete" heavy. VOMongoCache>>#removeValue: is called by the
VOMongoRepository>>#remove: but this leaves the timeStamp (pharo v3 version or
versions in newer) to have an entry for a OID that was removed.
And as >>#performCompact will only remove "dead" keys from timeStamp/versions it will
leave many delete entries in the timeStamp.
The other thing is that I wonder why the self mutex critical lock is not taken around the
removal of the object?
Is there anyone willing to resolve this, create a testcase and make a backport to Pharo3?
holger
Dec. 3, 2015
Re: [Pharo-dev] #sum:, #detectSum:, #sumNumbers:
by Ben Coman
On Wed, Dec 2, 2015 at 10:45 PM, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>
>> On 02 Dec 2015, at 15:21, Nicolai Hess <nicolaihess(a)gmail.com> wrote:
>>
>>
>>
>> 2015-12-02 15:03 GMT+01:00 Ben Coman <btc(a)openinworld.com>:
>> On Wed, Dec 2, 2015 at 12:38 AM, Tudor Girba <tudor(a)tudorgirba.com> wrote:
>> > Hi,
>> >
>> >> On Dec 1, 2015, at 5:13 PM, Max Leske <maxleske(a)gmail.com> wrote:
>> >>
>> >> @Doru
>> >> Youâre missing the point: #anyOne *fails* for empty collections.
>> >
>> > I am not missing the point at all. I am saying that if you want sum: to be generic, it cannot assume a specific Zero object.
>> >
>> > And sum: should be generic because of its name.
>>
>> I am missing understanding the other use cases. Can you describe
>> further the generic nature of #sum & #sum: ? I would have thought by
>> default they only applied to numbers.
>>
>> sum can be applied to anything that supports #+, not only numbers
>> sum: can be applied to any collection with a block that return some object that supports #+
To me this is a mis-application of polymorphism, that just because
something responds to #+ it should be summable. We have overloaded the
semantics of #+ to mean both numeric addition and
concatenation/membership, but technically "summation" relates only to
numeric addition.
https://www.google.com.au/search?q=define+sum&oq=define+sum
https://www.google.com.au/search?q=define+concatenate&oq=define+concatenate
For example...
* KMModifier implements #+ so what is the expected semantic of " {
KMModifier shift . KMModifier meta} sum " ?
To me this is more of a concatenation/join/union facility rather than
numeric addition. (btw, that expression actually fails since
KMModifier does not understand minus #- ) .
* String implements #+ and " { '1' . '2' } sum " --> '3', so
actually its doing numeric addition. However " { 'a' . 'b' } sum "
produces an error.
So actually there seem some existing problems with summing
non-numerics. What examples work?
* Trait classes implement both #+ and #- , but the semantic seems
more to do with membership than numeric addition. I don't how how to
produce an example of using #sum against traits.
* Points are summable " { 2@2 . 3@3 } " --> 5@5. But then " 2@2 +
1 " --> 3@3 , so " {} sum " returning 0 would seem to not
cause any error in this case.
cheers -ben
>>
>> therefore you can not assume 0 (<- a number) is a proper initial value therefore you *need* to work with #anyOne
>> and as you can not assume a proper initial value, you can not assume a default value for empty collections
>> -> it should throw an error. If you (the caller of the function) knows what to do with an empty collection you have
>> to check, or call inject:into: directly, with a proper initial value.
>
> I am sorry but I am getting really tired of this, you should read what is being said.
>
> I am not suggesting to stop using #anyOne because I like why it is there and what it can do.
>
> The change I want is what happens with an empty collection when using the simplest selector, #sum.
>
> I do not want to say to some collection of numbers #sumIfEmpty: [0], because summing numbers starting from zero is the most common case and everybody expects that, hence the unary selector fits.
>
> I want the less common cases to use the more complicated API, as in some collection of colors #sumIfEmpty: [ Color black ]
>
> In my book that is common sense API design.
>
> Doing that I do no take anything away, because today you already have to make sure the collection is not empty.
>
> The only change would be in the error behaviour. I think that is a reasonable price to pay. Instead of having #anyOne fail, it will say that #+ cannot add 0 to some object, and in a comment we can point to the alternative API.
>
> http://izquotes.com/quote/242740 right ?
>
>> cheers -ben
>>
>> >
>> >>> On 01 Dec 2015, at 15:31, Esteban A. Maringolo <emaringolo(a)gmail.com> wrote:
>> >>>
>> >>> I don't want to be heretic (or too orthodox), but why not to delegate
>> >>> this behavior to other class (an iterator maybe?).
>> >>>
>> >>> It's too tempting adding these convenience methods to Collection
>> >>> and/or subclasses, but anything that requires an explicit protocol of
>> >>> its elements is wrong, IMO.
>> >>>
>> >>> something like aCollection arithmetic sum: [...] or.... aCollection
>> >>> arithmetic avg.
>> >>
>> >>
>> >> Interesting thought!
>> >
>> > +100
>> >
>> > Doru
>> >
>> >>>
>> >>> My two cents for this.
>> >>>
>> >>> Regards!
>> >>>
>> >>>
>> >>> Esteban A. Maringolo
>> >>>
>> >>
>> >>
>> >
>> > --
>> > www.tudorgirba.com
>> >
>> > "Every thing has its own flow."
>> >
>> >
>> >
>> >
>> >
>
>
Dec. 3, 2015
Re: [Pharo-dev] Semantic analysis doesn't compute RBArgumentNode instances
by Marcus Denker
yes !
> On 03 Dec 2015, at 14:16, Martin Dias <tinchodias(a)gmail.com> wrote:
>
> Hi,
>
> In Pharo 4, the RBExplicitVariableParser computed the argument variables as RBArgumentNodes:
>
> (Integer >> #bitAnd:) parseTree arguments
> "--> an OrderedCollection(RBArgumentNode(n))"
>
> In Pharo 50191, such parser was removed (case 16026) because "semantic analysis" does the same job. However, it does not exactly the same job: argument variables are now parsed as generic variable nodes:
>
> (Integer >> #bitAnd:) parseTree doSemanticAnalysis arguments
> "an OrderedCollection(RBVariableNode(n))"
>
> Anyway, it works well with other variables, e.g. temporaries:
>
> (Integer >> #bitAnd:) parseTree doSemanticAnalysis temporaries
> "an OrderedCollection(RBTemporaryNode(norm))"
>
> Should I create a bug entry?
>
> Cheers,
> Martin
Dec. 3, 2015
Semantic analysis doesn't compute RBArgumentNode instances
by Martin Dias
Hi,
In Pharo 4, the RBExplicitVariableParser computed the argument variables as
RBArgumentNodes:
(Integer >> #bitAnd:) parseTree arguments
"--> an OrderedCollection(RBArgumentNode(n))"
In Pharo 50191, such parser was removed (case 16026) because "semantic
analysis" does the same job. However, it does not exactly the same job:
argument variables are now parsed as generic variable nodes:
(Integer >> #bitAnd:) parseTree doSemanticAnalysis arguments
"an OrderedCollection(RBVariableNode(n))"
Anyway, it works well with other variables, e.g. temporaries:
(Integer >> #bitAnd:) parseTree doSemanticAnalysis temporaries
"an OrderedCollection(RBTemporaryNode(norm))"
Should I create a bug entry?
Cheers,
Martin
Dec. 3, 2015
Re: [Pharo-dev] [Vm-dev] Re: vm crash in SmalltalkImage>garbageCollect
by Mariano Martinez Peck
Indeed it seems related. Unfortunately neither Andrei or me could find the
reason. We did what Eliot suggested us with leaks but we found none.
At least right now we have 2 different ways of reproducing the crash (if it
is the same bug).
On Thu, Dec 3, 2015 at 7:50 AM, Max Leske <maxleske(a)gmail.com> wrote:
>
> Hi,
>
> I discovered a similar issue described in this issue
> https://pharo.fogbugz.com/f/cases/14165/ObsoleteTest-testFixObsoleteSharedP….
> Might be related.
>
> Cheers,
> Max
>
>
> On 24 Nov 2015, at 19:34, Eliot Miranda <eliot.miranda(a)gmail.com> wrote:
>
>
>
> On Mon, Nov 23, 2015 at 4:57 PM, Andrei Chis <chisvasileandrei(a)gmail.com>
> wrote:
>
>> Hi Eliot,
>>
>> Is an assert vm the same as a vm compiled with debugging support?
>>
>
> VMMaker.oscog generates VM sources designed to be compiled in three
> different ways, Debug, Assert and Production. Debug is designed to enable
> asserts to check invariants and be compiled with no optimization for
> maximum debuggability. Assert is designed to enable asserts to check
> invariants and be compiled with limited optimization for faster assert
> checking. Production has asserts disabled (actually compiled-out) and be
> compiled with aggressive optimization, so it has limited debuggability (it
> should still contain debugging symbols).
>
> So Assert and Debug are not quite the same and certainly if you're hunting
> for storage leaks an Assert VM will run much faster than a Debug VM. If
> you have a look at the Cog svn sources you'll find that the build scripts
> build all three kinds of VMs for all platforms.
>
>
>
> Also can you point me to any documentation about the leak checker.
>>
>
> It's not well documented because it may change over time, but the -help
> flag on the VM should include this:
>
> -leakcheck num check for leaks in the heap
>
> and the meaning of num is a set of flags:
>
> setCheckForLeaks: integerFlags
> " 0 = do nothing.
> 1 = check for leaks on fullGC (GCModeFull).
> 2 = check for leaks on scavenger (GCModeNewSpace).
> 4 = check for leaks on incremental (GCModeIncremental)
> 8 = check for leaks on become
> 16 = check for leaks on image segments"
> checkForLeaks := integerFlags
>
> So once you have your assert VM try running your test case using
>
> myvm -leakcheck 5 myimage.image
>
> on the command line. You'll want to use a debugger to put breakpoints in
> the leak checker and you may need to learn about the VM's debug routines to
> try and figure out the cause of the leak once the leak checker finds it.
>
>> Cheers,
>> Andrei
>>
>> On Nov 24, 2015 1:45 AM, "Eliot Miranda" <eliot.miranda(a)gmail.com> wrote:
>> >
>> > Hi Andrei,
>> >
>> > On Mon, Nov 23, 2015 at 7:59 AM, Andrei Chis <
>> chisvasileandrei(a)gmail.com> wrote:
>> >>
>> >> Hi,
>> >>
>> >> With both the latest and stable vm I have an use case in which the vm
>> crashed in SmalltalkImage>>garbageCollect.
>> >>
>> >> To set up an image that exhibits the failure , execute this with the
>> latest pharo version:
>> >>
>> >> /pharo Pharo.image eval --save "{ { 'ConfigurationOfRubric'. 'Pharo'.
>> 'Rubric' }. { 'ConfigurationOfGlamourCore'. 'Moose'. 'Glamour' }. {
>> 'ConfigurationOfGTInspectorCore'. 'Moose'. 'GToolkit' }. {
>> 'ConfigurationOfGTPlaygroundCore'. 'Moose'. 'GToolkit' }. {
>> 'ConfigurationOfGTEventRecorder'. 'Moose'. 'GToolkit' }. {
>> 'ConfigurationOfGTSpotter'. 'Moose'. 'GToolkit' }. } do: [ :spec | Gofer
>> new smalltalkhubUser: spec second project: spec third; package: spec first;
>> load ]."
>> >>
>> >> ./pharo Pharo.image config
>> http://www.smalltalkhub.com/mc/Pharo/Pharo50Inbox/main ConfigurationOfGToolkitCore
>> --install=3.2
>> >>
>> >> Then attempting to run the following code triggers the failure:
>> >>
>> >> ./pharo Pharo.image eval --save "TestRunner open model
>> packageSearchUpdate: 'gt-tests-inspector'; classSearchUpdate:
>> 'GTInspectorExamplesTest'; runAll"
>> >>
>> >> Based on the trace below the failure happens when the
>> test GTInspectorExamplesTest calls 'Smalltalk>>garbageCollect' in the setUp
>> method.
>> >>
>> >> That call can be removed, however, in other runs the failure happens
>> in other methods calling Smalltalk>>garbageCollect.
>> >>
>> >> Is it possible that this is a bug with the image (some broken object)
>> or is it a vm bug?
>> >
>> >
>> > The way to test this is to build an assert VM and then use the leak
>> checker. The leak checker will allow you to narrow down the cause. If the
>> leak checker shows no corruption then its definitely a GC bug. If there
>> leak checker does show corruption before GC then one still has to find out
>> what caused the heap corruption, but you can use the leak checker to narrow
>> the search.
>> >
>> > HTH
>> > Eliot
>> >
>> >> Cheers,
>> >>
>> >> Andrei
>> >>
>> >>
>> >>
>> >> andrei$ ./pharo Pharo.image eval --save "{ { 'ConfigurationOfRubric'.
>> 'Pharo'. 'Rubric' }. { 'ConfigurationOfGlamourCore'. 'Moose'. 'Glamour' }.
>> { 'ConfigurationOfGTInspectorCore'. 'Moose'. 'GToolkit' }. {
>> 'ConfigurationOfGTPlaygroundCore'. 'Moose'. 'GToolkit' }. {
>> 'ConfigurationOfGTEventRecorder'. 'Moose'. 'GToolkit' }. {
>> 'ConfigurationOfGTSpotter'. 'Moose'. 'GToolkit' }. } do: [ :spec | Gofer
>> new smalltalkhubUser: spec second project: spec third; package: spec first;
>> load ]."
>> >>
>> >> andrei$ ./pharo Pharo.image config
>> http://www.smalltalkhub.com/mc/Pharo/Pharo50Inbox/main ConfigurationOfGToolkitCore
>> --install=3.2
>> >>
>> >> andrei$ ./pharo Pharo.image eval --save "TestRunner open model
>> packageSearchUpdate: 'gt-tests-inspector'; classSearchUpdate:
>> 'GTInspectorExamplesTest'; runAll"
>> >>
>> >>
>> >> Segmentation fault Mon Nov 23 16:48:36 2015
>> >>
>> >>
>> >>
>> >> https://github.com/pharo-project/pharo-vm.git Commit:
>> 28d077d8df494ce050ca42c97c892471e8b8740c Date: 2015-10-16 12:02:43 +0200
>> By: Esteban Lorenzano <estebanlm(a)gmail.com> Jenkins build #15016
>> >>
>> >>
>> >> C stack backtrace:
>> >>
>> >> 0 Pharo 0x0004cacf reportStackState +
>> 159
>> >>
>> >>
>> >>
>> >> Smalltalk stack dump:
>> >>
>> >> 0xbffbf1a0 M SmalltalkImage>garbageCollect 0x1fd49e30: a(n)
>> SmalltalkImage
>> >>
>> >> 0xbffbf1c0 I GTInspectorExamplesTest>setUp 0x2126bc80: a(n)
>> GTInspectorExamplesTest
>> >>
>> >> 0x2126cb90 is not a context
>> >>
>> >>
>> >> Most recent primitives
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> basicNew
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> shallowCopy
>> >>
>> >> new
>> >>
>> >> new:
>> >>
>> >> new:
>> >>
>> >> basicNew
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> replaceFrom:to:with:startingAt:
>> >>
>> >> new:
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> replaceFrom:to:with:startingAt:
>> >>
>> >> new:
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> new:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> perform:with:
>> >>
>> >> perform:with:
>> >>
>> >> perform:
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> new:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> perform:with:
>> >>
>> >> perform:with:
>> >>
>> >> perform:
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> new
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> new:
>> >>
>> >> at:put:
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> new:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> new:
>> >>
>> >> @
>> >>
>> >> at:put:
>> >>
>> >> @
>> >>
>> >> at:put:
>> >>
>> >> @
>> >>
>> >> at:put:
>> >>
>> >> @
>> >>
>> >> at:put:
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> shallowCopy
>> >>
>> >> shallowCopy
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> new:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> new:
>> >>
>> >> @
>> >>
>> >> at:put:
>> >>
>> >> @
>> >>
>> >> at:put:
>> >>
>> >> @
>> >>
>> >> at:put:
>> >>
>> >> @
>> >>
>> >> at:put:
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> basicNew
>> >>
>> >> @
>> >>
>> >> @
>> >>
>> >> perform:
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> shallowCopy
>> >>
>> >> shallowCopy
>> >>
>> >> primUTCMicrosecondsClock
>> >>
>> >> //
>> >>
>> >> basicNew
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> value
>> >>
>> >> valueNoContextSwitch
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> new:
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> replaceFrom:to:with:startingAt:
>> >>
>> >> primitiveGarbageCollect
>> >>
>> >> **IncrementalGC**
>> >>
>> >> **FullGC**
>> >>
>> >> garbageCollectMost
>> >>
>> >> **IncrementalGC**
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> someInstance
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> someInstance
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> someInstance
>> >>
>> >> new:
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> replaceFrom:to:with:startingAt:
>> >>
>> >> primitiveGarbageCollect
>> >>
>> >> **IncrementalGC**
>> >>
>> >> **FullGC**
>> >>
>> >> garbageCollectMost
>> >>
>> >> **IncrementalGC**
>> >>
>> >> wait
>> >>
>> >> shallowCopy
>> >>
>> >> shallowCopy
>> >>
>> >> signal
>> >>
>> >> wait
>> >>
>> >> shallowCopy
>> >>
>> >> shallowCopy
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> signal
>> >>
>> >> wait
>> >>
>> >> shallowCopy
>> >>
>> >> shallowCopy
>> >>
>> >> at:put:
>> >>
>> >> at:put:
>> >>
>> >> signal
>> >>
>> >> new:
>> >>
>> >> basicNew
>> >>
>> >> new:
>> >>
>> >> replaceFrom:to:with:startingAt:
>> >>
>> >> primitiveGarbageCollect
>> >>
>> >> **IncrementalGC**
>> >>
>> >> **FullGC**
>> >>
>> >>
>> >> (Segmentation fault)
>> >>
>> >> ./pharo: line 11: 5224 Abort trap: 6
>> "$DIR"/"pharo-vm/Pharo.app/Contents/MacOS/Pharo" --headless "$@"
>> >
>> >
>> >
>> >
>> > --
>> > _,,,^..^,,,_
>> > best, Eliot
>>
>
>
>
> --
> _,,,^..^,,,_
> best, Eliot
>
>
>
>
--
Mariano
http://marianopeck.wordpress.com
Dec. 3, 2015