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
April 2015
- 1555 messages
Re: [Pharo-dev] About the singleton pattern
by Peter Uhnák
On Wed, Apr 8, 2015 at 11:52 AM, Esteban Lorenzano <estebanlm(a)gmail.com>
wrote:
>
> > On 08 Apr 2015, at 11:37, Yuriy Tymchuk <yuriy.tymchuk(a)me.com> wrote:
> >
> > Sometimes I use #new
> thatâs horrible!
> completely misleading
>
I'm curious, if it is singleton, should you worry from outside about the
fact that it is a singleton? Shouldn't that be hidden from the user?
Peter
April 8, 2015
Re: [Pharo-dev] About the singleton pattern
by Esteban Lorenzano
I disagree⦠probably they are not well used, but this is the meaning of each selector:
- #uniqueInstance. As it says⦠a pure singleton.
example: Author class>>#uniqueInstance.
Ideally, classes using this method also cancels #new.
- #default. It gives you a default instance (as name says), but you can also create instances of it, for other uses.
example: RPackageOrganizer class>>#default.
- #current. It gives you a singleton, but something that can change under certain circumstances, like a UI theme or a platform change.
example: OSPlatform class>>#current.
so⦠I do agree there are a lot of wrong uses there, that needs to be fixed⦠but each of the used selectors have a meaning, and a different meaning than the others.
cheers,
Esteban
> On 08 Apr 2015, at 11:31, Christophe Demarey <Christophe.Demarey(a)inria.fr> wrote:
>
> Hi,
>
> We use quite often the singleton pattern but when I need to use one, I always need to ask myself "What is the selector to get this singleton?".
> We use either aClass>>current, aClass>>default or aClass>>uniqueInstance.
> Could we agree on the selector to use and update existing code?
>
> To get a quick overview, I searched about these methods in a Pharo4 image and get these results:
> ((SystemNavigation default allImplementorsOf: #default) select: #isMetaSide) size. "45"
> ((SystemNavigation default allImplementorsOf: #current) select: #isMetaSide) size. "40"
> ((SystemNavigation default allImplementorsOf: #uniqueInstance) select: #isMetaSide) size. "19"
>
> Your opinion?
>
> Christophe.
April 8, 2015
Re: [Pharo-dev] About the singleton pattern
by Peter Uhnák
Also
((SystemNavigation default allImplementorsOf: #instance) select:
#isMetaSide) size. "10"
((SystemNavigation default allImplementorsOf: #singleton) select:
#isMetaSide) size. "1"
This reminded me of this
https://twitter.com/ID_AA_Carmack/status/575788622554628096
considering we already use a/an for parameters, this can be quite fitting.
But some consensus would be nice⦠personally I don't really like that I
have to think about the fact that it is a singleton, so The* + #new sounds
interesting.
Otherwise to me #current sounds much more fitting than #default (in fact I
would expect them return different things if #current: has been used).
Peter
On Wed, Apr 8, 2015 at 11:37 AM, Yuriy Tymchuk <yuriy.tymchuk(a)me.com> wrote:
> Sometimes I use #new
>
> > On 08 Apr 2015, at 11:31, Christophe Demarey <
> Christophe.Demarey(a)inria.fr> wrote:
> >
> > Hi,
> >
> > We use quite often the singleton pattern but when I need to use one, I
> always need to ask myself "What is the selector to get this singleton?".
> > We use either aClass>>current, aClass>>default or aClass>>uniqueInstance.
> > Could we agree on the selector to use and update existing code?
> >
> > To get a quick overview, I searched about these methods in a Pharo4
> image and get these results:
> > ((SystemNavigation default allImplementorsOf: #default) select:
> #isMetaSide) size. "45"
> > ((SystemNavigation default allImplementorsOf: #current) select:
> #isMetaSide) size. "40"
> > ((SystemNavigation default allImplementorsOf: #uniqueInstance) select:
> #isMetaSide) size. "19"
> >
> > Your opinion?
> >
> > Christophe.
>
>
>
April 8, 2015
Re: [Pharo-dev] About the singleton pattern
by Esteban Lorenzano
> On 08 Apr 2015, at 11:37, Yuriy Tymchuk <yuriy.tymchuk(a)me.com> wrote:
>
> Sometimes I use #new
thatâs horrible!
completely misleading
>
>> On 08 Apr 2015, at 11:31, Christophe Demarey <Christophe.Demarey(a)inria.fr> wrote:
>>
>> Hi,
>>
>> We use quite often the singleton pattern but when I need to use one, I always need to ask myself "What is the selector to get this singleton?".
>> We use either aClass>>current, aClass>>default or aClass>>uniqueInstance.
>> Could we agree on the selector to use and update existing code?
>>
>> To get a quick overview, I searched about these methods in a Pharo4 image and get these results:
>> ((SystemNavigation default allImplementorsOf: #default) select: #isMetaSide) size. "45"
>> ((SystemNavigation default allImplementorsOf: #current) select: #isMetaSide) size. "40"
>> ((SystemNavigation default allImplementorsOf: #uniqueInstance) select: #isMetaSide) size. "19"
>>
>> Your opinion?
>>
>> Christophe.
>
>
April 8, 2015
Re: [Pharo-dev] About the singleton pattern
by Yuriy Tymchuk
Sometimes I use #new
> On 08 Apr 2015, at 11:31, Christophe Demarey <Christophe.Demarey(a)inria.fr> wrote:
>
> Hi,
>
> We use quite often the singleton pattern but when I need to use one, I always need to ask myself "What is the selector to get this singleton?".
> We use either aClass>>current, aClass>>default or aClass>>uniqueInstance.
> Could we agree on the selector to use and update existing code?
>
> To get a quick overview, I searched about these methods in a Pharo4 image and get these results:
> ((SystemNavigation default allImplementorsOf: #default) select: #isMetaSide) size. "45"
> ((SystemNavigation default allImplementorsOf: #current) select: #isMetaSide) size. "40"
> ((SystemNavigation default allImplementorsOf: #uniqueInstance) select: #isMetaSide) size. "19"
>
> Your opinion?
>
> Christophe.
April 8, 2015
About the singleton pattern
by Christophe Demarey
Hi,
We use quite often the singleton pattern but when I need to use one, I always need to ask myself "What is the selector to get this singleton?".
We use either aClass>>current, aClass>>default or aClass>>uniqueInstance.
Could we agree on the selector to use and update existing code?
To get a quick overview, I searched about these methods in a Pharo4 image and get these results:
((SystemNavigation default allImplementorsOf: #default) select: #isMetaSide) size. "45"
((SystemNavigation default allImplementorsOf: #current) select: #isMetaSide) size. "40"
((SystemNavigation default allImplementorsOf: #uniqueInstance) select: #isMetaSide) size. "19"
Your opinion?
Christophe.
April 8, 2015
Re: [Pharo-dev] New Pharo-Launcher package for Mac and Windows
by Damien Cassou
Sean P. DeNigris <sean(a)clipperadams.com> writes:
>> You might want to rename it to something more
>> mac-ish because there will be other md5sum files for other platforms.
>
> I thought I set it to be named latest.dmg.md5sum. I figured the dmg
> would make it self-explanatory and mirror the main artifact name. Do
> you disagree?
you named it latest.md5sum. I've just renamed it to latest.dmg.md5sum. I
think we are in sync.
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
April 8, 2015
Re: [Pharo-dev] New Pharo-Launcher package for Mac and Windows
by Damien Cassou
Ben Coman <btc(a)openinworld.com> writes:
> 1. Install pharo_installer-0.x.x.exe as administrator.
>
> 2. Run Pharolauncher as a standard user.
>
> 3. Change to development mode
is the "development mode" something that end-users should use? I'm not
sure. For me, the development mode is for launcher's developers.
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
April 8, 2015
Re: [Pharo-dev] Existing <script> <example> pragmas and new GT needs
by Ben Coman
On Wed, Apr 8, 2015 at 4:20 PM, Tudor Girba <tudor(a)tudorgirba.com> wrote:
> Hi Torsten,
>
> Your summary is almost correct and indeed it shows a misunderstanding.
> Here the corrections from my point of view:
> - <gtExample> together with concrete usages and the associated mechanism
> was developed 1 year ago and it got integrated together with the rest of
> the GT from the beginning. <gtExample> has always meant a method that
> returned an object of the same class (or possibly subclass).
> - Like you pointed out, we renamed it to <example> after a discussion on
> this mailing list. You did not see the discussion. Or maybe it was not well
> explained, like Nicolai pointed out, even though the messages did show both
> concrete examples and the interpretation in tools.
> - Then a couple of weeks later you introduced the handling of #example*
> selectors in Nautilus.
> - Then I urged you to use the existing <example> instead of #example*, and
> the message was intended to mean that the <example> would have the meaning
> of the existing <example> annotated methods and their existing
> interpretation in tools and tests. This was my expectation, but it was
> likely not well explained.
> - You replied with a suggestion of adding the <example> check in the
> isExampleMethod, and I did not reply. If I would have seen that mail I
> would have not agreed.
> - You went on to add the <example> check resulting in fact in redefining
> the meaning of the original <gtExample>. I missed this change, too.
>
> So, I think this is the root of the misunderstanding.
>
> Now, the main disagreement is related to names. We would like to enhance
> significantly more the infrastructure around the gtExample in GT (including
> documentation, prototyping and testing), and I will try to summarize our
> thoughts in a post these days so that you can see the direction. In the
> meantime, I propose to have this discussion when we have more to show for
> in order to provide a more concrete point of view. This should happen after
> Pharo 4.
>
> And, to have a better chance of having a clean slate discussion later on
> in which to consider the value we associate to names, I would like to
> remove the <example> check from isExampleMethod and continue to preserve
> the treatment of #example* selectors in Nautilus. That will reset the state
> as it was before hte above mentioned misunderstanding, and would allow us
> to start from scratch. Would you agree?
>
> Cheers,
> Doru
>
>
HI Doru, I see in 40594 you've backed out the change of <gtExample> to
<example>. Thanks for starting the Pharo 5 discussion with a clean slate
from your side.
cheers -ben
April 8, 2015
Re: [Pharo-dev] Existing <script> <example> pragmas and new GT needs
by Tudor Girba
Hi Torsten,
Your summary is almost correct and indeed it shows a misunderstanding. Here
the corrections from my point of view:
- <gtExample> together with concrete usages and the associated mechanism
was developed 1 year ago and it got integrated together with the rest of
the GT from the beginning. <gtExample> has always meant a method that
returned an object of the same class (or possibly subclass).
- Like you pointed out, we renamed it to <example> after a discussion on
this mailing list. You did not see the discussion. Or maybe it was not well
explained, like Nicolai pointed out, even though the messages did show both
concrete examples and the interpretation in tools.
- Then a couple of weeks later you introduced the handling of #example*
selectors in Nautilus.
- Then I urged you to use the existing <example> instead of #example*, and
the message was intended to mean that the <example> would have the meaning
of the existing <example> annotated methods and their existing
interpretation in tools and tests. This was my expectation, but it was
likely not well explained.
- You replied with a suggestion of adding the <example> check in the
isExampleMethod, and I did not reply. If I would have seen that mail I
would have not agreed.
- You went on to add the <example> check resulting in fact in redefining
the meaning of the original <gtExample>. I missed this change, too.
So, I think this is the root of the misunderstanding.
Now, the main disagreement is related to names. We would like to enhance
significantly more the infrastructure around the gtExample in GT (including
documentation, prototyping and testing), and I will try to summarize our
thoughts in a post these days so that you can see the direction. In the
meantime, I propose to have this discussion when we have more to show for
in order to provide a more concrete point of view. This should happen after
Pharo 4.
And, to have a better chance of having a clean slate discussion later on in
which to consider the value we associate to names, I would like to remove
the <example> check from isExampleMethod and continue to preserve the
treatment of #example* selectors in Nautilus. That will reset the state as
it was before hte above mentioned misunderstanding, and would allow us to
start from scratch. Would you agree?
Cheers,
Doru
On Fri, Mar 27, 2015 at 7:07 PM, Torsten Bergmann <astares(a)gmx.de> wrote:
> Hi Tudor,
>
> Disclaimer: this mail is not intended to heat this up once again or insult
> you. It is meant to bring some
> more light into the darkness: we all can only decide on what we read and
> the actions that we see
> from others, sometimes a lot is not known from the other participants side.
>
> Exactly because of this let me tell you my side of the story:
>
> The discussion from October [1] between you and Stef happened in a thread
> "structuring widget examples"
> that I personally missed and did not follow.
>
> At around the same time I extended Nautilus so that (additionally to other
> clickable method icons one
> can also click on #exampleXXX and initialize method icons. We have around
> 140 of such exampleXXX methods
> in the image, also in many external packages (like Bloc). These exampleXXX
> methods are used to demonstrate
> Smalltalk/Pharo code and are a valuable source to learn from.
>
> When I announced this "click to run exampleXXX" feature on the list in
> October 2014 you welcomed and
> supported that idea [2]. I also heard the first time that we have an
> overlap in interest in making "examples"
> more visible in one way or the other. So we discussed about this solely in
> the context of example methods
> and I was as that time unaware of other GT related work in this regard.
> In this discussion you mentioned that being dependendent on the selector
> naming convention for the examples
> is not good and therefore you suggested that I extend my slice to use the
> <example> pragma for these
> clickable code examples.
>
> Lets repeat: what I defend here the whole time was your very own idea, not
> mine as one can read in the list
> archive [2].
>
> I supported your opinion because it was and still is an improvement! The
> pragma <example> that you suggested to me
> for the traditional Smalltalk class side exampleXXX methods fitted
> perfectly also namewise and therefore got
> integrated as a valuable addition into the image.
>
> We shared the common view that using the <example> pragma is a cleaner way
> to mark "example methods".
> Anything was fine and I also happily used this pragma also in own external
> packages. I also wanted to go
> through all the example methods in the image to mark them with the
> <example> pragma and additionally provide
> an example browser for newbees based on the pragma as mentioned in the
> thread. But I was too busy to do it.
>
> So the simple reason for the low number of pragma usage in the standard
> image is that I had not yet time
> to do this. It was also not a pressuring task because #exampleXXX where
> clickable and the pragma infrastructure
> was in place to mark all other exampleXXX selectors or selectors like
> #niceExampleToTryOut. So it could be
> used at any point in time later.
>
> CI builds were green and the sun was shining for all of us...
>
> I was unaware (at that time) of one important thing and this discussion
> here and your mails now made
> it more clear:
> Stef asked you also back in October to use <example> instead of
> <gtExample> and you followed this - but on
> the other hand and also in October you suggested to me to use exactly the
> same pragma <example>.
> At that time nobody seem to have been aware of this upcoming name
> collision that was introduced with
> Stefs request to you for GT on one side and your suggestion to me for
> getting independent from exampleXXX
> on the other side.
>
> So in parallel you worked on a feature to "display sample instances" for a
> class in a new inspector tab ("e.g.")
> - for that the meaning behind the pragma marked methods was to return
> instances. You added more and more methods tagged
> with <example> on Character, String, ... to return samples like $a or 42.
>
> GT is one of the packages that is hosted "externally" and get
> resynchronized into Pharo from time to time using Configs.
> The image included the <example> pragma logic for the click action in
> Nautilus. And with each new integration of
> next GT versions into the standard Pharo image more and more <example>
> marked methods came in providing objects/instances.
>
> So it seems it was only a matter of time that this unfortunate "double
> usage" of the pragma showed their
> effects: Nicolai Hess wondered this week about a "useless play icon" in
> Nautilus and created issue #15225 four
> days ago [3] because when you execute a method that just returns an
> instance via the Nautilus icon nothing happens.
>
> To make it clear: it's not that someone like me - just for fun - wanted to
> debate about naming or reify examples discussion
> shortly before the release. We all just want to improve.
> The unfortunate timing of 7 days before the
> release came from the effects of colliding pragma
> usage/goals showing up now.
>
> You, Marcus and me commented in issue #15225. I commented this bug and
> explained about the common agreement of using <example>
> for exampleXXX and example methods to also allow different example
> selectors/method names.
>
> As an answer (and contrary to your own suggestion to me from October) you
> presented then a different definition of
> what an <example> means for you:
>
> Tudor Girba 24.03.2015 13:58 Uhr in issue #15225
> "The semantics of <example> is to offer an initialized object that can
> be used for documentation or testing purposes."
>
> This sudden "redefinition" was very surprising to me and to be honest
> looked like a justification to meet the needs
> of the new inspector feature introduced to Pharo solely.
> And it is a redefinition as for sure it was not what was discussed/what
> was suggested by you to me in October 2014 for
> the usage of <example>
>
> Therefore I took this out of the bugtracker onto the dev-list:
> - because this showed up so late and shortly before the release (assuming
> that when we introduce the wrong
> this will be used and hard to change afterwards)
> - and to avoid that this stayed hidden in the bug tracker
> - we all have further misunderstandings on the pragma usage and the
> definition what methods to depict as example.
>
> In your first initial response on this thread here in the mailinglist [4]
> you claimed that it was me who would
> be "putting <example> and example* selectors in the same pot" now. But it
> was not me - it was you in October
> 2014 who defined it exactly that way and urged me to integrate this in my
> slice as we see in [2].
>
> And similar to the bugtracker you wrote on the list that you "do not
> redefine anything" while in the same post
> presented the definition that an "<example> returns an initialized object"
> by your definition once again.
>
> It was that writing that once again made me think: "how can Tudor ignore
> our discussion, throw his own suggestion
> from October away and now decide for a new semantics on his own?".
>
> Additionally one of the arguments on your side were that there were
> already 96 method annotated that way.
> But I dont want to count who was more busy on either side in annotating
> methods. I wanted and still want a
> solution that fits both improvements including proper naming.
>
> And I was really perplex when you then commented in the evening in the
> issue #15225:
>
> "As there was no complain, we proceeded as agreed and this should be the
> expected status quo for this release."
>
> without all of us participating here having at least a certain degree of
> agreement. Leaving
> out the community and wondering that the discussion fires up again?
>
> Also you stated that "nobody" is using the <example>, completely ignoring
> that I already mentioned to you that I
> did because we agreed on that in October, it was available since then and
> I mostly work in Pharo4 already.
> Yes - not yet as part of the image but in a few external packages already.
> To me that really looked like while we were in complete agreement first
> now nothing what I say in this whole
> topic now counts for you ...
>
> Your side of the story may be different than mine - nonetheless I wanted
> to tell you my point of view
> in the hope you understand why I wrote what I wrote here.
>
> Please reread all what is said with that knowledge. My intention was and
> still is to preserve this initial
> definition of <example> as in the October discussion as it solves the
> problem to not rely on the method name
> for the example methods. And we should find a proper pragma name for the
> needs to tag instance returning methods
> for the new inspector feature or more research on that topic of using such
> instances.
>
> I made a proposal, others suggested proposals as well. But you did not
> write one single line if or why they are
> inacceptable for you, you only answered in general or with "then we go
> back to gtExample" (which would also steal your
> time similar to fixing it right now). I tried to support with a changeset
> so that it is less work on your side, also
> no feedback on this. I tried hard and I'm not mad either!
>
> From all that my impression grew and grew that you want to now reserve the
> <example> solely for the new initialized object
> semantics or you will completely return back to <gtExample> if we do not
> follow you on this.
>
> You said the whole discussion made you unhappy. Do you think it made me
> happy? Definitely not. I hope the above
> details explains it well enough the story from my side! You can accuse me
> for being too harsh with my mails - which was
> bad from my side but it was because I was hardly trying to defend your own
> suggestion from October!
>
> Also I do not know where you got the impression that GT is treated as an
> "Alien" or something not belonging to Pharo.
> Do you really believe I would invest many hours to try out, give feedback
> to shape a HelpTopic Spotter addition,
> use GT for improving Pillar [6] or even build a MongoBrowser [7] and
> describe this in a lengthy article [8] when I would see
> GT as something in the outer space of the Pharo universe?
>
> Since I started this thread and the discussion I like you to know: I
> APOLOGIZE when this
> was discussed to harsh, has stolen too much time or when you feel offended
> from things said during the
> discussion. Our community members only rarely meet in person to discuss
> things and email often
> is a useful but sometimes also horrible medium.
>
> I first was unsure if I should response to this thread again: raising the
> risk of adding more oil to the water
> of upsetting each other even more. But the Pharo Zen says: "Communication
> is key", "Learning from mistakes"
> and "One step at a time".
>
> This situation is still not ideal or solved for the release. I would like
> to see still two steps forward
> instead of rolling back. Several proposals were made:
>
> 1. use <example> as agreed in October for exampleXXX
> methods/example methods with different selectors
> and use <exemplar> for the instance returning methods
> that I proposed (including a changeset)
> Stef said it would be OK for him
>
> 2. use <exampleOfInstance> and <exampleOfInstance:> as Kilon
> suggested
>
> 3. use <exampleCode> for code examples and <exampleInstance> for
> the GT extension as Andreas/Christophe suggested
>
> 4. use <sample>
>
> For sure we can have others. If they are inacceptable for you then shortly
> elaborate on why or what could be seen as
> acceptable solution from your side. Pharo belongs to all of us.
>
> Thanks in advance if you do so!
>
> Bye
> T.
>
>
> [1]
> http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2014-October/101…
> [2]
> http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/2014-October/0…
> [3] https://pharo.fogbugz.com/f/cases/15225
> [4]
> http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2015-March/10758…
> [5]
> http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2015-March/10758…
> [6]
> http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/2015-March/017…
> [7]
> http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/2015-March/017…
> [8]
> https://medium.com/concerning-pharo/building-a-mongo-browser-in-pharo-fe210…
>
>
>
>
>
>
> Gesendet: Donnerstag, 26. März 2015 um 14:30 Uhr
> Von: "Tudor Girba" <tudor(a)tudorgirba.com>
> An: "Esteban Lorenzano" <estebanlm(a)gmail.com>
> Cc: "Stéphane Ducasse" <stephane.ducasse(a)inria.fr>, "Pharo Development
> List" <pharo-dev(a)lists.pharo.org>
> Betreff: Re: [Pharo-dev] Existing <script> <example> pragmas and new GT
> needs
>
> Hi,
>
> I/we do not want to impose anything on anyone.
>
> <gtExample> was introduced a long time (more than 1 year) ago in GT/Moose.
> It is used both for documentation purposes and for generic stress tests for
> the Inspector and Spotter (and let's not even count that the concept offers
> an alternative to SUnit testing that we will pursue in the near future). It
> got integrated in Pharo and then renamed to <example> 6 months ago (in
> October) after a public discussion on this mailing list. It later got mixed
> with the example* selectors as part of #isExampleMethod and used in
> Nautilus with a looser interpretation to essentially trigger the example.
>
> This debate started 7 days before the release. The reason why the debate
> started is that exactly one method started to use it differently than all
> other <example> methods from the Pharo image. While this debate fired on,
> GT does not build and cannot be integrated, even though in parallel we work
> like mad to meet the deadline and fix all issues that are being reported.
>
> And the way the debate took place is also borderline for my taste, too. I
> do not appreciate being shout at. I am not mad, but please do not expect me
> to be happy either.
>
> I also find it discouraging that people talk about GT as if it would not
> be Pharo or as if we would want to force people to do things. We are indeed
> a standalone team with an own set of ideas, but we do not want to force our
> work on anyone. As the decision was to make GT a central part of Pharo, we
> kindly ask you to treat us as part of Pharo.
>
> We never shied away from debates and listening to people. In fact, we
> think we are going over the board with actively listening and reacting. We
> can still debate the <example>, but not now. We have a release to meet. We
> can talk about it afterwards. But, for this to happen, I also kindly ask
> you to remove the <example> check from #isExampleMethod. This would allow
> us to start from a clean slate in Pharo 5.
>
> Cheers,
> Doru
>
>
>
> On Thu, Mar 26, 2015 at 12:06 PM, Esteban Lorenzano <estebanlm(a)gmail.com>
> wrote:Ok⦠my 2c:
>
> Basically there is a difference between an âexampleâ and a prototype,
> which is what the gtExample intends to do. Exemplar is just another way to
> name a prototype.
> Sorry to make you sad and tired⦠but when you introduce such an important
> new tool as all the gtools are, you cannot expect people to accept all your
> choices âas isâ⦠and debate is the only way to achieve some consensus.
>
> Esteban
>
> ps: we are just days from release and we are all stressed a lot⦠so lets
> take a breath and consider things with the appropriate distance. We are not
> talking about the cure for cancer here, just the right name for a pragma,
> in a method.
>
> > On 26 Mar 2015, at 10:02, Torsten Bergmann <astares(a)gmx.de[
> astares(a)gmx.de]> wrote:
> >
> > Hi Tudor,
> >
> >> We will rename <example> back to <gtExample> and keep the API as it is.
> That will leave Pharo 4 with one <example> method while the other 100 will
> >use <gtExample>. This will be available with the next GT integration.
> >
> > As I already wrote (and Guillermo equally pointed out): most of them are
> there because you created/introduced many extension
> > methods with GT to provide these sample instances like in $a for
> Charater or 42 for Integer, ...
> > Which is completely valid to demonstrate how usefull your new extension
> is. But it is because you investigated so far more to
> > demonstrate this new mechanism.
> >
> >
> > And yes, currently we have just one <example> in the image (beside some
> other in external projects). But if we do not
> > want to rely on the exampleXXX pattern anymore we will mark the typical
> example methods with <example> in the future and would
> > have around 140 in the latest image:
> >
> > |coll|
> > coll := IdentitySet new.
> > Object withAllSubclassesDo: [:aClass |
> > aClass class selectorsDo: [:selector |
> > (selector beginsWith: 'example') ifTrue: [ coll add: selector
> ]
> > ]].
> > ^coll
> >
> > If we dont mark them I agree that there are only a few counterwise.
> >
> > But again: from my side it is not about the current numbers. It is about
> the future mechanism, clear and
> > understandable concepts and naming.
> >
> > The usualy exampleXXX demos for code fits well with <example> from the
> name and mentally. "Example"
> > is a very generous term for something to look at and learn.
> >
> > In Pharo one can now demonstrate in the new GT inspector lively ready
> made instances!
> > You feature and the research bound to it is not only important but a
> real improvement.
> > I like that and I'm sure this will push us forward a lot.
> >
> > Still IMHO mentally using <example> for depicting "code to look at" does
> fit namewise and
> > conceptualy very well with the known and usual example methods in the
> image or external
> > packages. Some of them provide an instance, but many of them just show
> how to use code.
> >
> > And yes: I would the new GT mechanism to use a term and pragma name that
> better depicts
> > what should be provided from the one who uses it: typical example
> instances or exemplars
> > of the class.
> >
> > When one creates a class
> >
> > Object subclass: #RevolutionarySystem
> > instanceVariableNames: 'name'
> > classVariableNames: ''
> > category: 'The-World'
> >
> > he can implement a class side method to use the new mechanism:
> >
> > uniqueExemplar
> > <exemplar>
> >
> > ^RevolutionarySystem called: 'Pharo'
> >
> > And this class side method returns an exemplary instance. If such a
> method should
> > also serves as an example method (in the tradition of a code example to
> look at)
> > one can even mark it with both pragmas.
> >
> >> The decision has nothing to do with arguments.
> >
> > Why do you negotiate instead of (at a minimum) ellaborate what you think
> of the made
> > proposal to use "exemplar" for the new GT mechanism.
> >
> > See the definition for <exemplar>:
> >
> >
> http://dictionary.reference.com/browse/exemplar[http://dictionary.reference…
> > "a model or pattern to be copied or imitated"
> > "a typical example or instance"
> >
> >
> http://www.thefreedictionary.com/exemplar[http://www.thefreedictionary.com/…
> > "One that is worthy of imitation; a perfect example or model"
> > "One that is typical or representative"
> >
> >
> http://www.merriam-webster.com/dictionary/exemplar[http://www.merriam-webst…
> > "an admired person or thing that is considered an example that
> deserves to be copied"
> > "a typical example"
> >
> >
> http://www.ldoceonline.com/dictionary/exemplar[http://www.ldoceonline.com/d…
> > "formal a good or typical example"
> >
> > http://www.dict.cc/?s=exemplar[http://www.dict.cc/?s=exemplar]
> > "instance"
> > "specimen"
> > "sample"
> >
> > All the 100 instances now returns by GT extension are such exemplars:
> they are
> > typical instances like $a or 42 one can use as a model or pattern to be
> copied
> > or imitated.
> >
> > Would'nt that perfectly fit with what you intended with your new
> feature: the preview
> > should help people to just inspect a class, look at the new "e.g." tab
> and learn from
> > premade instances?
> >
> >> The release is too important and we got distracted from the goal.
> >
> > No doubt that the release is important and fixing it NOW from the
> technical side is easy
> > as I demonstrated with the changeset. I guess rolling back <gtExample>
> would take you
> > more time than reviewing it.
> >
> > Before doing any action on your side I would really like to know your
> opinion about
> > <exemplar>. I'm fine when you can not accept it - but please tell me
> about the reasons.
> >
> > Bye
> > T.
> >
> >
> >
>
> --
>
> www.tudorgirba.com[http://www.tudorgirba.com]
>
> "Every thing has its own flow"
>
>
--
www.tudorgirba.com
"Every thing has its own flow"
April 8, 2015