💾 Archived View for thelambdalab.xyz › phlog › 2019-06-17-Too-much-magic.txt captured on 2020-09-24 at 02:48:28.
⬅️ Previous capture (2020-09-24)
-=-=-=-=-=-=-
Too much magic -------------- I just wanted to quickly chime in and say that (for what it's worth) I completely agree with solderpunk's ideas [1-3] for a possible new protocol and assessment of where the current one falls short. Not that I want the existing protocol to go away (definitely not!), but it's fun to think about what things would be like in the best of all possible universes and it's useful to try to make explicit some of the problems with the current one. One of the things that I take away from these posts is that while the current protocol seems simple, part of the reason for this is that it relies on clients doing magic: i.e. performing inference to make educated guesses about what's being served, whether it be the MIME type of the content or character encodings. While I'm new to gopher, I'm pretty old to programming, and I've always regarded even a little bit of magic to be too much magic when it comes to parsing input. Magic never works deterministically and when it inevitably fails it can be very hard to work out why. Part of the reason for this is that the better the inference code is (i.e. the more corner cases it handles) the harder it becomes to reason about, so we always wind up with a trade-off. And at the end of the day we have software whose parsing behaviour is not defined by the input format, which is a bad thing for everybody. (See LANGSEC [4].) I don't think it was mentioned in solderpunk's posts, but for gopher this isn't confined to the client software either. The fact that the server doesn't know what type of selector the client is expecting to see makes it impossible to send back sensible error messages when the selector isn't found. (Again, not without magic on either the client or server side.) Being able to include a MIME type tag in the response would immediately solve this too. So: while I hope and am sure that RFC 1436 will never go away, I'm happy about the direction these thought experiments are taking. I love magic, just not in my parsers if possible. :-) -- [1]: gopher://zaibatsu.circumlunar.space/0/~solderpunk/phlog/protocol-pondering-intensifies.txt [2]: gopher://zaibatsu.circumlunar.space/0/~solderpunk/phlog/protocol-pondering-intensifies-ii.txt [3]: gopher://zaibatsu.circumlunar.space/0/~solderpunk/phlog/protocol-pondering-intensifies-iii.txt [4]: http://langsec.org