Re: dxml 0.1.0 released
On Saturday, February 10, 2018 21:10:28 Joakim via Digitalmars-d-announce wrote: > On Saturday, 10 February 2018 at 18:57:53 UTC, Jonathan M Davis > > wrote: > > On Saturday, February 10, 2018 16:14:41 Jacob Carlborg via > > > > Digitalmars-d- announce wrote: > >> On 2018-02-09 22:15, Jonathan M Davis wrote: > >> > [...] > >> > >> This is great news! Have you run any benchmarks to see how it > >> performs? > > > > Kind of. I did some benchmarking to see if some code changes > > would improve performance, but I haven't tried benchmarking it > > against any other XML libraries. That would take a fair bit of > > time and effort, and IMHO, that would be better spent finishing > > the library first. Also, ldc's latest release is only up to dmd > > 2.077.1, and dxml needs an improvement that got added to > > byCodeUnit in 2.078.0, so any benchmarking that wants to do > > something like compare dxml with a C/C++ parsing library while > > taking the optimizer out of the equation isn't going to work > > yet unless I fork byCodeUnit for dxml until we get another > > release of ldc. > > ldc master uses the latest 2.078.2 frontend and stdlib, you could > always build it yourself: > > https://github.com/ldc-developers/ldc/blob/master/CMakeLists.txt#L54 > https://wiki.dlang.org/Building_LDC_from_source That's good to know. Thanks. If I get to the point where I want to do more benchmarking before ldc does another release, I'll build it myself, though depending on when I reach that point and when ldc plans to do another release, it may or may not end up being necessary. - Jonathan M Davis
Re: dxml 0.1.0 released
On Saturday, 10 February 2018 at 18:57:53 UTC, Jonathan M Davis wrote: On Saturday, February 10, 2018 16:14:41 Jacob Carlborg via Digitalmars-d- announce wrote: On 2018-02-09 22:15, Jonathan M Davis wrote: > [...] This is great news! Have you run any benchmarks to see how it performs? Kind of. I did some benchmarking to see if some code changes would improve performance, but I haven't tried benchmarking it against any other XML libraries. That would take a fair bit of time and effort, and IMHO, that would be better spent finishing the library first. Also, ldc's latest release is only up to dmd 2.077.1, and dxml needs an improvement that got added to byCodeUnit in 2.078.0, so any benchmarking that wants to do something like compare dxml with a C/C++ parsing library while taking the optimizer out of the equation isn't going to work yet unless I fork byCodeUnit for dxml until we get another release of ldc. ldc master uses the latest 2.078.2 frontend and stdlib, you could always build it yourself: https://github.com/ldc-developers/ldc/blob/master/CMakeLists.txt#L54 https://wiki.dlang.org/Building_LDC_from_source
Re: dxml 0.1.0 released
On Saturday, February 10, 2018 19:53:48 Jesse Phillips via Digitalmars-d- announce wrote: > On Friday, 9 February 2018 at 21:15:33 UTC, Jonathan M Davis > > wrote: > > Hopefully, the documentation is clear enough, but obviously, > > I'm not the best judge of that. So, have at it. > > > > Documentation: http://jmdavisprog.com/docs/dxml/0.1.0/ > > Github: https://github.com/jmdavis/dxml > > Dub: http://code.dlang.org/packages/dxml > > > > - Jonathan M Davis > > This looks so nice. > > I can understand the concerns of the DTD, and it doesn't look > like you needed to do anything special for namespaces with this > parser. I confess that I haven't looked into namespaces in detail, but from what I understand about them, I don't see any reason to do anything beyond treating them as part of the name. If the application wants to do something special with them, then it's free to do so. Key goals of this parser were to make it fast and simple to use for the typical use case. As much as possible, I'd like to keep the complicated stuff out of it. Personally, I see XML only as data just like JSON is only data, and I think that the complications in the XML spec come from trying to treat it as more than that. I had originally intended to provide at least minimal DTD support but leave most of it to some kind of helper functionality (e.g. have a helper function which took the DTD data and then validated the rest of the XML using it). However, as I got farther along, it became clear that that wasn't going to work without giving up on being able to just slice the input, and I wasn't willing to give up on that, especially when I don't see handling the DTD as valuable for anything but dealing with overly complicated XML that is outside of the programmer's control or to simply be able to say that I completely implemented the XML spec. Slicing is part of why parsers written in D should tend to be inherently fast in comparison to those written in languages like C++, and I want to take advantage of that. In principle, something like an XML parser should be able to be a showcase for why D is great. Tango's was, but Phobos' hasn't been, and I'd like for dxml to be able to be that regardless of whether it eventually replaces std.xml or not. - Jonathan M Davis
Re: dxml 0.1.0 released
On Friday, 9 February 2018 at 21:15:33 UTC, Jonathan M Davis wrote: Hopefully, the documentation is clear enough, but obviously, I'm not the best judge of that. So, have at it. Documentation: http://jmdavisprog.com/docs/dxml/0.1.0/ Github: https://github.com/jmdavis/dxml Dub: http://code.dlang.org/packages/dxml - Jonathan M Davis This looks so nice. I can understand the concerns of the DTD, and it doesn't look like you needed to do anything special for namespaces with this parser.
Re: dxml 0.1.0 released
On Saturday, February 10, 2018 10:27:42 Stefan via Digitalmars-d-announce wrote: > great work, Jonathan. Thank you. > We were missing xml for a long time and did so many hacks just to > get xml somehow parsed. LOL. Actually, one of the helper functions in std.datetime.timezone that has to deal with xml does it via hacks, because the XML in question was fairly simple, and I didn't want to deal with std.xml. If dxml does end up going through the Phobo review process and eventually ends up in Phobos, I'll have to change that code so that it uses dxml instead of the hacks. - Jonathan M Davis
Re: dxml 0.1.0 released
On Saturday, February 10, 2018 12:04:48 Seb via Digitalmars-d-announce wrote: > On Friday, 9 February 2018 at 21:15:33 UTC, Jonathan M Davis > > wrote: > > I have multiple projects that need an XML parser, and > > std_experimental_xml is clearly going nowhere, with the guy who > > wrote it having disappeared into the ether, so I decided to > > break down and write one. I've kind of wanted to for years, but > > I didn't want to spend the time on it. However, sometime last > > year I finally decided that I had to, and it's been what I've > > been working on in my free time for a while now. And it's > > finally reached the point when it makes sense to release it - > > hence this post. > > > > [...] > > FWIW we recently forked the experimental.xml repo to > dlang-community: > > https://github.com/dlang-community/experimental.xml > > So PRs etc can be merged easily. > But yeah it's not moving anywhere atm :/ Yeah, I got some e-mails about that the other day, since I had some open issues and PRs on it, and IIRC github was telling me that you'd migrated some of that over, but unless someone decides that they want to take up the torch on it, it seems pretty dead. I assume that the guy who did it simply got too busy with school once GSoC ended and then never got back to it even when he did have time. If he were serious about finishing it and being an active part of the D community, he would have at least looked at some the PRs on the project, but he's been completely silent for quite a while now. So, I guess he moved on. I was able to use it on one of my projects by making some local changes and by working around some bugs, but it clearly needs work that it's not getting. I had some rather specific ideas about what I wanted to do with an XML parser though and didn't want to spend the time trying to decipher what he'd done and morph it into something more like what I wanted, so I just started from scratch. - Jonathan M Davis
Re: dxml 0.1.0 released
On 2018-02-09 22:15, Jonathan M Davis wrote: Currently, dxml contains only a range-based StAX / pull parser and related helper functions, but the plan is to add a DOM parser as well as two writers - one which is the writer equivalent of a StaX parser, and one which is DOM-based. However, in theory, the StAX parser is complete and quite useable as-is - though I expect that I'll be adding more helper functions to make it easier to use, and if you find that you're doing a particular operation with it frequently and that that operation is overly verbose, please point it out so that maybe a helper function can be added to improve that use case - e.g. This is great news! Have you run any benchmarks to see how it performs? -- /Jacob Carlborg
Re: Release D 2.078.2
On Saturday, 10 February 2018 at 08:17:27 UTC, Thomas Mader wrote: On Friday, 9 February 2018 at 09:20:14 UTC, Martin Nowak wrote: This point release also ships with dub 1.7.2 which further improves reliability. https://github.com/dlang/dub/blob/master/CHANGELOG.md#v172---2018-02-07 - -Martin https://github.com/dlang/dub/releases/latest doesn't point to 1.7.2. https://github.com/dlang/dub/issues/1367
Re: dxml 0.1.0 released
On Friday, 9 February 2018 at 21:15:33 UTC, Jonathan M Davis wrote: I have multiple projects that need an XML parser, and std_experimental_xml is clearly going nowhere, with the guy who wrote it having disappeared into the ether, so I decided to break down and write one. I've kind of wanted to for years, but I didn't want to spend the time on it. However, sometime last year I finally decided that I had to, and it's been what I've been working on in my free time for a while now. And it's finally reached the point when it makes sense to release it - hence this post. [...] FWIW we recently forked the experimental.xml repo to dlang-community: https://github.com/dlang-community/experimental.xml So PRs etc can be merged easily. But yeah it's not moving anywhere atm :/
Re: dxml 0.1.0 released
great work, Jonathan. Thank you. We were missing xml for a long time and did so many hacks just to get xml somehow parsed.
Re: Release D 2.078.2
On Friday, 9 February 2018 at 09:20:14 UTC, Martin Nowak wrote: This point release also ships with dub 1.7.2 which further improves reliability. https://github.com/dlang/dub/blob/master/CHANGELOG.md#v172---2018-02-07 - -Martin https://github.com/dlang/dub/releases/latest doesn't point to 1.7.2.