Re: [Pharo-users] STON question

2020-07-02 Thread Esteban Maringolo
On Thu, Jul 2, 2020 at 11:46 AM Sean P. DeNigris wrote: > > Sven Van Caekenberghe-2 wrote > > there is now basic support for SortCollections using SortFunctions. > > Cool! This would be great to have in Fuel as well. There is a slow and > steady stream of users running into trouble trying to

Re: [Pharo-users] STON question

2020-07-02 Thread Sean P. DeNigris
Sven Van Caekenberghe-2 wrote > there is now basic support for SortCollections using SortFunctions. Cool! This would be great to have in Fuel as well. There is a slow and steady stream of users running into trouble trying to serialize blocks (whatever the library) due primarily to sorted

Re: [Pharo-users] STON question

2020-07-01 Thread Esteban Maringolo
Thank you Sven! This is really convenient. SortFunctions are really cool. Esteban A. Maringolo On Tue, Jun 30, 2020 at 6:06 PM Sven Van Caekenberghe wrote: > > Hi Stef, > > With the following commit > https://github.com/svenvc/ston/commit/3565d388172b76c180454575d4c2f71019f130c4 > > there is

Re: [Pharo-users] STON question

2020-07-01 Thread Stéphane Ducasse
Ok I will allocate some time to produce a booklet on ston :). S. > On 30 Jun 2020, at 23:05, Sven Van Caekenberghe wrote: > > Hi Stef, > > With the following commit > https://github.com/svenvc/ston/commit/3565d388172b76c180454575d4c2f71019f130c4 > > there is now basic support for

Re: [Pharo-users] STON question

2020-06-30 Thread Sven Van Caekenberghe
Hi Stef, With the following commit https://github.com/svenvc/ston/commit/3565d388172b76c180454575d4c2f71019f130c4 there is now basic support for SortCollections using SortFunctions. All of the following can now be serialised and materialised by STON (see #testSortedCollections):

Re: [Pharo-users] STON question

2020-06-28 Thread Stéphane Ducasse
> On 28 Jun 2020, at 18:22, Russ Whaley wrote: > > Stephane, > Thanks for the info on chrysal. I'm going to like going through the code to > see how you solved some things. I created my own Configuration class that > operates with a dictionary of keys the applications expect to use, and >

Re: [Pharo-users] STON question

2020-06-28 Thread Russ Whaley
Stephane, Thanks for the info on chrysal. I'm going to like going through the code to see how you solved some things. I created my own Configuration class that operates with a dictionary of keys the applications expect to use, and configuration values (paths, numerics, dates, strings...) but not

Re: [Pharo-users] STON question

2020-06-28 Thread Stéphane Ducasse
> On 27 Jun 2020, at 16:58, Sven Van Caekenberghe wrote: > > Hi Russ, > > The limitation of STON not being capable of serialising a block closure still > stands and will probably not change very soon (it open up the whole language > to be written out). > > You can work around this though,

Re: [Pharo-users] STON question

2020-06-28 Thread Stéphane Ducasse
Hi russ, I do not if you know but based on Ston I built chrysal to manage applications configuration: https://github.com/ducasse/chrysal The basic idea is that you describe the possible fields of your configuration (i.e. how user can edit JSON

Re: [Pharo-users] STON question

2020-06-27 Thread Sven Van Caekenberghe
Hi Russ, The limitation of STON not being capable of serialising a block closure still stands and will probably not change very soon (it open up the whole language to be written out). You can work around this though, with sort functions for example. Here is an example: { 1->#one. 3->#three.

Re: [Pharo-users] STON question

2017-07-30 Thread Stephane Ducasse
> First question is, why do anything at all ? > > STON toStringPretty: > > Then loading is as simple as > > STON fromString: '...' I know :) Now I wanted to overuse STON to be able to edit manually the file too. > Next step is to customise how STON output is generated (but again, why ?). >

Re: [Pharo-users] STON question

