Refclocks and formatting
ianbruene at gmail.com
Sun Apr 23 15:41:13 UTC 2017
I should have mentioned this in the devlist, but I keep forgetting that
you aren't getting updates from bug #263. My question was based on a
misunderstanding of the code: I thought that all of the formatting for
refclocks was happening in statustoa, when it is actually just a single
Incidentally, overfocusing on the first path that becomes apparent is a
good first candidate for "You'll find [other failure modes], and have to
train your own way out of them.".
On 04/23/2017 07:27 AM, Eric S. Raymond wrote:
> Well spotted. The truth is, this split is a historical hangover from
> the sequence in which I wrote the Python tools - there's nothing
> principled about it at all. I wrote the extension early; afterwards
> I figured out how to mechanically generate the required #defines into
> control.py and the need for ntp.ntpc.statustoa went away.
I suspected something the sort, I knew that control.py was generated at
build time and was going to suggest that this could be done to eliminate
> If you want to clean this up, go right ahead. I think it would be a
> good way for you to get your fingers into the C code, with a simple
I'll take a look at it, in /theory/ it should be an easy swap.
This would also be a good propaganda case: "Look here! This is how
efficient Python is; a noob can write code smaller, and by extension
with fewer bug receptors, than the same code written in C by an expert".
It would apply both in general, and also when trying to sell people on
In the end; what separates a Man, from a Slave? Money? Power?
No. A Man Chooses, a Slave Obeys. -- Andrew Ryan
More information about the devel