digitalmars.D.announce - std2.xml and std2.encoding for D 1.0 available at D source
- Michael Rynn <michaelrynn optushome.com.au> Aug 11 2009
- "Saaa" <empty needmail.com> Aug 12 2009
- Bill Baxter <wbaxter gmail.com> Aug 12 2009
- Robert Fraser <fraserofthenight gmail.com> Aug 12 2009
I have made a little beginning attempt at understanding the phobos xml modules. For a warm up exercise, I took the std.xml and std.encoding from phobos 2, and made them into std2.xml and std2.encoding in the DSource project std2, so the dmd 1.0 compiler took a tour tripping up all over the code. They are attached as files on the http://www.dsource.org/projects/std2 page. I cannot believe that anybody actually uses the std2 project files. I took away all the safety features of const, immutable and any other things that dmd 1.0 complains about, as "recommended" for the std2. Inserted a few support functions not immediately avalable in Phobos 1.0, notably some suggested better code for the encode (xml entity) , and renamed it as encodeStdEntity, from a Tango fan in the D bugs postings. Ran unit tests and also successfully rab the books.xml example. Re-enabled the disabled unittest in std.encoding, and fixed the little bug that was spoiling it, also posting that to the D bugs. ..
Aug 11 2009
I cannot believe that anybody actually uses the std2 project files.
I do..Ran unit tests and also successfully rab the books.xml example.
Re-enabled the disabled unittest in std.encoding, and fixed the little bug that was spoiling it, also posting that to the D bugs.
Aug 12 2009
On Tue, Aug 11, 2009 at 11:03 PM, Michael Rynn<michaelrynn optushome.com.au> wrote:I have made a little beginning attempt at understanding the phobos xml modules. =A0For a warm up exercise, I took the std.xml and std.encoding from phobos 2, and made them into std2.xml and std2.encoding in the DSource project std2, so the dmd 1.0 compiler took a tour tripping up all over the code. They are attached as files on the http://www.dsource.org/projects/std2 page.
Great. Thanks for the contribution. I've checked your ports into svn now.I cannot believe that anybody actually uses the std2 project files.
What do you mean by that?I =A0took away all the safety features of const, immutable and any other things that dmd 1.0 complains about, as "recommended" for the std2. Inserted a few support functions not immediately avalable in Phobos 1.0, =A0notably some =A0suggested better code =A0for the encode (xml enti=
, and renamed it as encodeStdEntity, from a Tango fan in the D bugs postings. Ran unit tests and also successfully rab the books.xml example. Re-enabled the disabled unittest in std.encoding, and fixed the little bug that was spoiling it, also posting that to the D bugs. ..
Very cool. You should probably know, though, that std.xml is not very popular. I'm don't have much to do with XML -- by choice, horrid stuff if you ask me -- but folks who have played with std.xml have found it buggy and very slow. And the original author has disappeared. There has been talk that it needs to be rewritten from scratch. Or perhaps replaced with a port of tango's very speedy xml library. --bb
Aug 12 2009
On Tue, Aug 11, 2009 at 11:03 PM, Michael Rynn<michaelrynn optushome.com.au> wrote:I took away all the safety features of const, immutable and any other things that dmd 1.0 complains about, as "recommended" for the std2.
Well, different people feel differently about these things. IMO, the complication of const/immutable and loss of productivity doesn't justify the small gains in safety. Whether it justifies the muiltithreading advantages is yet to be seen, though there's some promising stuff coming from the minds of A&W. Bill Baxter wrote:Very cool. You should probably know, though, that std.xml is not very popular. I'm don't have much to do with XML -- by choice, horrid stuff if you ask me -- but folks who have played with std.xml have found it buggy and very slow. And the original author has disappeared. There has been talk that it needs to be rewritten from scratch. Or perhaps replaced with a port of tango's very speedy xml library.
Yup... among other things, it does not correctly handle elements that are closed with /> (i.e. `<x/>` instead of `<x></x>`). This is basically a show-stopper bug, IMO. As far as Tango's XML goes, yeah, it's awesome; check out: http://dotnot.org/blog/archives/2008/03/10/xml-benchmarks-updated-graphs-with-rapidxml/ http://dotnot.org/blog/archives/2008/03/10/xml-benchmarks-parsequerymutateserialize/ http://dotnot.org/blog/archives/2008/03/09/xml-benchmarks-pros-and-cons-of-each-library/ http://dotnot.org/blog/archives/2008/03/12/why-is-dtango-so-fast-at-parsing-xml/ That second link in particular is a "holy ****; look at those bars" type of experience.
Aug 12 2009









"Saaa" <empty needmail.com> 