I just released YAMLx 0.5.0 (release notes) which provides a few fixes and improvements since the original announcement in April. YAMLx is a pure-OCaml library implementing the complex YAML 1.1 and 1.2 specifications. It aims to provide a complete yet convenient user interface to manipulate data in this popular format.
Beyond the boring announcement, this is an opportunity for me to bring your attention (again?) to the unusual aspects of the YAMLx project. It is sacrilegious and experimental along 3 main axes:
AI use
Most of the implementation is AI-generated (~10K lines).
The interfaces are mostly human-crafted (~800 lines).
Authorship model
The project has only one single traditional contributor.
Contributions are encouraged in the form of bug reports and detailed feature requests.
The project doesn’t take external code contributions.
Funding
The library is available for free under a strong copyleft license (AGPL).
A one-time contribution ($500) gets your organization a perpetual commercial license.
Past the funding threshold ($5,000), everyone will get a permissive license for free (ISC).
I’m happy to go over the motivations for these choices. Just ask.
I think the funding model of a restrictive license which can be “paid down” is novel and interesting.
I think it perhaps interacts poorly with the AI usage, however, for two reasons:
I think it’s reasonable for someone to read this and say “you think the market value of 800 lines of code is $5,000?”. I presume that the implementation is not one-shot-vibe-coded and that the actual human effort extends beyond those 800 lines, but that may not be everyone’s immediate thought.
IANAL, but my understanding of the outcome of 2019’s Google LLC vs. Oracle America, Inc, which found specifically that APIs are not automatically copyrightable, could mean that someone could legally take those 800 lines and use AI to clean room reimplement the package to the same spec, and thereby circumvent the AGPL license (forgive the US-centric reasoning, but I think similar could be true in other jurisdictions?)
I am of course concerned with using AI to more broadly circumvent software licensing, but this particular package’s implementation strategy is especially thought provoking to me in that area
Perhaps more on-topic, I like the overall shape of the API, but I wish there was an option that returned a (t, yaml_error) result rather than a string error always. It would work well with libraries like Grace if the location/file information was preserved rather than performing formatting on behalf of the caller
The API provides _exn functions that raise the YAMLx.Error exception. If you only want to convert the error to a different error string than the default one, wrap these calls using YAMLx.catch_errors.
If this interface isn’t compatible with Grace or if for some reason you’d like to propagate a value of type (t, yaml_error) result, I was thinking it’s easy enough to write your own catcher as follows:
let catch_yaml_error func =
try Ok (func ())
with YAMLx.Error err -> Error err
Please open an issue on GitHub if you’d like to follow up on this.
Indeed, many users of free open-source software who have never maintained such a project or have never paid someone to do so severely underestimate the costs involved.
I hope to help change this and inspire authors to get paid, one way or another, for the time and energy they put into their work.