www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - D:YAML 0.1

reply Kiith-Sa <42 theanswer.com> writes:
D:YAML is a YAML parser library for D.

It is mostly compliant with the YAML 1.1 spec, although there are some 
unsupported features (e.g. recursive data structures).

Currently there is only a parser, not an emitter.

The API is not yet stable, there will be breaking changes. (e.g. part of the 
API depends on std.stream and will probably be changed when std.stream is 
rewritten.)

Docs can be found in doc/html in the package. There are some (very) basic 
tutorials/examples and an API doc.

Much of D:YAML code has been ported to D from PyYAML.

D:YAML is written in D2. There is no D1 or Tango support, and none is 
planned.

Link: https://github.com/kiith-sa/D-YAML
Aug 16 2011
next sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2011-08-16 20:13, Kiith-Sa wrote:
 D:YAML is a YAML parser library for D.

 It is mostly compliant with the YAML 1.1 spec, although there are some
 unsupported features (e.g. recursive data structures).

 Currently there is only a parser, not an emitter.

 The API is not yet stable, there will be breaking changes. (e.g. part of the
 API depends on std.stream and will probably be changed when std.stream is
 rewritten.)

 Docs can be found in doc/html in the package. There are some (very) basic
 tutorials/examples and an API doc.

 Much of D:YAML code has been ported to D from PyYAML.

 D:YAML is written in D2. There is no D1 or Tango support, and none is
 planned.

 Link: https://github.com/kiith-sa/D-YAML

Interesting, I've been looking for a D YAML library for a while. How is the performance, have you made any benchmarks? -- /Jacob Carlborg
Aug 16 2011
next sibling parent reply Kiith-Sa <42 theanswer.com> writes:
Jacob Carlborg wrote:

 On 2011-08-16 20:13, Kiith-Sa wrote:
 D:YAML is a YAML parser library for D.

 It is mostly compliant with the YAML 1.1 spec, although there are some
 unsupported features (e.g. recursive data structures).

 Currently there is only a parser, not an emitter.

 The API is not yet stable, there will be breaking changes. (e.g. part of
 the API depends on std.stream and will probably be changed when
 std.stream is rewritten.)

 Docs can be found in doc/html in the package. There are some (very) basic
 tutorials/examples and an API doc.

 Much of D:YAML code has been ported to D from PyYAML.

 D:YAML is written in D2. There is no D1 or Tango support, and none is
 planned.

 Link: https://github.com/kiith-sa/D-YAML

Interesting, I've been looking for a D YAML library for a while. How is the performance, have you made any benchmarks?

Not yet. I intend to implement an emitter first and then start benchmarking/profiling/optimizing. However, as much of the code is directly translated from PyYAML (Python code, not the libYAML C extension), I imagine it will be somewhat faster than that.
Aug 16 2011
parent reply Jacob Carlborg <doob me.com> writes:
On 2011-08-16 21:12, Kiith-Sa wrote:
 Jacob Carlborg wrote:

 On 2011-08-16 20:13, Kiith-Sa wrote:
 D:YAML is a YAML parser library for D.

 It is mostly compliant with the YAML 1.1 spec, although there are some
 unsupported features (e.g. recursive data structures).

 Currently there is only a parser, not an emitter.

 The API is not yet stable, there will be breaking changes. (e.g. part of
 the API depends on std.stream and will probably be changed when
 std.stream is rewritten.)

 Docs can be found in doc/html in the package. There are some (very) basic
 tutorials/examples and an API doc.

 Much of D:YAML code has been ported to D from PyYAML.

 D:YAML is written in D2. There is no D1 or Tango support, and none is
 planned.

 Link: https://github.com/kiith-sa/D-YAML

Interesting, I've been looking for a D YAML library for a while. How is the performance, have you made any benchmarks?

Not yet. I intend to implement an emitter first and then start benchmarking/profiling/optimizing. However, as much of the code is directly translated from PyYAML (Python code, not the libYAML C extension), I imagine it will be somewhat faster than that.

