Live data from Hacker News

Toml-bench – Which toml package to use in Python?

github.com

11–16 of 16 posts

Re: Toml-bench – Which toml package to use in Python?

#12
post #8

[flagged]

The fact that the article complains about the static typing in TOML makes me disregard the entire piece. That's the best part of TOML. I've encountered countless bugs in Ansible because it does know if no is "no" or false.

yaml booleans drive me bananas.

Re: Toml-bench – Which toml package to use in Python?

#13

[flagged]

that ship sailed. toml is a prominent example of the least-worst option gaining traction. For configuration files that need to be human editable, provide comments, but are machine readable and have broad support, TOML is the choice that the plurality has settled on. In python, it’s in core tools like pip; it’s not going away because we don’t like how you nest collections awkwardly or whatever. at least it’s Norway YA…

I always liked HOCON for this, but it never really took off outside of some scala ecosystems: https://github.com/lightbend/config/blob/master/HOCON.md

Re: Toml-bench – Which toml package to use in Python?

#14

I was all ready with a rant about the premature optimization of worrying about the parsing speed of a configuration library with there's so many other important factors and the majority of use cases don't care about speed... But this is a great post that covers the relative behaviors of the different parsing libraries and helps you evaluate the best _functional_ choice for your needs. Bravo!

The level of none compliance was actually pretty surprising to me. You're right speed is not really that important, realistically you're not going to have a large amount of TOML in any given project, nor are you going to read and write it constantly.

One issue I've run into is programs that have configuration language that looks a lot like TOML or INI format... yet it's neither. So a TOML or INI parser might be able to read and write the configuration files 90% or the time, but fail in strange ways in some edge cases.

Re: Toml-bench – Which toml package to use in Python?

#15

I was all ready with a rant about the premature optimization of worrying about the parsing speed of a configuration library with there's so many other important factors and the majority of use cases don't care about speed... But this is a great post that covers the relative behaviors of the different parsing libraries and helps you evaluate the best _functional_ choice for your needs. Bravo!

The level of none compliance was actually pretty surprising to me. You're right speed is not really that important, realistically you're not going to have a large amount of TOML in any given project, nor are you going to read and write it constantly. One issue I've run into is programs that have configuration language that looks a lot like TOML or INI format... yet it's neither. So a TOML or INI parser might be able…

[deleted]

Re: Toml-bench – Which toml package to use in Python?

#16

I was all ready with a rant about the premature optimization of worrying about the parsing speed of a configuration library with there's so many other important factors and the majority of use cases don't care about speed... But this is a great post that covers the relative behaviors of the different parsing libraries and helps you evaluate the best _functional_ choice for your needs. Bravo!

The level of none compliance was actually pretty surprising to me. You're right speed is not really that important, realistically you're not going to have a large amount of TOML in any given project, nor are you going to read and write it constantly. One issue I've run into is programs that have configuration language that looks a lot like TOML or INI format... yet it's neither. So a TOML or INI parser might be able…

That's a weird one for sure. I've seen config files which were valid TCL, I've seen JSON, I've seen bad old INI files... TOML is relatively new after all, but that too...

What I never understood are those who looked at all these options and said "No, I'll write my own parser!" instead...

Post reply on HN