5 ms·
The concept that your protocol is defined by a "reference implementation" and not a well-written specification is moronic. Someone should be able to articulate
by someguydave 10y ago
The concept that your protocol is defined by a "reference implementation" and not a well-written specification is moronic. Someone should be able to articulate unambiguously (with words) what the NTP protocol is and what it does.
- unethical_ban 10y agoThat's how the majority of software on the internet is written, including Python and Ruby for much of their time.
- gcp 10y agoWould people claim that Python and Ruby have "specifications", though?
- steveklabnik 10y agoRuby at least has an ISO standard; it's not exactly current with today's Ruby, though.
- someguydave 10y ago>That's how the majority of software on the internet is written This is true but serves as an indictment of that software, not the concept of clear specification.
- phicoh 10y agoWhere did you get the idea that NTP is defined by a 'reference implementation'? Going back to 1988, Dave Mills has been documenting the NTP protocol. https://tools.ietf.org/html/rfc1059 https://tools.ietf.org/html/rfc1059 (Personally I don't think that's the best way to do time synchronisation, but it is fully documented, measured, etc.)
- someguydave 10y ago>Where did you get the idea that NTP is defined by a 'reference implementation'? The article and many comments here indicate that they believe NTPd is a "reference implementation". What does that mean other than "specifies behavior"? If it instead means "Here's an example, it might do what the specification says or not" then it's not really a "reference" - the specification is.
- coldtea 10y ago>What does that mean other than "specifies behavior"? That it's the implementation that a) everyone uses, and b) actually supports the whole spec.
- eridius 10y agoThe reference implementation serves 3 purposes: 1) It implements the whole thing, so it can be used as-is. 2) It serves as a reference for any questions that are unanswered by the spec. Yes, specs should ideally answer all questions themselves, but there has not been a spec written yet that does not have at least one unanswered question somewhere. 3) It serves as a way to test new implementations, because you can see if your new implementation is compatible with the reference implementation. If not, then you probably screwed something up somewhere.
- nickpsecurity 10y agoThat's why most attempts to give a formal semantics to various standards or protocols find errors in them. This has happened repeatedly going back decades. You'd think more parties would take note to do at least a minimal, formal spec. The tooling is better than ever now.
- someguydave 10y agoAgreed. Notice how another child comment was down-voted and there's whining in the responses about how hard it would be to write unambiguous specification. The idea that you could write a "reference implementation" that "proves your implementation meets the specification if it interoperates with the reference" is silly. Unfortunately most people find it "exciting fun" to "just write code" and "boring work" to carefully consider exactly the behavior of their software in all conditions.
- mcguire 10y agoYes and no. (As an aside, have you ever tried to articulate unambiguously, with words, a complex technical topic, such as the design for a network protocol?) On the one hand, NTP is defined by an IETF RFC (https://www.ietf.org/rfc/rfc5905.txt https://www.ietf.org/rfc/rfc5905.txt, version 4), using words, diagrams, and some code. The traditional RFC standards process requires two interoperating implementations for standards-track work. A reference implementation usually aims to be one of them, implementing the whole protocol, including features that are not needed in all use-cases. The reason for this is that it is easy to specify something that cannot be implemented, well or at all, and for the spec to be ambiguous so that different implementations do not work together. The reference implementation also acts as a pseudo-formal-specification, in that it is more formal than the English language version and its behavior can be compared with what the spec writers intended.