Does the parser/lexer take advantage of D's slices to make it faster? -- /Jacob Carlborg
Aug 16 2011
parent reply Kiith-Sa <42 theanswer.com> writes:
Jacob Carlborg wrote:

 On 2011-08-16 21:12, Kiith-Sa wrote:
 Jacob Carlborg wrote:

 On 2011-08-16 20:13, Kiith-Sa wrote:
 D:YAML is a YAML parser library for D.

 It is mostly compliant with the YAML 1.1 spec, although there are some
 unsupported features (e.g. recursive data structures).

 Currently there is only a parser, not an emitter.

 The API is not yet stable, there will be breaking changes. (e.g. part
 of the API depends on std.stream and will probably be changed when
 std.stream is rewritten.)

 Docs can be found in doc/html in the package. There are some (very)
 basic tutorials/examples and an API doc.

 Much of D:YAML code has been ported to D from PyYAML.

 D:YAML is written in D2. There is no D1 or Tango support, and none is
 planned.

 Link: https://github.com/kiith-sa/D-YAML

Interesting, I've been looking for a D YAML library for a while. How is the performance, have you made any benchmarks?

Not yet. I intend to implement an emitter first and then start benchmarking/profiling/optimizing. However, as much of the code is directly translated from PyYAML (Python code, not the libYAML C extension), I imagine it will be somewhat faster than that.

Does the parser/lexer take advantage of D's slices to make it faster?

In some places, yes, in some places, no. I didn't concentrate on preventing new strings from being allocated, but a lot of string data should pass through the code unchanged, with just slices changing. Phobos functions should help with that (E.g: afaik when you split() a string, you just get slices to the same string data?). Still, the parser, scanner (and composer) are precisely the parts of code that were ported from PyYAML, and the code is mostly similar to PyYAML.
Aug 17 2011
parent Jacob Carlborg <doob me.com> writes:
On 2011-08-17 13:08, Kiith-Sa wrote:
 Jacob Carlborg wrote:
 Does the parser/lexer take advantage of D's slices to make it faster?

In some places, yes, in some places, no. I didn't concentrate on preventing new strings from being allocated, but a lot of string data should pass through the code unchanged, with just slices changing. Phobos functions should help with that (E.g: afaik when you split() a string, you just get slices to the same string data?). Still, the parser, scanner (and composer) are precisely the parts of code that were ported from PyYAML, and the code is mostly similar to PyYAML.

Ok, I see. It should be possible to create a parser that doesn't allocate memory, only uses slicing. A great example of that is the XML module in Tango. -- /Jacob Carlborg
Aug 17 2011
prev sibling parent Jimmy Cao <jcao219 gmail.com> writes:
--0023545be258943f3804aaa439b7
Content-Type: text/plain; charset=ISO-8859-1

This is great!
With std.xml and std.json being somewhat dysfunctional, it's nice to have a
YAML library.

On Tue, Aug 16, 2011 at 1:58 PM, Jacob Carlborg <doob me.com> wrote:

 On 2011-08-16 20:13, Kiith-Sa wrote:

 D:YAML is a YAML parser library for D.

 It is mostly compliant with the YAML 1.1 spec, although there are some
 unsupported features (e.g. recursive data structures).

 Currently there is only a parser, not an emitter.

 The API is not yet stable, there will be breaking changes. (e.g. part of
 the
 API depends on std.stream and will probably be changed when std.stream is
 rewritten.)

 Docs can be found in doc/html in the package. There are some (very) basic
 tutorials/examples and an API doc.

 Much of D:YAML code has been ported to D from PyYAML.

 D:YAML is written in D2. There is no D1 or Tango support, and none is
 planned.

 Link: https://github.com/kiith-sa/D-**YAML<https://github.com/kiith-sa/D-YAML>

Interesting, I've been looking for a D YAML library for a while. How is the performance, have you made any benchmarks? -- /Jacob Carlborg

