Live data from Hacker News

Thoughts on the Word Spec in Rust

tritium.legal

1–10 of 25 posts

Re: Thoughts on the Word Spec in Rust

#4
I wonder why round-trip is such a small concern for people implementing serializers/deserializers of various kinds. I usually throw in an "Unknown" node type, which stores things unaltered until I can understand things again. The parsers I usually write are very small, so I haven't seen what issues comes up at scale, maybe there are dragons lurking .

Re: Thoughts on the Word Spec in Rust

#6

would be cool if they published this as oss

Thanks for the kind words, and I have given it serious thought.

It's definitely not impossible in the future.

I just don't think there is enough interest right now in contributing to the underlying tech without generalizing it so much that it basically becomes an inferior LibreOffice.

Instead, the business model for Tritium is to give away the niche legal product for free to the community, but charge commercial users who need more granular control over its network activity, etc. This gives smaller start-ups, law offices and in-house shops a chance to benefit from the niche features while reserving for more demanding organizations to express an interest in and benefit from advanced features.

Re: Thoughts on the Word Spec in Rust

#7
post #5

would be cool if they published this as oss

or - if feasible - extend the existing crate instead of creating a new one.

I thought about that as well, but it's really just so core to every aspect of the product that Tritium needs to own it 100%. We just don't have the capacity to take a tradeoff that is favorable to the broader use case. I highlighted this issue in particular but there were other places where Tritium's needs diverged from the docx_rs approach. (e.g., dealing with references)

Re: Thoughts on the Word Spec in Rust

#8

I wonder why round-trip is such a small concern for people implementing serializers/deserializers of various kinds. I usually throw in an "Unknown" node type, which stores things unaltered until I can understand things again. The parsers I usually write are very small, so I haven't seen what issues comes up at scale, maybe there are dragons lurking .

This is the solution for that particular issue that Tritium uses.

[NOTE: one dragon would be the memory consumption alluded to in the article.]

Re: Thoughts on the Word Spec in Rust

#9
post #8

I wonder why round-trip is such a small concern for people implementing serializers/deserializers of various kinds. I usually throw in an "Unknown" node type, which stores things unaltered until I can understand things again. The parsers I usually write are very small, so I haven't seen what issues comes up at scale, maybe there are dragons lurking .

This is the solution for that particular issue that Tritium uses. [NOTE: one dragon would be the memory consumption alluded to in the article.]

Could you intern strings? Seems like you're likely to see the same tags and attributes over and over.

Re: Thoughts on the Word Spec in Rust

#10
post #8

Earlier quoted context omitted.

This is the solution for that particular issue that Tritium uses. [NOTE: one dragon would be the memory consumption alluded to in the article.]

Could you intern strings? Seems like you're likely to see the same tags and attributes over and over.

Yes, and there are probably a lot of other clever ideas. But the better solution is probably just to implement more of the spec. Once you get through maybe 80% of the tags, you've eliminated 99.9% of the memory issue given their frequency distribution.
Post reply on HN