2017-07-30 Thread Sven Van Caekenberghe
First question is, why do anything at all ? STON toStringPretty: Then loading is as simple as STON fromString: '...' Next step is to customise how STON output is generated (but again, why ?). You do that by writing both an #stonOn: and a #fromSton: method (look for implementors for

Re: [Pharo-users] STON question

2017-07-30 Thread Cyril Ferlicot D.
Le 30/07/2017 à 17:39, Stephane Ducasse a écrit : > Hi sven > > I'm coding with my son a game collector application :) > We want to save our collection with STON > > So far we have > > GameCollector asSTON >> > > String streamContents: [ :s | STON put: self onStreamPretty: s ] > > and we

Re: [Pharo-users] STON Question

2017-06-14 Thread Guillermo Polito
That's what we call a DTO On Wed, Jun 14, 2017 at 3:01 PM, Christophe Demarey < christophe.dema...@inria.fr> wrote: > +1 > It is exactly what i've done with Cargo. Define your own specific object > for serialization / deserialization. It is the simplest way to have a human > readable conf file

Re: [Pharo-users] STON Question

2017-06-14 Thread Guillermo Polito
that's what is called a DTO Le 14 juin 2017 15:27, "Sven Van Caekenberghe" a écrit : > > > On 14 Jun 2017, at 15:01, Christophe Demarey < > christophe.dema...@inria.fr> wrote: > > > > +1 > > It is exactly what i've done with Cargo. Define your own specific object > for

Re: [Pharo-users] STON Question

2017-06-14 Thread Sven Van Caekenberghe
> On 14 Jun 2017, at 15:01, Christophe Demarey > wrote: > > +1 > It is exactly what i've done with Cargo. Define your own specific object for > serialization / deserialization. It is the simplest way to have a human > readable conf file (e.g. urls, pathes default

Re: [Pharo-users] STON Question

2017-06-14 Thread Stephane Ducasse
Thanks Sven. I'm checking the STONWriter path with some tricks. On Wed, Jun 14, 2017 at 11:06 AM, Sven Van Caekenberghe wrote: > STON cannot be used to write partial, manual output because it needs to see > the full object graph (like FUEL does). > > If I would want to use STON

Re: [Pharo-users] STON Question

2017-06-14 Thread Sven Van Caekenberghe
STON cannot be used to write partial, manual output because it needs to see the full object graph (like FUEL does). If I would want to use STON for prettier looking config files, I would make an object just for that external representation, converting it where necessary to better internal

Re: [Pharo-users] STON Question

2017-06-05 Thread Offray Vladimir Luna Cárdenas
Ok Stef. Happy that we're exploring different paths ;-). Cheers, Offray On 05/06/17 13:56, Stephane Ducasse wrote: > Hi offray > > Thanks but pillar ha a conf since several years and it is working > well. Now I'm revisiting the implementation of cocoon > because I want to have it simpler

Re: [Pharo-users] STON Question

2017-06-05 Thread Stephane Ducasse
Hi offray Thanks but pillar ha a conf since several years and it is working well. Now I'm revisiting the implementation of cocoon because I want to have it simpler independent of magritte and better tested. Now I just want to add a new functionality to output a configuration file from the

Re: [Pharo-users] STON Question

2017-06-05 Thread Offray Vladimir Luna Cárdenas
Hi, Maybe what I'm doing in Grafoscopio could help. I have a %metadata node which contains all configuration options for the production of the document (as shown in the image below). Exporting a document consist in looking for these nodes while traversing the notebook tree and applying that

Re: [Pharo-users] STON Question

2017-06-05 Thread Stephane Ducasse
Sven I know what Ston is :) Now Pillar dev used Ston as input and it works. Then with some hooks they let the user convert the strings into specific objects and this is ok. Now I want to add export in Ston and for configurations I need to control for the application and not as a ston object the

Re: [Pharo-users] STON Question

2017-06-04 Thread Sven Van Caekenberghe
Stef, STON is like FUEL, it can write any object to a stream and read it back. Although you can customise how this is done, only one way of doing so is supported (i.e. you cannot change the format for each application). People have used STON for various applications now, including for