[PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread Austin Clements
Quoth craven at gmx.net on Jul 12 at 9:43 am: > This patch adds a new type sprinter_t, which is used for structured > formatting, e.g. JSON or S-Expressions. The structure printer is the > code from Austin Clements (id:87d34hsdx8.fsf at awakening.csail.mit.edu). > > The structure printer contains

[PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread Austin Clements
Quoth craven at gmx.net on Jul 12 at 9:43 am: > This patch adds a new type sprinter_t, which is used for structured > formatting, e.g. JSON or S-Expressions. The structure printer is the > code from Austin Clements (id:87d34hsdx8.fsf at awakening.csail.mit.edu). > > The structure printer contains

Re: [PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread Austin Clements
Quoth cra...@gmx.net on Jul 12 at 9:43 am: > This patch adds a new type sprinter_t, which is used for structured > formatting, e.g. JSON or S-Expressions. The structure printer is the > code from Austin Clements (id:87d34hsdx8@awakening.csail.mit.edu). > > The structure printer contains the f

[PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread Tomi Ollila
On Thu, Jul 12 2012, Mark Walters wrote: > On Thu, 12 Jul 2012, craven at gmx.net wrote: >>> what is the advantage of having this as one function rather than end_map >>> and end_list? Indeed, my choice (but I think most other people would >>> disagree) would be to have both functions but still ke

Re: [PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread Austin Clements
Quoth cra...@gmx.net on Jul 12 at 9:43 am: > This patch adds a new type sprinter_t, which is used for structured > formatting, e.g. JSON or S-Expressions. The structure printer is the > code from Austin Clements (id:87d34hsdx8@awakening.csail.mit.edu). > > The structure printer contains the f

[PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread cra...@gmx.net
> what is the advantage of having this as one function rather than end_map > and end_list? Indeed, my choice (but I think most other people would > disagree) would be to have both functions but still keep state as this > currently does and then throw an error if the code closes the wrong > thing.

[PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread Tomi Ollila
On Thu, Jul 12 2012, craven at gmx.net wrote: > This patch adds a new type sprinter_t, which is used for structured > formatting, e.g. JSON or S-Expressions. The structure printer is the > code from Austin Clements (id:87d34hsdx8.fsf at awakening.csail.mit.edu). ... > + > +/* Create a new struct

[PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread Mark Walters
On Thu, 12 Jul 2012, craven at gmx.net wrote: >> what is the advantage of having this as one function rather than end_map >> and end_list? Indeed, my choice (but I think most other people would >> disagree) would be to have both functions but still keep state as this >> currently does and then thro

[PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread Mark Walters
A couple more things: On Thu, 12 Jul 2012, craven at gmx.net wrote: > This patch adds a new type sprinter_t, which is used for structured > formatting, e.g. JSON or S-Expressions. The structure printer is the > code from Austin Clements (id:87d34hsdx8.fsf at awakening.csail.mit.edu). > > The stru

[PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread Mark Walters
Hi this definitely looks nice. I have a couple of suggestions for the comments: On Thu, 12 Jul 2012, craven at gmx.net wrote: > This patch adds a new type sprinter_t, which is used for structured > formatting, e.g. JSON or S-Expressions. The structure printer is the > code from Austin Clements (

[PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread cra...@gmx.net
This patch adds a new type sprinter_t, which is used for structured formatting, e.g. JSON or S-Expressions. The structure printer is the code from Austin Clements (id:87d34hsdx8.fsf at awakening.csail.mit.edu). The structure printer contains the following function pointers: /* start a new map/dic

Re: [PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread Tomi Ollila
On Thu, Jul 12 2012, Mark Walters wrote: > On Thu, 12 Jul 2012, cra...@gmx.net wrote: >>> what is the advantage of having this as one function rather than end_map >>> and end_list? Indeed, my choice (but I think most other people would >>> disagree) would be to have both functions but still keep

Re: [PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread Mark Walters
On Thu, 12 Jul 2012, cra...@gmx.net wrote: >> what is the advantage of having this as one function rather than end_map >> and end_list? Indeed, my choice (but I think most other people would >> disagree) would be to have both functions but still keep state as this >> currently does and then throw a

Re: [PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread craven
> what is the advantage of having this as one function rather than end_map > and end_list? Indeed, my choice (but I think most other people would > disagree) would be to have both functions but still keep state as this > currently does and then throw an error if the code closes the wrong > thing.

Re: [PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread Tomi Ollila
On Thu, Jul 12 2012, cra...@gmx.net wrote: > This patch adds a new type sprinter_t, which is used for structured > formatting, e.g. JSON or S-Expressions. The structure printer is the > code from Austin Clements (id:87d34hsdx8@awakening.csail.mit.edu). ... > + > +/* Create a new structure pr

Re: [PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread Mark Walters
A couple more things: On Thu, 12 Jul 2012, cra...@gmx.net wrote: > This patch adds a new type sprinter_t, which is used for structured > formatting, e.g. JSON or S-Expressions. The structure printer is the > code from Austin Clements (id:87d34hsdx8@awakening.csail.mit.edu). > > The structure

Re: [PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread Mark Walters
Hi this definitely looks nice. I have a couple of suggestions for the comments: On Thu, 12 Jul 2012, cra...@gmx.net wrote: > This patch adds a new type sprinter_t, which is used for structured > formatting, e.g. JSON or S-Expressions. The structure printer is the > code from Austin Clements (id:

[PATCH v4 1/3] Add support for structured output formatters.

2012-07-12 Thread craven
This patch adds a new type sprinter_t, which is used for structured formatting, e.g. JSON or S-Expressions. The structure printer is the code from Austin Clements (id:87d34hsdx8@awakening.csail.mit.edu). The structure printer contains the following function pointers: /* start a new map/dictio