Hey Lindsay,

Good thing you're having fun writing useful projects!

I wrote a small parser myself for picolisp so here's a few points for
improvement:

- Data on json.org is not a full spec, I recommend using ECMA404 or
RFC8259, as they specify behaviours way more accurately. For example, I'm
not sure if i saw if it can parse UTF-16 surrogate pairs (this lets you
parse encoded emojis), which is specified in the RFC.
- Look into `loop`, it can make your code quite a bit neater. For example
most of the NotDone flags could be removed by using loop conditionals.
- You can probably use make and link in more cases, but I'm not sure if
it's better than current approach, @abu probably knows.
- Check out https://picolisp.com/wiki/?simplerfc8259json if you want some
inspiration (maybe into direction of "oh god this is horrible", I don't
mind :D)

Have fun!
Geri

On Fri, Jan 31, 2025, 21:45 Lindsay Lawrence <picolisp@software-lab.de>
wrote:

> Hi,
>
> I added another page to the Examples section of the wiki.
>
> https://picolisp.com/wiki/?Documentation#yajson
>
> Aside from the code, I included several examples of use, along with
> 'bench' times and a somewhat detailed description. All examples can be run
> from the repl and more can be found on the linked github page.
>
> As a beginning/intermediate picolisp programmer, I've found it can be a
> challenge to progress forward from 'academic' code, and simple examples, to
> more complex applications, to discovering new insight into functionality
> and how to apply the language. Developing bottom-up from the repl is a
> great way to do that. Hopefully, the included examples are useful to others.
>
> /Lindsay
>
>
>
>

Reply via email to