Hi Mario,

- About making a complete library by updating the existing yaml egg

  I don't think it is a good ieda.

  In the earlier version of the old egg,
  it cannot distinguish yaml-mapping and yaml-list,
  and I (partly)fixed it in the source of old egg:
  - https://github.com/tenderlove/chicken-yaml/pull/19

  And later I find more confusing cases in the old egg.
  Considering the design of the old egg,
  and the specification of YAML, I think it is hard to fix,
  and almostly unable to make a correct parser based on the design of old egg.

  Details are a bit complicated, as a summary of limitation of the old egg:
  - The old egg can only correctly parse narrow cases of YAML
  - Most YAML cases cannot be identified after parsing

  The next item would show the limitation more specifically.

- About which one should be used

  As mentioned, the old egg can only parse narrow cases of YAML,
  here are some cases that would break the data,
  or make the parser generate ill format:
  - If there is emplty yaml-list or yaml-mapping
  - If there is a yaml-list contain yaml-mapping, or reverse
  - If there are multiple yaml-document
  - ...

  If there is any nested structure,
  the old egg may make error data,
  while the new egg should work fine.

- About coding style

  Thanks for providing the reference.
  I'll go through it.

Best, Luli
________________________________
From: Mario Domenech Goulart <[email protected]>
Sent: Tuesday, December 30, 2025 2:50 AM
To: li lu via Chicken-users <[email protected]>
Cc: li lu <[email protected]>
Subject: Re: New egg: libyaml

Hi,

On Sun, 28 Dec 2025 21:18:58 +0000 li lu via Chicken-users 
<[email protected]> wrote:

> I'd like to add a new egg `libyaml` to online packages,
> the release-info URI is:
> - 
> https://codeberg.org/rikuri/libyaml.ss/releases/download/latest/libyaml.ss.release-info
>
> The egg is to parse yaml.
> About the existing egg `yaml`,
> there are issues about distinguish list, mapping, NULL, etc.
> So I specifically defined the yaml object in scheme:
> - 
> https://codeberg.org/rikuri/libyaml.ss/src/branch/main/docs/usage.md#yaml-and-scheme
>
> and libyaml is based on it.

Would it be possible to have the issues you mention addressed in the
existing yaml egg?

It's a bit odd to have two eggs to parse YAML, both based on the same C
library.  We have a similar situation with JSON eggs, which confuses new
users (as in "which JSON egg should I use?").

Please don't take this comment as a criticism, but as a feedback: I find
the interface and the coding style of the libyaml egg very unidiomatic.

I might have not been able to fully grasp its interface, but the coding
style is definitely very different from what Schemers normally use
(granted, there are small variations when it comes to style, but
generally people tend to loosely folow [0]).  I only bring this up
because it might hinder contributions and/or understanding of the code.

[0] https://mumble.net/~campbell/scheme/style.txt

All the best.
Mario
--
https://parenteses.org/mario

Reply via email to