I have made available one of my personal side projects, Orsetto, for community review. My plan is for this library is for it to be an assortment of structured data interchange languages organized around a common foundation of various general purpose utilities. At the moment, only JSON is implemented, and I’m planning to implement CBOR next.
Much of the foundation layer in Orsetto originated in my now outdated Oni project. That project also included some experimental work in concurrent network I/O, which I’m hoping to revisit in the context of the algebraic effects feature in development on the OCaml multicore project. In the meantime, Orsetto is generally useful in OCaml 4.06.1 and later.
I haven’t posted a package on OPAM yet. I’m waiting for the OPAM 2.0 migration. If you’re interested in playing with it now, then you’ll need to be using OPAM 2.0, then clone the repository and install it with a pinned local source tree.
Recent commits now include a flyweight implementation of Concise Binary Object Representation (CBOR) [RFC 7049] using the Cf_encode and Cf_decode interfaces.
Also, I’ve made more progress on Unicode regular expressions. The remaining pieces of RL1 conformance in Ucs_regx seem less pressing, because need for regular expressions in Orsetto is somewhat limited to being an extension of the more general Cf_scan and Ucs_scan parsers. I plan to implement Unicode line and word boundary matching as scanners first, then as regular expression forms later.
I refactored the old Nx_uri module from Oni into the new Cf_uri module in Orsetto and it’s passing all the unit tests. Some differences worth noting between my implementation and the URI package from the Mirage project:
The Mirage implementation uses the Re package on OPAM, and the Orsetto implementation uses its own Cf_regx module for constructing the URI component scanners. The lazy DFA engine for Cf_regx is the same one used by the Ucs_regx module that I mentioned previously in this thread.
The Mirage implementation includes logic for parsing key/value parameters in query parts, and the Orsetto implementation does not. (Providing delimiter-separated value structures is a separate task. See Issue #15 for details.)
The Orsetto implementation does not implement structural equality and comparison on the decomposed structures. (I don’t see the point. String equality and comparison on the composed text should suffice.)
The Orsetto implmentation uses syntax-based normalization, not protocol-based normalization. This is because the Cf_uri module comprises only the generic syntax for URI and URI references with the generic path resolving logic. It doesn’t comprehend any of the protocol-specific extensions of the URI syntax. According to my design, those protocol-based normalization rules for URI should be implemented by extending the generic syntax-based normalization provided in the Cf_uri module.
As mentioned above, anyone interested in tracking my progress is invited to follow the issue reports in the Bitbucket repository.
Things have been moving a little slowly lately because I’ve been distracted by the day job and a swarm of personal hassles. Project is not abandoned, just in the cooler for a bit. Hope to return to it with more energy in a few weeks.
Not moving any faster yet, but I’ve finished basic support for RFC 3339 Internet Timestamp format, and I’ve decided not to do anything for UUID in the alpha milestone. Only a few minor cleanups to do, then I’ll start preparing the preview release to OPAM, which may happen in a few weeks if I’m lucky.