Forgot your password?
typodupeerror

Comment Re:What's the motivation? (Score 3, Interesting) 181

Montreal and Toronto do get around 26% more sunlight than London, in terms of hours per year, but London doesn't really have winter either. They don't get 85 inches of snow per year like Montreal.

Canada's power already comes from renewables as a strict majority: 57.4% from hydro, 9.1% from other renewables. For the clean-but-non-renewables, you've got nuclear at 13.5%. The vast majority of the rest is natural gas. But hydro can be difficult and expensive to expand (even if it's cheap in the long-run), and many renewables other than hydro struggle to serve base-load applications.

Comment Re:The purpose of a factory is not to provide jobs (Score 4, Insightful) 195

The purpose of a factory is not to provide jobs.

It's intended to made widgets that can then be sold at a profit.

It's not a social welfare program.

The way things are headed, the only way people are going to be able to obtain money to pay for those widgets is via social welfare programs.

Comment Re: strncpy never made sense (Score 3, Insightful) 40

strncpy() was not intended for null-terminated strings at all. It should have been named copy_null_padded_buffer(). Then its operation would have made sense to almost anyone. People wouldn't have minded the longer name much either, because hardly anybody uses null-padded buffers in modern software.

Note that a null-padded buffer that is completely full doesn't have any nulls in it at all. That's why strncpy() doesn't necessarily add a null termination. It also fills the entire destination buffer with nulls after the end of a short copy, which can be very inefficient when used with null-terminated strings.

TL;DR: don't use strncpy(). It doesn't do what anybody thinks it does.

Slashdot Top Deals

Business will be either better or worse. -- Calvin Coolidge

Working...