Re: [Pharo-users] The Grapher charting engine

2015-03-21 Thread Tudor Girba
Hi,

I fully agree with your API suggestions, but I do not quite understand why
you say that it is because of the scripting that the API does not look like
this. It's the opposite I think.

When you script you want as succinct as possible (so, no moveBehind: and
stuff). And you want to gradually add details and not be forced to specify
them from the very beginning (so, good defaults). In fact, the rule of
thumb that I argue for is that a good scripting (and in fact any API)
interface is one that allows you to make a difference with any new line of
code. That means that, ideally, we would want every line to be able to live
on its own and not require another one. It's obviously not always possible,
but I find it helps me when I grow an API.

Cheers,
Doru



On Sat, Mar 21, 2015 at 12:23 PM, stepharo steph...@free.fr wrote:

 Alex

 Roassal is really cool now I have one question
 why we cannot say

 serie1pointsAndVariations :- given
 series2pointsAndVariations := given

 RGrapher new
 axisX; axisY;
 seriesWithDeviation: {serie1pointsAndVariations .
 serie2pointsAndVariations};
 maxXAxis: 100;

 My point is why the line connection is not hidden from the user.
 I think that roassal is a cool scripting engine but it got ***trapped***
 there.

 A primary user wants to have abstractions
 Then in a second time he wants to open the trunk and script its own.


 also why don't you have nice default

 dec := RTDevVarDecorator new.
 dec moveBehind;
 desviation: 0.5;
 color: (c alpha: 0.3);
 points: pts.

 =

 dec := RTDevVarDecorator new.
 desviation: 0.5;
 color: c;
 points: pts.

 why the decorator should be added to the builder?

 So see what I mean why do you expose to the user all the design challenges?

 I strongly suggest that during 1 month you stop to think in term of script.
 Imagine that you do not have a workspace anymore.

 Stef




 On 20 Mar 2015, at 22:18, Alexandre Bergel alexandre.ber...@me.com
 wrote:

 Dear all,

 As many of you know, Grapher is a über-cool charting engine, part of
 Roassal.
 For people who do not know what Grapher is, here is a (compelling we hope)
 example:
 Screen Shot 2015-03-20 at 6.12.22 PM.png
 Which is obtained by the following script:
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 | b colors points ds pts dec lb |
 b := RTGrapher new.
 colors := Array with: Color red with: Color blue.
 points := OrderedCollection new.

 colors do: [ :c |
 ds := RTStackedDataSet new.
 pts := ((1 to: 100) collect: [ :i | 50 atRandom - 25 ]) cumsum.
 points add: pts.
 ds points: pts.
 dec := RTDevVarDecorator new.
 dec moveBehind;
 desviation: 0.5;
 color: (c alpha: 0.3);
 points: pts.
 ds connectUsing: (RTLine new color: (c alpha: 0.5); width: 1 ).
 b add: ds.
 b addDecorator: dec.
  ].

 b axisX; axisY.
 b build.

 lb := RTLegendBuilder new.
 lb view: b view.
 colors doWithIndex: [ :c :i |
 lb addColor: c text: 'Series  ', i printString ].
 lb build.
 b view @ RTZoomableView.
 b view
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


 In our grand vision of making Roassal the best visualizing engine of the
 Universe (we also know to be modest time to time, but not today :-),
 Grapher will play a very important role. We would like to stabilize Grapher
 and make it sure it happily fits everybody needs. You can help on it:

 - When you are tempted to look at the dark side of the planet (this is
 where R, JFreeChart, gnuplot, D3 and all their friends live), let us know.
 We will make sure to make you are happy again.

 - Share your wishlist with us. We already have a long todo list, but
 your opinion does matter and will take it seriously

 - we are open to contributions, which could be financial, bug fixe,
 enhancement, or simply encouragement.

 I am very happy to be surrounded by very smart engineers. Your
 encouragement are making them happy :-)

 Cheers,
 Alexandre, in the name of the Object Profile Team

 NB: sorry for the cross-list posting, but this email is very important for
 us, and for you we hope.

 --
 _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
 Alexandre Bergel  http://www.bergel.eu
 ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



 ___
 vwnc mailing list
 v...@cs.uiuc.edu
 http://lists.cs.uiuc.edu/mailman/listinfo/vwnc





-- 
www.tudorgirba.com

Every thing has its own flow


Re: [Pharo-users] The Grapher charting engine

2015-03-21 Thread Tudor Girba
Hi Stef,



On Sat, Mar 21, 2015 at 8:52 PM, stepharo steph...@free.fr wrote:



 Le 21/3/15 13:58, Tudor Girba a écrit :

 Hi,

 I fully agree with your API suggestions, but I do not quite understand
 why you say that it is because of the scripting that the API does not look
 like this. It's the opposite I think.

 When you script you want as succinct as possible (so, no moveBehind:
 and stuff). And you want to gradually add details and not be forced to
 specify them from the very beginning (so, good defaults). In fact, the rule
 of thumb that I argue for is that a good scripting (and in fact any API)
 interface is one that allows you to make a difference with any new line of
 code. That means that, ideally, we would want every line to be able to live
 on its own and not require another one. It's obviously not always possible,
 but I find it helps me when I grow an API.


 use the technique you want but to not dillute my point. I do not care how
 you do it.
 I care about having details away.

To me the feel that roassal gives me is that this is a tool to make demo to
 impress audience
 as to grow something, while I think that it could be a killer app with two
 faces:
 predefined compact api and a scripting way where you open the trunk and
 build your own.


A long script will not impress any audience. These are the same goals, not
different. The idea of builders (Grapher is such a builder) is supposed to
provide those levels (the basic engine can do everything, and the builder
provides a more constrained higher level API). I fully agree that the
current builders are not expressive enough. And I also agree that we need a
dedicated effort to just making them more compact.

We are fully in sync and I do not dilute your point, but I do not want to
leave the impression that scripting is something bad, or secondary :).

Cheers,
Doru



 S.




-- 
www.tudorgirba.com

Every thing has its own flow


Re: [Pharo-users] The Grapher charting engine

2015-03-21 Thread stepharo



Le 21/3/15 13:58, Tudor Girba a écrit :

Hi,

I fully agree with your API suggestions, but I do not quite understand 
why you say that it is because of the scripting that the API does not 
look like this. It's the opposite I think.


When you script you want as succinct as possible (so, no moveBehind: 
and stuff). And you want to gradually add details and not be forced to 
specify them from the very beginning (so, good defaults). In fact, the 
rule of thumb that I argue for is that a good scripting (and in fact 
any API) interface is one that allows you to make a difference with 
any new line of code. That means that, ideally, we would want every 
line to be able to live on its own and not require another one. It's 
obviously not always possible, but I find it helps me when I grow an API.


use the technique you want but to not dillute my point. I do not care 
how you do it.

I care about having details away.

To me the feel that roassal gives me is that this is a tool to make demo 
to impress audience
as to grow something, while I think that it could be a killer app with 
two faces:
predefined compact api and a scripting way where you open the trunk and 
build your own.


S.