Our great sponsors
-
libxo
The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application decides at run time which output style should be produced.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
> The difficulty here is to get streaming
Polymorphic Write Streams do this.
ACM DL: https://dl.acm.org/doi/10.1145/3359619.3359748
pdf: http://www.hirschfeld.org/writings/media/WeiherHirschfeld_20...
Code: https://github.com/mpw/MPWFoundation/tree/master/Streams.sub...
Fast JSON parsing using this approach: https://blog.metaobject.com/2020/04/somewhat-less-lethargic-...
Serde can kind of do this for rust projects, but you're usually constrained to outputs that are "identical but for the syntax/format" (i.e. same field names though perhaps with different naming conventions).
I've used that to convert configuration files from one language to the other, such as this json2toml and toml2json tool [0].
[0]: https://github.com/neosmart/toml2json
> Typical printf usage is imperative and additive:
> if (enter) printf("Hello "); else printf("Goodbye "); printf("World!\n");
And unless you want your translator to hate you, you really, really mustn’t do this in user-facing output.
(OK, you can if you really want to and if you’re ready to give them the same tools[1], but it won’t be simple. Although I’m unaware of any professional translators supporting this either—most use a CAT, and the Fluent approach ignores those.)
[1] https://projectfluent.org/