News for hackers. Stuff that matters.
Re:Aaron Swartz's Thoughts on djb (2009) by joosters on Friday March 06, 2015 @02:43AM (#9156030)
If only djb's programs would write human-readable log files...
Re:Aaron Swartz's Thoughts on djb (2009) by drinchev on Friday March 06, 2015 @03:39AM (#9156180)
If you are talking about the date, it's documented how to parse it :

> cat current | tai64nlocal

Re:Aaron Swartz's Thoughts on djb (2009) by lazyjones on Friday March 06, 2015 @08:25AM (#9156850)
Since we're talking about good programming here, I have to mention this:

https://en.wikipedia.org/wiki/Cat_(Unix)#Useless_use_of_cat

Re:Aaron Swartz's Thoughts on djb (2009) by joosters on Friday March 06, 2015 @04:05AM (#9156249)
Yes, it's the damn date. It doesn't matter how well documented it is, once you have to apply a conversion to logfiles before they can be easily read, you lose all your existing workflow. It becomes a pain to use.

I never understood djb's aversion to using human-readable dates in the log files. It's not a lot of effort for the computer to produce or to consume them, so we really should push the effort onto the computer, and not onto the user.

Re:Aaron Swartz's Thoughts on djb (2009) by riobard on Friday March 06, 2015 @07:18AM (#9156677)

    1. push the effort onto the computer
    2. complexity increases
    3. more bugs
Given the number of bugs dealing with human-friendly date so far, it's not hard to predict which way djb prefers. Besides, it's just a logfile, not a calendar. The need for human-friendly date is probably overrated in this case.
Re:Aaron Swartz's Thoughts on djb (2009) by drinchev on Friday March 06, 2015 @04:40AM (#9156332)
Yeah djb's way suggest we use TAI time format, because it's more accurate. Anyway I haven't found this to be so big of a hassle for me. And it sounds really cool what it's doing :

> The standard timestamp used in "the djb way" is TAI, for Temps Atomique Internationale. It is an absolute measure of elapsed time based on the decay of cesium atoms, where one day is equivalent to exactly 86,400 TAI seconds.

> But the actual rotation of the Earth does not exactly conform to the TAI idea of time. In fact the Earth is slowing down a little bit, so that each physical day is minutely more than 86,400 TAI seconds.

> Our human notion of time is based on this physical day length, and is represented by the UTC timeclock. The UTC timeclock is intended to represent a clock that points exactly 12:00 noon when the Sun is directly overhead on the solstice at 0 degrees longitude.

http://thedjbway.b0llix.net/leapsecs_update.html

Re:Aaron Swartz's Thoughts on djb (2009) by MichaelGG on Friday March 06, 2015 @09:52AM (#9157206)
Yes, leap seconds are an abomination and something that should only exist for odd use cases, like astronomers or something. Forcing UTC into all software and civil use is vile. Hopefully UTC will stop getting leap seconds, or we'll move to something like UTC with no further leap seconds.
Re:Aaron Swartz's Thoughts on djb (2009) by edwintorok on Friday March 06, 2015 @10:21AM (#9157391)
Yeah there should be a decision on that this year: http://www.ucolick.org/~sla/leapsecs/
Re:Aaron Swartz's Thoughts on djb (2009) by simtel20 on Friday March 06, 2015 @01:07PM (#9158463)
The aversion to human-readable timestamps is that he's using TAI to encode the timestamp so you don't e.g. get human-readable timestamps that have the same second twice after a leap second because the format is unambiguous in this regard.
Re:Aaron Swartz's Thoughts on djb (2009) by otterley on Friday March 06, 2015 @11:07AM (#9157724)
The programs themselves log clearly. multilog -- the log sink that handles timestamping and rotation -- does that, but you're not required to use it.

In many cases, I exec logger(1) instead as my log sink, which will emit logs to syslog, or a homegrown replacement that can handle lines longer than 8192 bytes.