[ANN] org.conman.parsers.jsons 1.0.6 released

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ANN] org.conman.parsers.jsons 1.0.6 released

Sean Conner

  I've just released version 1.0.6 of org.conman.parsers.jsons [1], which
fixes a bug found by Dirk Laurie related to feeding data into the parser.
This now works:

        json = require "org.conman.parsers.jsons"
        file = io.open("large-json-file.json","r")
        data = json:match(function() return file:read(1024) end)

  or even:

        data = json:match(function() return file:read(1) end)

  As before, the code can act as a drop-in replacement for
org.conman.parsers.json.

        json = require "org.conman.parsers.jsons"
        data = json:match(string_containing_json_data)

  -spc

[1]     1.0.5 was released that *mostly* fixed this bug.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] org.conman.parsers.jsons 1.0.6 released

Sean Conner
It was thus said that the Great Sean Conner once stated:
>
>   I've just released version 1.0.6 of org.conman.parsers.jsons, which
> fixes a bug found by Dirk Laurie related to feeding data into the parser.
> This now works:
>
>         json = require "org.conman.parsers.jsons"
>         file = io.open("large-json-file.json","r")
>         data = json:match(function() return file:read(1024) end)

  No it doesn't.  

  Doing a streaming JSON parser with LPeg is proving to be rather difficult.  

  Sigh.

  -spc


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] org.conman.parsers.jsons 1.0.6 released

Jonathan Goble
On Thu, Jul 20, 2017 at 12:43 AM Sean Conner <[hidden email]> wrote:
It was thus said that the Great Sean Conner once stated:
>
>   I've just released version 1.0.6 of org.conman.parsers.jsons, which
> fixes a bug found by Dirk Laurie related to feeding data into the parser.
> This now works:
>
>         json = require "org.conman.parsers.jsons"
>         file = io.open("large-json-file.json","r")
>         data = json:match(function() return file:read(1024) end)

No it doesn't.

I notice that you have no tests in your repository. Instead of continually releasing new versions that allegedly fix the issue but actually don't, may I suggest stopping work on that, writing a test suite, and then work on the bug without releasing anything until the test suite passes?

Generally speaking, when I'm looking for a module to use, a lack of tests is one of the biggest turn-offs for me, because it suggests to me that the author doesn't care enough to make sure it actually does what it's supposed to do.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] org.conman.parsers.jsons 1.0.6 released

Sean Conner
It was thus said that the Great Jonathan Goble once stated:

> On Thu, Jul 20, 2017 at 12:43 AM Sean Conner <[hidden email]> wrote:
>
> > It was thus said that the Great Sean Conner once stated:
> > >
> > >   I've just released version 1.0.6 of org.conman.parsers.jsons, which
> > > fixes a bug found by Dirk Laurie related to feeding data into the parser.
> > > This now works:
> > >
> > >         json = require "org.conman.parsers.jsons"
> > >         file = io.open("large-json-file.json","r")
> > >         data = json:match(function() return file:read(1024) end)
> >
> > No it doesn't.
> >
>
> I notice that you have no tests in your repository. Instead of continually
> releasing new versions that allegedly fix the issue but actually don't, may
> I suggest stopping work on that, writing a test suite, and then work on the
> bug without releasing anything until the test suite passes?
>
> Generally speaking, when I'm looking for a module to use, a lack of tests
> is one of the biggest turn-offs for me, because it suggests to me that the
> author doesn't care enough to make sure it actually does what it's supposed
> to do.

  Fair enough.  

  -spc


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] org.conman.parsers.jsons 1.0.6 released

Jay Carlson
In reply to this post by Jonathan Goble
On Jul 20, 2017, at 12:56 AM, Jonathan Goble <[hidden email]> wrote:

> Generally speaking, when I'm looking for a module to use, a lack of tests is one of the biggest turn-offs for me, because it suggests to me that the author doesn't care enough to make sure it actually does what it's supposed to do.

The tests are in sync with the source, so there is at least a minimal amount of information there after you discover that the docs haven't been updated in three releases.

signature.asc (465 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ANN] org.conman.parsers.jsons 1.0.7 released (was Re: [ANN] org.conman.parsers.jsons 1.0.6 released)

Sean Conner
In reply to this post by Jonathan Goble
It was thus said that the Great Jonathan Goble once stated:

> On Thu, Jul 20, 2017 at 12:43 AM Sean Conner <[hidden email]> wrote:
>
> > It was thus said that the Great Sean Conner once stated:
> > >
> > >   I've just released version 1.0.6 of org.conman.parsers.jsons, which
> > > fixes a bug found by Dirk Laurie related to feeding data into the parser.
> > > This now works:
> > >
> > >         json = require "org.conman.parsers.jsons"
> > >         file = io.open("large-json-file.json","r")
> > >         data = json:match(function() return file:read(1024) end)
> >
> > No it doesn't.
> >
>
> I notice that you have no tests in your repository. Instead of continually
> releasing new versions that allegedly fix the issue but actually don't, may
> I suggest stopping work on that, writing a test suite, and then work on the
> bug without releasing anything until the test suite passes?

  Point taken.  I grabbed the test files from

        https://github.com/nst/JSONTestSuite

