Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 3 participants
- 144616 messages
Re: [Pharo-dev] [Moose-dev] Re: Too frequent crashes :-(
by Peter Uhnak
On Mon, Dec 19, 2016 at 08:12:29AM +0800, Ben Coman wrote:
> Can yo point to where you added you workaround?
The fix is a single line, because I hate myself.
interpreterProxy failed ifTrue:[^nil].
https://github.com/pharo-project/pharo-vm/commit/9bf66cf656b176d988e1b0ba74…
To give you more info:
The problem is that memory of canvas forms are not properly pinned, so during garbage collection the form is being moved, but if at the same time the canvas form is being updated and moved, you are accessing wrong memory -> crash.
My fix will return prematurely if an error occurs and throws PrimitiveFailed in the image before any wrong memory is accessed. On Roassal side the PrimitiveFailed is catched and a paint cycle is skipped --- this is good enough, as it results only in ocassional flicker that immediately fixes itself instead of crashing the image.
It seems that on Mac there are also other places in the BitBlt code where the surface is being accessed without a check.
Also be careful not to be misled by the crash dump stack. It took me quite a while to figure out that GrafPort is already operating on wrong data, so it's not GrafPort's fault, but BitBlt's; of course both should possibly be investigated with respect to the mac crash.
Final note, personally I found it much easier the debug and manipulate the resulting C code (and recompiling just that), then to modify the Slang code and rebuild the source code and recompile it all (but again, I don't know what is the proper way to work with the VM code).
I used this script to trigger the crash https://gist.github.com/peteruhnak/024650ed2594301558df4da913549b54
As the crash depends on memory consumption and "proper" garbage collection cycle, it wasn't the easiest to reproduce, however the script above usually managed to crash it. Having a more reliable way would be nice, but simply triggering GC (nor full GC) wasn't enough because the memory wasn't in the "right" state.
Peter
Dec. 19, 2016
Re: [Pharo-dev] a request to change the meaning of <example> pragma
by Tudor Girba
Hi,
Thanks for reacting. Knowing that you were a strong debate counterpart, I would be very happy to work with you on this topic :).
As Nicolai noticed, GTExamples is significantly more than sample instances. For example, right now, it is the basis for building examples that are also tests. Furthermore, we played also with building documentation around it. Sample instances are just the prerequisite for making this happen, but the method is very much an example.
I do not want to hijack anything. The result of the debate a year ago was to not introduce the <example> pragma at all to have the chance of comparing solutions rather than just having something that is half backed and get stuck with it. Now we have 55 such <example> methods in the image.
GTExamples will not change because we do not learn from samples or exemplars, we learn from examples, and the goal of this project is to offer a solution for live documentation and testing. You might not believe in it, and that is fine. We wrote down the documentation so that people can look at it. People do not, and that is fine as well.
Examples is a very rich word, and it would be a pity to not spend it to its full potential. I am not saying that the current form of GTExamples is that full potential, but I do want us to dream for more than what is achievable easily. I already said that one issue we have with GTExamples is that the composition based on pragmas can become somewhat difficult (at least with the current tools) and we are looking for alternatives. Even so, this library is already in use and it will be used further.
Furthermore, not using the term âexamples" for this goal is a bit like saying that because some methods used to be called âtestsâ before SUnit appeared that SUnit should have employed a different term than tests to denote the methods. For example, they could have been called assertions.
Cheers,
Doru
> On Dec 19, 2016, at 1:03 PM, Torsten Bergmann <astares(a)gmx.de> wrote:
>
> Hi Tudor,
>
> we all already had exchanged on this topic in discussions on this list back a year ago or even before
> and as we have seen there were different arguments and different point of views.
>
> Actions to make Pharo more known are always appreciated and as you made more progress on the idea/tools
> side for sure you can demonstrate better what can be done with this approach.
>
> But does it mean all the other arguments are now invalid because of this? I don't think so.
>
> Anything described/demonstrated in this approach can perfectly be done without changing the meaning
> of the "example" pragma and by using an own pragma to mark methods following that idea.
>
> Trying to hijack "example" pragma again as it is your preferred pragma name does not help because this is
> like enforcing your own point of view on the topic to people like me following the existing
> "example" usage. Currently <example> and its usage is very generous and not so restrictive what kind of
> example the method contains or what return value it may provide.
>
> Also counting the current usage in the default image does not tell you anything as it leaves out all external
> projects.
>
>
> Similar to Ben I personally have not changed my point of view. I agree with him in using an own and more specific
> pragma like
>
> - <sample>
> - <sampleInstance>
> - <exemplar>
>
> better depicting the meaning of returning an sample/sample instance/exemplar of an instance of the class.
> I would be fine with using just "sample" as well as "Sample driven development".
>
>
> There is no need to change the meaning of the existing pragma <example> which is more
> general and can be any kind of example like:
> - example of usage
> - a simple example script
> - sample instance
> - example of an algorithm
> - example on how to use several classes together
> - ...
>
> For <example> it is not necessary to return exactly once instance of the class where the pragma
> is used in.
>
> Thx
> T.
>
--
www.tudorgirba.com
www.feenk.com
"Innovation comes in the least expected form.
That is, if it is expected, it already happened."
Dec. 19, 2016
Re: [Pharo-dev] a request to change the meaning of <example> pragma
by Stephane Ducasse
Hi all
In nautilus in Pharo 60 when you use
<sampleInstance> you can get an inspector on the object returned by the
method
Example
Die class >> d6
<sampleInstance>
^ self faces: 6
I started to use this pragma in all my libraries and I chose it to avoid
conflict with <example> and others.
I can change another time to make everybody happy. But I would like to
avoid to have to change everything again because this is the second time. :)
So let me know.
Now as I already said in the past, I will veto the integration of Examples
based on pragmas to compose them.
I do not want to need a special tools to get example working. But you know
all that.
Stef
On Sun, Dec 18, 2016 at 10:49 PM, Tudor Girba <tudor(a)tudorgirba.com> wrote:
> Hi,
>
> As you might know, a while ago we created GTExamples, a framework that
> supports both example-based live documentation and testing:
> http://gtoolkit.org/doc/Examples/examples.html
>
> GTExamples was part of the GTInspector for a while, but as it evolved, we
> pulled it out in a separate project. This separate project is not in Pharo
> anymore but it is part of the full GToolkit configuration (Pharo only ships
> the core of GToolkit). The idea of taking GTExamples out was to allow the
> community to have a more elaborate discussion about the role of examples in
> our environment.
>
> I have invited you to join that conversation, but it did not take off. I
> understand that perhaps the topic does not look appealing at this moment.
>
> We will certainly continue to evolve GTExamples both on the semantics
> level of the dependency constructs and on the integration with tools. Our
> goal is to enable a new practice that I would like to call Example-Guilded
> Development (or Example-Driven Development), and position Pharo to be the
> only platform on which someone can do that. But, that is our goal, and does
> not have to be the same with other peopleâs goal.
>
> Right now, GTExamples relies on the <gtExample> pragma to denote a method
> that returns an object that exemplifies something. Executing this method as
> an example should have no side-effects (either because the method itself
> does not have a side-effect, or because the example method defines how the
> cleanup should happen using the mechanism provided by GTExamples).
>
> This meaning is different from the meaning of the <example> pragma used
> through Pharo. There are currently 55 places that use this pragma inside
> Pharo and most of them come from FastTable. As things will progress and
> more libraries might use GTExamples, the situation can become confusing.
>
> To make things less confusing in the future, I would like to define the
> meaning of the <example> to denote a method that returns an object without
> having side effects. Would you agree with this?
>
> If yes, I would suggest the name of the new pragma that would replace the
> existing one to include âscriptâ in the name. For example, <sampleScript>.
>
> What do you think?
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Reasonable is what we are accustomed with."
>
>
>
Dec. 19, 2016
Re: [Pharo-dev] a request to change the meaning of <example> pragma
by Torsten Bergmann
Hi Tudor,
we all already had exchanged on this topic in discussions on this list back a year ago or even before
and as we have seen there were different arguments and different point of views.
Actions to make Pharo more known are always appreciated and as you made more progress on the idea/tools
side for sure you can demonstrate better what can be done with this approach.
But does it mean all the other arguments are now invalid because of this? I don't think so.
Anything described/demonstrated in this approach can perfectly be done without changing the meaning
of the "example" pragma and by using an own pragma to mark methods following that idea.
Trying to hijack "example" pragma again as it is your preferred pragma name does not help because this is
like enforcing your own point of view on the topic to people like me following the existing
"example" usage. Currently <example> and its usage is very generous and not so restrictive what kind of
example the method contains or what return value it may provide.
Also counting the current usage in the default image does not tell you anything as it leaves out all external
projects.
Similar to Ben I personally have not changed my point of view. I agree with him in using an own and more specific
pragma like
- <sample>
- <sampleInstance>
- <exemplar>
better depicting the meaning of returning an sample/sample instance/exemplar of an instance of the class.
I would be fine with using just "sample" as well as "Sample driven development".
There is no need to change the meaning of the existing pragma <example> which is more
general and can be any kind of example like:
- example of usage
- a simple example script
- sample instance
- example of an algorithm
- example on how to use several classes together
- ...
For <example> it is not necessary to return exactly once instance of the class where the pragma
is used in.
Thx
T.
Dec. 19, 2016
Dec. 19, 2016
[MoreVMs'17] Call for Contributions: 1st Workshop on Modern Language Runtimes, Ecosystems, and VMs at <Programming> 2017
by Stefan Marr
============================================================================
Call for Papers: MoreVMsâ17
1st Workshop on
Modern Language Runtimes, Ecosystems, and VMs
Co-located with <Programming> 2017
April, 2017, Brussels, Belgium
http://2017.programming-conference.org/track/MoreVMs-2017-papers
============================================================================
The MoreVMs'17 workshop aims bring together programmers from industry and
academy to discuss the design, implementation, and usage of modern languages
and runtimes. This includes aspects such as reuse of language runtimes, modular
implementation, or design and compilation strategies to target existing
runtimes.
The main goals of the workshop is to bring together both researchers and
practitioners and facilitate effective sharing of their respective experiences
and ideas on how languages and runtimes are utilized and where they need to
improve further. We welcome presentation proposals in the form of extended
abstracts discussing experiences, work-in-progress, as well as future visions
from the academic as well as industrial perspective. Relevant topics include,
but are definitely not limited to, the following:
- extensible VM design (compiler- or interpreter-based VMs)
- reusable runtime components (e.g. interpreters, garbage collectors,
intermediate representations)
- static and dynamic compiler techniques
- techniques for compilation to high-level languages such as JavaScript
- runtimes and mechanisms for interoperability between languages
- tooling support (e.g. debugging, profiling, etc.)
- programming language development environments and virtual machines
- case studies of existing language implementations, virtual machines, and
runtime components (e.g. design choices, tradeoffs, etc.)
- language implementation challenges and trade-offs (e.g. performance, completeness, etc.)
- surveys and applications usage reports to understand runtime usage in the wild
- surveys on frameworks and their impact on runtime usage
- new research ideas on how we want to build languages in the future
### Workshop Format and Submissions
This workshop welcomes the presentation and discussion of new ideas and
emerging problems to facilitate interaction among workshop participants and
exchange of ideas. We accept presentation proposals in the form of extended
abstracts (1-2 pages). Accepted abstracts will be published on the workshop's
website before the workshop date.
For preparing your abstract, please use the provided author kit:
https://github.com/smarr/morevms17-author-kit. It is based on the ACM SIGPLAN
Conference Format with 10 point font, and includes a Creative Commons License,
which will allow us to publish the abstract on the workshop web site.
Please submit abstracts through http://ssw.jku.at/morevms17/
### Important Dates
Abstract submission: 15 February 2017
Author notification: 01 March 2017
Workshop: 3 April 2017
All deadlines are Anywhere on Earth (AoE), i.e. GMT/UTCâ12:00 hour
### Program Committee
Matthias Grimmer, Oracle Labs
Christine H. Flood, Red Hat
Tony Hosking, Australian National University
Hannes Payer, Google
Tiark Rompf, Purdue University
Jeremy Singer, University of Glasgow
Mark Stoodley, IBM Canada
Sam Tobin-Hochstadt, Indiana University
### Workshop Organizers
Laurence Tratt, King's College London, United Kingdom
Adam Welc, Oracle Labs, United States
Stefan Marr, Johannes Kepler University Linz, Austria
Dec. 19, 2016
Re: [Pharo-dev] a request to change the meaning of <example> pragma
by phil@highoctane.be
Ok, thx. Will try.
I am tired of examples in comments, selecting stuff etc when it is possible
to have a click on an icon.
Thx for this thing.
Phil
On Mon, Dec 19, 2016 at 8:34 AM, Tudor Girba <tudor(a)tudorgirba.com> wrote:
> We did not try, but it should not be a problem, except for the fact that
> there will be a GTExample class in Pharo 5 packaged with GTInspector.
>
> Cheers,
> Doru
>
>
> > On Dec 19, 2016, at 12:51 AM, phil(a)highoctane.be wrote:
> >
> > Is it possible to have examples in a 5.0?
> >
> > Phil
> >
> > On Sun, Dec 18, 2016 at 10:49 PM, Tudor Girba <tudor(a)tudorgirba.com>
> wrote:
> > Hi,
> >
> > As you might know, a while ago we created GTExamples, a framework that
> supports both example-based live documentation and testing:
> > http://gtoolkit.org/doc/Examples/examples.html
> >
> > GTExamples was part of the GTInspector for a while, but as it evolved,
> we pulled it out in a separate project. This separate project is not in
> Pharo anymore but it is part of the full GToolkit configuration (Pharo only
> ships the core of GToolkit). The idea of taking GTExamples out was to allow
> the community to have a more elaborate discussion about the role of
> examples in our environment.
> >
> > I have invited you to join that conversation, but it did not take off. I
> understand that perhaps the topic does not look appealing at this moment.
> >
> > We will certainly continue to evolve GTExamples both on the semantics
> level of the dependency constructs and on the integration with tools. Our
> goal is to enable a new practice that I would like to call Example-Guilded
> Development (or Example-Driven Development), and position Pharo to be the
> only platform on which someone can do that. But, that is our goal, and does
> not have to be the same with other peopleâs goal.
> >
> > Right now, GTExamples relies on the <gtExample> pragma to denote a
> method that returns an object that exemplifies something. Executing this
> method as an example should have no side-effects (either because the method
> itself does not have a side-effect, or because the example method defines
> how the cleanup should happen using the mechanism provided by GTExamples).
> >
> > This meaning is different from the meaning of the <example> pragma used
> through Pharo. There are currently 55 places that use this pragma inside
> Pharo and most of them come from FastTable. As things will progress and
> more libraries might use GTExamples, the situation can become confusing.
> >
> > To make things less confusing in the future, I would like to define the
> meaning of the <example> to denote a method that returns an object without
> having side effects. Would you agree with this?
> >
> > If yes, I would suggest the name of the new pragma that would replace
> the existing one to include âscriptâ in the name. For example,
> <sampleScript>.
> >
> > What do you think?
> >
> > Cheers,
> > Doru
> >
> >
> > --
> > www.tudorgirba.com
> > www.feenk.com
> >
> > "Reasonable is what we are accustomed with."
> >
> >
> >
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "There are no old things, there are only old ways of looking at them."
>
>
>
>
>
>
Dec. 19, 2016
About Fraction and parentheses
by Serge Stinckwich
I have one question about Fraction.
When I print a fraction like 1/2 in the Playground I obtain (1/2) and
when I inspect I obtain ((1/2)). Why do we need all these parentheses
?
I didn't try with a current Pharo 6.0 image, because my bandwidth is
quite limited right now (Vietnam).
--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/
Dec. 19, 2016
Re: [Pharo-dev] a request to change the meaning of <example> pragma
by Tudor Girba
Hi,
> On Dec 19, 2016, at 8:53 AM, Nicolai Hess <nicolaihess(a)gmail.com> wrote:
>
>
>
> 2016-12-19 8:46 GMT+01:00 Tudor Girba <tudor(a)tudorgirba.com>:
> Hi,
>
> I would prefer if this thread does not transform in a terminology debate too much.
>
>
> @Doru, but you asked "What do you think" and I think Bens response about sampleScript is valid
I did not say that he was wrong. I just expressed the wish to not transform the thread in a long debate :). I would still very much welcome the debate in a separate thread in which we can start from the existing GTExamples model and tare it apart to find something better.
Cheers,
Doru
> @Ben Did you check Dorus blog entry (http://gtoolkit.org/doc/Examples/examples.html) I think this makes
> it more clear why gttExamples are more than just methods producsing "samples"
>
>
> Example is a term that fits both the code and the returning object. <gtExample> is applied on a method and it primarily describes that method. The term âexampleâ also describes the meta object that is wraps the concrete return value with the information from the method (for example, the label of the example, the link to the subject, or the dependencies to other examples). The example term is also important from the metaphor point of view: "we learn from examplesâ.
>
> Cheers,
> Doru
>
>
>
> > On Dec 19, 2016, at 3:34 AM, Ben Coman <btc(a)openinworld.com> wrote:
> >
> > On Mon, Dec 19, 2016 at 5:49 AM, Tudor Girba <tudor(a)tudorgirba.com> wrote:
> >> Hi,
> >>
> >> As you might know, a while ago we created GTExamples, a framework that supports both example-based live documentation and testing:
> >> http://gtoolkit.org/doc/Examples/examples.html
> >>
> >> GTExamples was part of the GTInspector for a while, but as it evolved, we pulled it out in a separate project. This separate project is not in Pharo anymore but it is part of the full GToolkit configuration (Pharo only ships the core of GToolkit). The idea of taking GTExamples out was to allow the community to have a more elaborate discussion about the role of examples in our environment.
> >>
> >> I have invited you to join that conversation, but it did not take off. I understand that perhaps the topic does not look appealing at this moment.
> >>
> >> We will certainly continue to evolve GTExamples both on the semantics level of the dependency constructs and on the integration with tools. Our goal is to enable a new practice that I would like to call Example-Guilded Development (or Example-Driven Development), and position Pharo to be the only platform on which someone can do that. But, that is our goal, and does not have to be the same with other peopleâs goal.
> >>
> >> Right now, GTExamples relies on the <gtExample> pragma to denote a method that returns an object that exemplifies something.
> >
> >
> > I've previously not done a good job of promoting the use of <sample>
> > for this. I'll try spinning this wheel once more.
> >
> > There are two concepts to consider:
> > * The returned object.
> > * The method code that creates the returned object.
> >
> > The "returned object" is best considered a <sample>.
> > The "method code" is best considered an <example> that produces the sample.
> > http://www.differencebetween.com/difference-between-example-and-vs-sample/
> >
> > The term "exemplifies/exemplification" associates equally with both...
> > * http://www.thesaurus.com/browse/example
> > * http://www.thesaurus.com/browse/sample
> > but for example... from a draw full of cutlery you don't "take an
> > example spoon", you "take a sample spoon".
> >
> >
> > So it depends on where you want the focus to be.
> > * If the focus is on working with a sample object, then <sample> makes
> > a better pragma for the method creating it.
> > * If the focus is on the code producing the sample, then <example> is
> > a better choice.
> >
> > Maybe you are constrained by existing industry terminology,
> > but "Example-Driven Development" might be equally called
> > "Sample-Driven Development".
> > Without having read into the topic, intuitively the former broadly
> > encompasses copying static code
> > while the latter feels more limited to working with an object.
> >
> >
> > My proposal...
> > * <sample> provides a narrower sense of side-effect-free provision of
> > object to work with. "Samples are often tangible parts and can be
> > observed"
> > * <example> provides a broader sense of showing how things work
> > together, in ways that may or may-not include side effects that you
> > don't actually want to execute - just to refer to. "Examples are used
> > [to] illustrate something. [Its] expected that the example will be
> > imitated and replicated among its audience."
> > * <script> provides a sense of system management, of methods causing
> > significant side effects. You won't want to copy these methods, just
> > make use them.
> >
> > <sampleScript> feels awkward to apply to examples, since by my these
> > are neither samples nor scripts.
> >
> >
> > cheers -ben
> >
> >
> >> Executing this method as an example should have no side-effects (either because the method itself does not have a side-effect, or because the example method defines how the cleanup should happen using the mechanism provided by GTExamples).
> >>
> >> This meaning is different from the meaning of the <example> pragma used through Pharo. There are currently 55 places that use this pragma inside Pharo and most of them come from FastTable. As things will progress and more libraries might use GTExamples, the situation can become confusing.
> >>
> >> To make things less confusing in the future, I would like to define the meaning of the <example> to denote a method that returns an object without having side effects. Would you agree with this?
> >>
> >> If yes, I would suggest the name of the new pragma that would replace the existing one to include âscriptâ in the name. For example, <sampleScript>.
> >>
> >> What do you think?
> >>
> >> Cheers,
> >> Doru
> >>
> >>
> >> --
> >> www.tudorgirba.com
> >> www.feenk.com
> >>
> >> "Reasonable is what we are accustomed with."
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> âSoftware has no shape. Actually, it has no one shape. It has many."
>
>
>
--
www.tudorgirba.com
www.feenk.com
"Next time you see your life passing by, say 'hi' and get to know her."
Dec. 19, 2016
Re: [Pharo-dev] a request to change the meaning of <example> pragma
by Nicolai Hess
2016-12-19 8:46 GMT+01:00 Tudor Girba <tudor(a)tudorgirba.com>:
> Hi,
>
> I would prefer if this thread does not transform in a terminology debate
> too much.
>
>
@Doru, but you asked "What do you think" and I think Bens response about
sampleScript is valid
@Ben Did you check Dorus blog entry (
http://gtoolkit.org/doc/Examples/examples.html) I think this makes
it more clear why gttExamples are more than just methods producsing
"samples"
> Example is a term that fits both the code and the returning object.
> <gtExample> is applied on a method and it primarily describes that method.
> The term âexampleâ also describes the meta object that is wraps the
> concrete return value with the information from the method (for example,
> the label of the example, the link to the subject, or the dependencies to
> other examples). The example term is also important from the metaphor point
> of view: "we learn from examplesâ.
>
> Cheers,
> Doru
>
>
>
> > On Dec 19, 2016, at 3:34 AM, Ben Coman <btc(a)openinworld.com> wrote:
> >
> > On Mon, Dec 19, 2016 at 5:49 AM, Tudor Girba <tudor(a)tudorgirba.com>
> wrote:
> >> Hi,
> >>
> >> As you might know, a while ago we created GTExamples, a framework that
> supports both example-based live documentation and testing:
> >> http://gtoolkit.org/doc/Examples/examples.html
> >>
> >> GTExamples was part of the GTInspector for a while, but as it evolved,
> we pulled it out in a separate project. This separate project is not in
> Pharo anymore but it is part of the full GToolkit configuration (Pharo only
> ships the core of GToolkit). The idea of taking GTExamples out was to allow
> the community to have a more elaborate discussion about the role of
> examples in our environment.
> >>
> >> I have invited you to join that conversation, but it did not take off.
> I understand that perhaps the topic does not look appealing at this moment.
> >>
> >> We will certainly continue to evolve GTExamples both on the semantics
> level of the dependency constructs and on the integration with tools. Our
> goal is to enable a new practice that I would like to call Example-Guilded
> Development (or Example-Driven Development), and position Pharo to be the
> only platform on which someone can do that. But, that is our goal, and does
> not have to be the same with other peopleâs goal.
> >>
> >> Right now, GTExamples relies on the <gtExample> pragma to denote a
> method that returns an object that exemplifies something.
> >
> >
> > I've previously not done a good job of promoting the use of <sample>
> > for this. I'll try spinning this wheel once more.
> >
> > There are two concepts to consider:
> > * The returned object.
> > * The method code that creates the returned object.
> >
> > The "returned object" is best considered a <sample>.
> > The "method code" is best considered an <example> that produces the
> sample.
> > http://www.differencebetween.com/difference-between-
> example-and-vs-sample/
> >
> > The term "exemplifies/exemplification" associates equally with both...
> > * http://www.thesaurus.com/browse/example
> > * http://www.thesaurus.com/browse/sample
> > but for example... from a draw full of cutlery you don't "take an
> > example spoon", you "take a sample spoon".
> >
> >
> > So it depends on where you want the focus to be.
> > * If the focus is on working with a sample object, then <sample> makes
> > a better pragma for the method creating it.
> > * If the focus is on the code producing the sample, then <example> is
> > a better choice.
> >
> > Maybe you are constrained by existing industry terminology,
> > but "Example-Driven Development" might be equally called
> > "Sample-Driven Development".
> > Without having read into the topic, intuitively the former broadly
> > encompasses copying static code
> > while the latter feels more limited to working with an object.
> >
> >
> > My proposal...
> > * <sample> provides a narrower sense of side-effect-free provision of
> > object to work with. "Samples are often tangible parts and can be
> > observed"
> > * <example> provides a broader sense of showing how things work
> > together, in ways that may or may-not include side effects that you
> > don't actually want to execute - just to refer to. "Examples are used
> > [to] illustrate something. [Its] expected that the example will be
> > imitated and replicated among its audience."
> > * <script> provides a sense of system management, of methods causing
> > significant side effects. You won't want to copy these methods, just
> > make use them.
> >
> > <sampleScript> feels awkward to apply to examples, since by my these
> > are neither samples nor scripts.
> >
> >
> > cheers -ben
> >
> >
> >> Executing this method as an example should have no side-effects (either
> because the method itself does not have a side-effect, or because the
> example method defines how the cleanup should happen using the mechanism
> provided by GTExamples).
> >>
> >> This meaning is different from the meaning of the <example> pragma used
> through Pharo. There are currently 55 places that use this pragma inside
> Pharo and most of them come from FastTable. As things will progress and
> more libraries might use GTExamples, the situation can become confusing.
> >>
> >> To make things less confusing in the future, I would like to define the
> meaning of the <example> to denote a method that returns an object without
> having side effects. Would you agree with this?
> >>
> >> If yes, I would suggest the name of the new pragma that would replace
> the existing one to include âscriptâ in the name. For example,
> <sampleScript>.
> >>
> >> What do you think?
> >>
> >> Cheers,
> >> Doru
> >>
> >>
> >> --
> >> www.tudorgirba.com
> >> www.feenk.com
> >>
> >> "Reasonable is what we are accustomed with."
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> âSoftware has no shape. Actually, it has no one shape. It has many."
>
>
>
Dec. 19, 2016