--0023545be258943f3804aaa439b7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This is great!<div>With std.xml and std.json being somewhat dysfunctional, = it&#39;s nice to have a YAML library.<br><br><div class=3D"gmail_quote">On = Tue, Aug 16, 2011 at 1:58 PM, Jacob Carlborg <span dir=3D"ltr">&lt;<a href= =3D"mailto:doob me.com">doob me.com</a>&gt;</span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex;"><div><div></div><div class=3D"h5">On 2011-0= 8-16 20:13, Kiith-Sa wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> D:YAML is a YAML parser library for D.<br> <br> It is mostly compliant with the YAML 1.1 spec, although there are some<br> unsupported features (e.g. recursive data structures).<br> <br> Currently there is only a parser, not an emitter.<br> <br> The API is not yet stable, there will be breaking changes. (e.g. part of th= e<br> API depends on std.stream and will probably be changed when std.stream is<b= r> rewritten.)<br> <br> Docs can be found in doc/html in the package. There are some (very) basic<b= r> tutorials/examples and an API doc.<br> <br> Much of D:YAML code has been ported to D from PyYAML.<br> <br> D:YAML is written in D2. There is no D1 or Tango support, and none is<br> planned.<br> <br> Link: <a href=3D"https://github.com/kiith-sa/D-YAML" target=3D"_blank">http= s://github.com/kiith-sa/D-<u></u>YAML</a><br> </blockquote> <br></div></div> Interesting, I&#39;ve been looking for a D YAML library for a while. How is= the performance, have you made any benchmarks?<br> <br> -- <br><font color=3D"#888888"> /Jacob Carlborg<br> </font></blockquote></div><br></div> --0023545be258943f3804aaa439b7--
Aug 16 2011
prev sibling next sibling parent reply "Nick Sabalausky" <a a.a> writes:
"Kiith-Sa" <42 theanswer.com> wrote in message 
news:j2ec0p$al6$1 digitalmars.com...
 D:YAML is a YAML parser library for D.

 It is mostly compliant with the YAML 1.1 spec, although there are some
 unsupported features (e.g. recursive data structures).

 Currently there is only a parser, not an emitter.

 The API is not yet stable, there will be breaking changes. (e.g. part of 
 the
 API depends on std.stream and will probably be changed when std.stream is
 rewritten.)

 Docs can be found in doc/html in the package. There are some (very) basic
 tutorials/examples and an API doc.

 Much of D:YAML code has been ported to D from PyYAML.

 D:YAML is written in D2. There is no D1 or Tango support, and none is
 planned.

 Link: https://github.com/kiith-sa/D-YAML

Cool, I've been interested in YAML, but there wasn't a D library for it.
Aug 16 2011
parent Mike Parker <aldacron gmail.com> writes:
On 8/17/2011 5:01 AM, Nick Sabalausky wrote:
 "Kiith-Sa"<42 theanswer.com>  wrote in message
 news:j2ec0p$al6$1 digitalmars.com...
 D:YAML is a YAML parser library for D.

 It is mostly compliant with the YAML 1.1 spec, although there are some
 unsupported features (e.g. recursive data structures).

 Currently there is only a parser, not an emitter.

 The API is not yet stable, there will be breaking changes. (e.g. part of
 the
 API depends on std.stream and will probably be changed when std.stream is
 rewritten.)

 Docs can be found in doc/html in the package. There are some (very) basic
 tutorials/examples and an API doc.

 Much of D:YAML code has been ported to D from PyYAML.

 D:YAML is written in D2. There is no D1 or Tango support, and none is
 planned.

 Link: https://github.com/kiith-sa/D-YAML

Cool, I've been interested in YAML, but there wasn't a D library for it.

nor the inclination to work on it myself.
Aug 17 2011
prev sibling parent jdrewsen <jdrewsen nospam.com> writes:
Den 16-08-2011 20:13, Kiith-Sa skrev:
 D:YAML is a YAML parser library for D.

 It is mostly compliant with the YAML 1.1 spec, although there are some
 unsupported features (e.g. recursive data structures).

 Currently there is only a parser, not an emitter.

 The API is not yet stable, there will be breaking changes. (e.g. part of the
 API depends on std.stream and will probably be changed when std.stream is
 rewritten.)

 Docs can be found in doc/html in the package. There are some (very) basic
 tutorials/examples and an API doc.

 Much of D:YAML code has been ported to D from PyYAML.

 D:YAML is written in D2. There is no D1 or Tango support, and none is
 planned.

 Link: https://github.com/kiith-sa/D-YAML

Very nice! Gotta have a look on this one.
Aug 16 2011