and ran my code [1] over all the test cases there.  Flushed out a bunch of
errors with the 300+ test cases (that were used to probe corner cases in the
JSON spec [2].  I have not checked in the test cases as they exist
elsewhere, but the following are the only deviations [3]:

    c n n t t t n_structure_100000_opening_arrays.json
    c n n t t t n_structure_open_array_object.json
    n n n t t t y_string_space.json
    n n n t t t y_string_unescaped_char_delete.json
    n n n t t t y_string_with_del_character.json
    n n n t t t y_structure_lonely_false.json
    n n n t t t y_structure_lonely_int.json
    n n n t t t y_structure_lonely_negative_real.json
    n n n t t t y_structure_lonely_null.json
    n n n t t t y_structure_lonely_string.json
    n n n t t t y_structure_lonely_true.json
    n n n t t t y_structure_string_empty.json
    | | | | | | |
    | | | | | | +- filename of testcase
    | | | | | +--- r3 == r1
    | | | | +----- r2 == r3
    | | | +------- r1 == r2
    | | +--------- org.conman.parsers.jsons (r3) (byte-by-byte)
    | +----------- org.conman.parsers.jsons (r2) (string)
    +------------- org.conman.parsers.json  (r1) (string)
   
            y = data parsed
            n = data didn't parse
            c = program crashed
            t = comparison suceeeded
            f = comparison failed

  You can see two cases where org.conman.parsers.json can't handle the test
case and crashed (stack exceeded), but the new code did.  And the other
cases are applicable to RFC-7159, which my code does *NOT* support---it
supports the language described on the main page of <http://json.org/>.

  So yes!  Version 1.0.7 of org.conman.parsers.jsons released!  Should be
the last release for a long time.

  -spc

[1] I tested my original JSON parser, my new JSONs (streaming) module as
        a drop-in replacement, and the JSONs module feeding it a byte at a
        time.

[2] http://seriot.ch/parsing_json.php

[3] Minus the "implementation defined" tests.  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] org.conman.parsers.jsons 1.0.7 released (was Re: [ANN] org.conman.parsers.jsons 1.0.6 released)

Jay Carlson
On Jul 20, 2017 22:17, "Sean Conner" <[hidden email]> wrote:

  So yes!  Version 1.0.7 of org.conman.parsers.jsons released!  Should be
the last release for a long time.

If we can find it. ;-)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] org.conman.parsers.jsons 1.0.7 released (was Re: [ANN] org.conman.parsers.jsons 1.0.6 released)

Sean Conner
It was thus said that the Great Jay Carlson once stated:
> On Jul 20, 2017 22:17, "Sean Conner" <[hidden email]> wrote:
>
>
>   So yes!  Version 1.0.7 of org.conman.parsers.jsons released!  Should be
> the last release for a long time.
>
>
> If we can find it. ;-)

GenericCommandLinePrompt> luarocks install org.conman.parsers.jsons

  -spc


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] org.conman.parsers.jsons 1.0.7 released (was Re: [ANN] org.conman.parsers.jsons 1.0.6 released)

Jay Carlson

> On Jul 21, 2017, at 12:48 AM, Sean Conner <[hidden email]> wrote:
>
> It was thus said that the Great Jay Carlson once stated:
>> On Jul 20, 2017 22:17, "Sean Conner" <[hidden email]> wrote:
>>
>>
>>  So yes!  Version 1.0.7 of org.conman.parsers.jsons released!  Should be
>> the last release for a long time.
>>
>>
>> If we can find it. ;-)
>
> GenericCommandLinePrompt> luarocks install org.conman.parsers.jsons

That URN scheme is not standards-track yet, and the current version of my browser doesn't support it.[1]

How do I Tweet out a link to my dozens of Twitter followers?

Jay

[1]: I have company: googlebot (iä iä) doesn't support that URN scheme either.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] org.conman.parsers.jsons 1.0.7 released (was Re: [ANN] org.conman.parsers.jsons 1.0.6 released)

Hisham
On 21 July 2017 at 09:40, Jay Carlson <[hidden email]> wrote:

>
>> On Jul 21, 2017, at 12:48 AM, Sean Conner <[hidden email]> wrote:
>>
>> It was thus said that the Great Jay Carlson once stated:
>>> On Jul 20, 2017 22:17, "Sean Conner" <[hidden email]> wrote:
>>>
>>>
>>>  So yes!  Version 1.0.7 of org.conman.parsers.jsons released!  Should be
>>> the last release for a long time.
>>>
>>>
>>> If we can find it. ;-)
>>
>> GenericCommandLinePrompt> luarocks install org.conman.parsers.jsons
>
> That URN scheme is not standards-track yet, and the current version of my browser doesn't support it.[1]
>
> How do I Tweet out a link to my dozens of Twitter followers?

https://luarocks.org/modules/spc476/org.conman.parsers.jsons

Problem solved. ;)

It contains a description, link to upstream repo, portable
installation instructions, release history and everything else you
could need. :)

-- Hisham

Loading...