News for hackers. Stuff that matters.
Re:2038: Only 21 years away by mikeash on Tuesday March 21, 2017 @12:24PM (#13923712)
If you told the original UNIX developers that there was even the slightest chance their system might still be in use in 2038, they probably would have called in some large, friendly men in white coats to haul you away.

Add to that the fact that memory was very much not cheap at the time. Memory for the PDP-7 (the first computer to run UNIX) cost $12,000-20,000 for 4kB of memory. In 1965 dollars. In 2017 terms, that means that wasting four bytes had an amortized cost of three hundred to six hundred dollars. And that's for each instance of the type in memory.

Re:2038: Only 21 years away by cookiecaper on Tuesday March 21, 2017 @01:10PM (#13924136)
Ironically, there's actually a chance UNIX wouldn't have been in use in 2038, or any time at all, if its designers had insisted on a costly future-proofing like using a 64-bit time type. As you've highlighted, wasting memory like that is a costly proposition, and it would've been an easy black mark when compared against a competing system that "uses less memory".

I think the developers made the right choice.

Re:2038: Only 21 years away by legulere on Tuesday March 21, 2017 @01:38PM (#13924413)
The year 2038 problem is actually younger than unix.

The first definition was 60th of seconds since 1970-01-01T00:00:00.00 stored in two words (note that a word is 18 bit on a PDP-7!). That definition was later changed.

Also Linus could have defined `time_t` to be 64 bit when he started linux.

https://en.wikipedia.org/wiki/Unix_time#History

http://aaroncrane.co.uk/2008/02/unix_time/

Re:2038: Only 21 years away by smsm42 on Tuesday March 21, 2017 @04:33PM (#13925968)
I'm not even sure there was a standard 64-bit type for C in 1991... Or how well compiles on PC would support that.
Re:2038: Only 21 years away by caf on Tuesday March 21, 2017 @07:50PM (#13927379)
There wasn't - the largest minimum integer size from C90 (ANSI C) was long, with at least 32 bits. "long long" was agreed upon at an informal summit in 1992 as an extension 64 bit type on 32 bit systems until it was standardised in C99 (but already existed in several compilers at that point, including GCC).

So GCC may have had 'long long' already when Linus started working on Linux.

Re:2038: Only 21 years away by gravypod on Tuesday March 21, 2017 @07:51PM (#13927385)
Well when you're the only person/people using C you can get anything through the compiler committee very quickly.
Re:2038: Only 21 years away by jonstewart on Tuesday March 21, 2017 @01:15PM (#13924181)
I really think society must expend every effort to keep Ken Thompson alive until the end of the epoch.
Re:2038: Only 21 years away by ufo on Tuesday March 21, 2017 @07:38PM (#13927305)
Wouldn't it actually be 10 to 20 dollars per instance instead of hundreds of dollars?
Re:2038: Only 21 years away by mikeash on Tuesday March 21, 2017 @08:09PM (#13927483)
$10-20 would be the raw cost at the time, not accounting for inflation. I think I double-counted the four bytes, because in 2017 dollars it would be about $80-160, not $300+.