M
Martin Tournoij
arp242.net · Personal blog · on HN since 2017
Martin Tournoij writes about programming, Unix tools, Go, open source licensing, and file formats, and built the GoatCounter analytics tool.
What HN saysHN commenters mainly discuss his YAML critique, comparing YAML to C++ and its messy feature set, and his post on hard-wrapped email text.
101HN people shared it
52linked it in comments
88stories submitted
5.6Kstory points
4 months agolast shared
2017people per year2026
Most-shared posts
- 1YAML: Probably not so great after all19 people · 554 points · first shared 2019 · 444 comments on HN
- 2The problem with hard wrapping email body text8 people · 10 points · first shared 2020 · discussion on HN
- 3Curl to shell isn't so bad7 people · 306 points · first shared 2019 · 193 comments on HN
- 4Let’s not be pedantic about “Open Source”7 people · 6 points · first shared 2020 · 1 comments on HN
- 5Statically Compiling Go Programs6 people · 9 points · first shared 2020 · discussion on HN
- 6YAML: probably not so great after all (2017)5 people · 673 points · first shared 2017 · 394 comments on HN
- 7The Art of Unix Programming (2003)5 people · 111 points · first shared 2019 · 6 comments on HN
- 8Choosing a License for GoatCounter5 people · 51 points · first shared 2019 · 70 comments on HN
- 9Go is not an easy language4 people · 560 points · first shared 2021 · 431 comments on HN
- 10Tired of Stack Overflow4 people · 552 points · first shared 2019 · 497 comments on HN
- 11JSON as configuration files: please don’t (2016)4 people · 404 points · first shared 2018 · 426 comments on HN
- 12Stupid light software4 people · 100 points · first shared 2020 · 33 comments on HN
- 13Safe Terminal Escape Codes3 people · 64 points · first shared 2024 · 32 comments on HN
- 14Bitmasks for Nicer APIs3 people · 8 points · first shared 2020 · discussion on HN
- 15Why GoatCounter Ignores Do Not Track3 people · 4 points · first shared 2020 · discussion on HN
What HN people wrote when they linked it
apitman · 2024-03-11
SQLite is awesome, but it's still an order of magnitude more complex than JSON. If it wants to be the one file format to rule them all, we're going to need high quality and heavily used implementations in most languages.
Adding C sqlite to a golang project adds a significant hit to build times and cross-compilation/static linking complexity[0]. When I looked into the native Go implementations of sqlite I came away with the feeling it wasn't worth the tradeoffs compared to using the C version, but now I still have to deal with the issues above.
I haven't looked deeply into how sqlite works, but my instincts tell me the reason we don't have high quality implementations in every language is because it's actually too complex to treat as a protocol.
I would love to see something fill the void between plain text and sqlite.
[0]: https://www.arp242.net/static-go.html
cstrahan · 2024-03-11
YAML is kind of like C++:
> You like C++ because you're only using 20% of it. And that's fine, everyone only uses 20% of C++, the problem is that everyone uses a different 20% :)
https://eli.thegreenplace.net/2009/10/17/the-c-bashing-season-is-back
The YAML footguns are too numerous to reproduce here, so here are some sources:
https://stackoverflow.com/questions/3790454/how-do-i-break-a-string-in…
https://www.arp242.net/yaml-config.html
https://noyaml.com/
YAML isn't terrible if you only ever have to read what you wrote. Now consider that there are 63 different ways to write multi-line strings in YAML -- how many of those have you committed to memory? Yeah... now throw 10-100 developers into the mix, each with their own favorite alternative syntaxes -- good luck making sense of your YAML.
kugurerdem · 2024-02-02
This is one of the most useful programs that I use.
I use it for turning .md files into .html or .pdf.
I use it for creating slides with it.
I even use it for fixing the hard-wrapped text I write in vim before sending emails. When I write in vim, I prefer the text to be hard-wrapped, but for emails, I like it better when the text is not wrapped. I recommend arp242's essay explaining the problem with hard-wrapping [1], but basically the way I workaround this problem is using a local script which uses pandoc at some point [2].
Overall, pandoc is really good.
[1]: https://www.arp242.net/email-wrapping.html
[2]: https://github.com/kugurerdem/dotfiles/blob/2d68357273e1bc300017b6c59b…
avgcorrection · 2023-06-26
> I mean, honestly, people who created YAML probably saw it as an inconsequential, sketchy project that should take maybe a weekend or two. They didn't plan for this format to be the best... they just made something... that sort of did something... but not really. I have no idea why something like this received the acclaim that it did.
One of the co-creators responded [1] to an article [2] about how Yaml is “not that great” on this site.
It comes off to me as, well we did it for free and people use it so I’m happy abuot it.
[1] https://news.ycombinator.com/item?id=17358548
[2] https://www.arp242.net/yaml-config.html
arp242 · 2023-06-10
I would have downvoted your comment; while it's obviously well-intentioned and coming from a good place, it's also just off-topic noise. Sorry :-(
I've written an entire Stack Overflow rant on "a basic but valid question getting downvoted"[1] and this kind of stuff is one of the main reasons I no longer contribute there, so I do sympathize, but HN is not Stack Overflow; downvotes "mean" less here in the first place, and it doesn't seem to be a structural problem. I've asked plenty of basic questions over the years, and I've rarely been downvoted for it, and some of the replies have been very detailed and excellent.
At the end of the day it's impossible to get all thousands of people that can vote on HN to act reasonably, so sometimes unfair things happen. It is what it is.
[1]: https://www.arp242.net/stackoverflow.html
stevan · 2023-04-08
The following post [0] describes how to build static binaries even with cgo enabled:
GOOS= GOARCH= CGO_ENABLED=1 go build \
-tags osusergo,netgo,sqlite_omit_load_extension \
-ldflags="-extldflags=-static"
[0]: https://www.arp242.net/static-go.html
moderation · 2022-05-16
There are few things more complicated that YAML - https://www.arp242.net/yaml-config.html#its-pretty-complex
> YAML may seem ‘simple’ and ‘obvious’ when glancing at a basic example, but turns out it’s not. The YAML spec is 23,449 words; for comparison, TOML is 3,339 words, JSON is 1,969 words, and XML is 20,603 words.
Grafana Labs, Datadog's Vector, the Istio Service Mesh project, Dagger, sigstore, the SLSA framework all use CUE in some fashion. Dagger wrote a great blog post on CUE [0]
0. https://docs.dagger.io/1215/what-is-cue/
anderspitman · 2021-12-29
arp242 has an excellent post[0] about statically compiling sqlite for Go programs, which may be useful.
Isn't there some issue where SQLite basically has to be single-threaded in Golang programs, at least if you use the stdlib SQL library?
[0]: https://www.arp242.net/static-go.html
genghizkhan · 2021-05-27
The best one, of course, is Bret Devereaux's acoup (https://acoup.blog). It's the only one I follow with any regularity. It's a weekly blog focussing on history and sometimes on its interaction with popular media, like GoT or EU4.
Scott Galloway is also a great read. He writes about the digital economy and tech. (https://www.profgalloway.com/)
I also enjoy reading Martin Tournoij's blog whenever he updates it (https://www.arp242.net/). He's the author of goatcounter and writes about tech and sometimes certain social issues in tech.
Vedica Kant and Anmol Maini write about the Indian startup ecosystem at https://www.kuwi.news/ (it's a substack newsletter). I don't read it all the time but certain pieces are pretty good.
And, finally, to plug my own self, I write about health economics, health policy, and systems thinking at Hawk Radius (https://hawkradius.com)
IshKebab · 2020-01-30
For when ordinary YAML isn't quite crazy enough.
Worth reading this if you are considering using it: https://www.arp242.net/yaml-config.html
Carpetsmoker · 2019-04-30
I don't think writing is just about communicating things to other people. It's also communicating things to yourself.
I think the greatest value in writing things down is to order and articulate your own thoughts. Certainly in my own case, I never finish a large chunk of articles I start to write simply because during the research I find out I was wrong, or that things are more complex than I thought and I'm no longer sure I'm right.
See my personal website for a post I wrote about that :-) https://arp242.net/weblog/why-write.html
An additional reason is that publishing your thoughts also means people can point out flaws or points you hadn't considered. Maintaining a website is just one way of doing that of course (commenting here is another), but I find it's a pretty effective way.
otterpro · 2018-07-13
I didn't know about TOML until I started using Hugo. I've been using YAML and TOML and I find both have their merits, especially for their simplicity. TOML looks like the classic INI file, and is fairly easy to use/learn. I've been trying to move toward TOML for everything. YAML is nice, but I had to be careful about white-space significance and also translation of "YES","NO", etc.
https://arp242.net/weblog/yaml_probably_not_so_great_after_all.html
donatj · 2017-09-09
Every YAML parser I've ever used has been literal magnitudes slower than the slowest JSON parser. It's way too flexible a format.
> YAML may seem ‘simple’ and ‘obvious’ at a glance, but it’s actually not. The YAML spec is 23,449 words; for comparison, TOML is 838 words, JSON is 1,969 words, and XML is 20,603 words.
https://arp242.net/weblog/yaml_probably_not_so_great_after_all.html
onion2k · 2017-03-03
JSON doesn't have comments so it's a bad choice for human-editable config. YAML doesn't have an end marker so you can never be sure if you've got the entire file. XML is a huge pain to edit by hand if the schema is complicated, and overly verbose if it isn't. None of them are even close to being safe (for example https://arp242.net/weblog/yaml_probably_not_so_great_after_all.html). All of those choices fail your "elegance" test.
TOML is my preferred config file language option where I have a choice - https://github.com/toml-lang/toml - but I suspect that suffers a lot of the same problems.
kongin · 2021-08-31
>The terms "free software" and "open source" have a specific meaning in the software ecosystem. The former is defined by the Free Software Definition and the latter by the Open Source Definition, respectively published by the FSF and OSI. These definitions both require that the software is available for commercial use without restriction, among other things.
Problem: The OSI did not coin the term 'open source'. OSI partisans claim that Christine Peterson coined the term at a strategy meeting in Palo Alto on 3 February 1998. However, the term and the concept was well known prior to that. Martin Tournoij does a decent enough job of collecting prior citations [1] that go all the way back to 1990. All the OSI did was take an existing philosophy, scribble some new restrictions in crayon, and called it Open Source(tm)(c)(pat. pending).
Honestly, though, I do love it when this comes up. It gives me the opportunity to irk new guys telling them that Lyle Ball, head of public relations at Caldera, has an earlier citation than the OSI in the form of a press-release announcing Caldera OpenDOS[2][3]. :D
[1] https://www.arp242.net/open-source.html
[2] http://www.xent.com/FoRK-archive/fall96/0269.html
[3] http://ftp.uni-bayreuth.de/pc/caldera/OpenDOS.701/license.txt
https://news.ycombinator.com/item?id=26504021
EarlKing · 2021-03-18
> No, open source means the same thing it's always meant since the term was first coined. See the Open Source Initiative's Open Source Definition: https://opensource.org/osd.
Problem: The OSI did not coin the term 'open source'. OSI partisans claim that Christine Peterson coined the term at a strategy meeting in Palo Alto on 3 February 1998. However, the term and the concept was well known prior to that. Martin Tournoij does a decent enough job of collecting prior citations [1] that go all the way back to 1990. All the OSI did was take an existing philosophy, scribble some new restrictions in crayon, and called it Open Source(tm)(c)(pat. pending).
Honestly, though, I do love it when this comes up. It gives me the opportunity to irk new guys telling them that Lyle Ball, head of public relations at Caldera, has an earlier citation than the OSI in the form of a press-release announcing Caldera OpenDOS[2][3]. :D
[1] https://www.arp242.net/open-source.html
[2] http://www.xent.com/FoRK-archive/fall96/0269.html
[3] http://ftp.uni-bayreuth.de/pc/caldera/OpenDOS.701/license.txt
smt88 · 2020-06-25
Looks great! "Zapier for DevOps" would convey it a lot faster. It didn't click for me until I got to that part. I'm excited to try it out!
A couple things:
1) Please, please support some other config file other than just YAML. Even JSON would be an improvement, since you wouldn't have to change your config reader library. YAML has been a miserable nightmare to use in other tools like Open API Spec. I'm not alone in my YAML hate, either[1][2][3][4].
Implicit typing and semantic whitespace in a data file is insane. At least in Python, you're not unlikely to get an error if your whitespace is off. In a config file, you might just end up with dangerous/confusing behavior.
2) I'm surprised you used Relay, which is already used by Facebook. I don't think Facebook is going to care that much, but it's going to be really hard to Google this library.
1. https://dev.to/jessekphillips/stop-using-yaml-3kec
2. https://hitchdev.com/strictyaml/why/implicit-typing-removed/
3. https://devopsdays.org/events/2019-stockholm/program/philipp-krenn
4. https://www.arp242.net/yaml-config.html
derefr · 2019-04-13
There's a linked article discussing the shortcomings of YAML, as well: https://arp242.net/weblog/yaml_probably_not_so_great_after_all.html
Reading the two screeds together, though, I think the author has ignored one key idea of both JSON and YAML as formats: their use-cases are complementary, and the "problems" with each of these two formats only arises when you're using one for the use-case best suited to the other.
YAML's use-case is for human-written configuration. That's why it has so many weird ways to write things: to allow humans to write some data down in a way that works best to communicate said data to other humans, in a way that machines can coincidentally read. (See also: AppleScript.)
And that's also why YAML is "so powerful that it's basically inherently insecure." You shouldn't be executing untrusted YAML any more than you should be executing an untrusted bash script. YAML is a language for the deploying sysadmins of a piece of software to configure said software with; it's not a language for the tenants of a system to communicate their needs to the system with.
JSON's use-case is for building machine data generators and parsers in a distributed system (like the web) where it is very important that the data be easily introspected by humans, and that humans will also be able to modify or otherwise "poke at" said data, in flight, using simple text-based tools. But the intention isn't that humans will ever author JSON "at scale." JSON is like HTTP/1.0: it's…
smartmic · 2025-09-30
Martin Tournoi, the developer of GoatCounter, wrote an article explaining why he chose the EUPL licence for GoatCounter. It provides valuable insights and a useful comparison: https://www.arp242.net/license.html
orphea · 2025-02-24
Many people explained it better than I ever could, so let me defer to them. TL;DR: YAML is an overcomplicated spec with too many footguns.
- https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell
- https://www.arp242.net/yaml-config.html
- https://noyaml.com/ (couldn't not mention this famous piece)
subsection1h · 2024-12-09
> Email is not plain text any more. We can't pretend that it is or should be.
I send plain text emails and this is a hill I will die on. :-)
Do you not contribute to the development of any open-source projects that only accept patches via plain text emails sent to mailing lists (e.g., many GNU projects)?
Here's a tip for anyone who sends plain text emails, or wants to, and has to deal with annoying normies who complain about undesirable wrapping[1] when viewing plain text emails on mobile devices with small screens: configure your mail client to allow lines in emails to be up to 998 characters[2], which is longer than any paragraph you will likely write. I did this for my work email years ago.
[1] https://www.arp242.net/email-wrapping.html
[2] https://datatracker.ietf.org/doc/html/rfc5322#section-2.1.1
acatton · 2024-07-31
The secret with sqlite is to use "-tags sqlite_omit_load_extension", if you don't use any extension. (which is 99% of the users)
This is explained in https://www.arp242.net/static-go.html
fl0ki · 2023-08-08
Serious question though, why use "JSON" at all then? You can just admit it's JWCC, which is fine, at least that's a distinct term -- but even that's not a spec, it's just a blog post that very few people even know about. Even that same blog post endorses using TOML, the spec generally preferred for things that may need to be human-edited. It meets humans half-way a lot better than even JWCC, which is the kind of practicality I think even Grug would prefer.
https://nigeltao.github.io/blog/2021/json-with-commas-comments.html#wh…
And while we're at it:
https://www.arp242.net/json-config.html
https://dzone.com/articles/why-json-isnt-a-good-configuration-language
https://revelry.co/insights/development/json-configuration-file-format…
ewan-mclean · 2023-08-04
Did anyone claim that it was `Free Software`?
Does anyone ever claim that they're trying to release free-software but not FSF free-software?
I think the issue is that the opposite of `closed-source` is clearly not `OSI Approved License(tm) open-source`.
If had the influence they like to claim with their "we invented the term open-source" myth, why don't they go invent some term for "non-closed source, non-OSI approved license(tm)" software, and everyone will use that.
BTW, here's a handy list of uses of `open-source` going back to 1985...
Seems that the term was already in existence, I guess that's why the OSI's attempt at "open-source(tm)" went down in flames...
https://www.arp242.net/open-source.html#pre-1998-usage
jjulius · 2023-07-12
>If you don't want to come off as an idiot, then don't act like an idiot.
So much for empathy[0], huh?
[0]https://www.arp242.net/empathy.html
chrisseaton · 2021-12-19
> The “open source” label was created at a strategy session held on February 3rd, 1998
You can see the term gaining popularity prior to 3 Feb 1998, and there are references to for example BSD being 'open source' as far back as 1990.
https://books.google.com/ngrams/graph?content=open+source%2Copen-sourc…
Via https://www.arp242.net/open-source.html.
Zababa · 2021-11-29
> no cgo
If you're not careful, you will use c code when using os/user and net according to https://www.arp242.net/static-go.html.
rhn_mk1 · 2021-11-28
Sure did:
> Each line of characters MUST be no more than
998 characters, and SHOULD be no more than 78 characters, excluding
the CRLF.
https://datatracker.ietf.org/doc/html/rfc5322#section-2.1.1
https://www.arp242.net/email-wrapping.html
cormacrelf · 2021-09-14
> It seems like it adds significant complexity over YAML to mitigate abuse of YAML
On the complexity axis I think you're talking about, yes, having clear scopes and no ambiguity about whether something is a string means there are more bits of syntax to type, but I don't think that adds complexity. JSON has more curly braces and quotes but it is a much simpler and much more reliable format than YAML. KDL is the same.
KDL does not "add significant complexity over YAML" in really any sense. The KDL specification is 1/10th the size of YAML's. Being extraordinarily complex and impossible to fully implement is is what YAML is famous for.[0] Asking people to do a better job writing YAML is a tough ask when even computers can barely do it correctly.
[0]: https://www.arp242.net/yaml-config.html
lukevp · 2021-09-04
There is debate on whether this is really a security concern.
[0] https://www.arp242.net/curl-to-sh.html
[1] https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verifie…