Become a fan of Slashdot on Facebook


Forgot your password?
Compare cell phone plans using Wirefly's innovative plan comparison tool ×

Comment Re:problems, lol (Score 2) 102

Flawed logic. C++ doesn't have a corporate sponsor either, and yet it has a native compiler on Windows.

Multiple vendors pay good money to develop compliant C++ compilers for many of the platforms that we use.

The two main challenges I see for C are the competition with C++ and faster hardware.

Most "C compilers" are actually C++ compilers running in a "C mode". The trouble is that most of the corporate sponsors care more about being compliant with the latest C++ standard than being compliant with the latest C standard.

And because C++ is slightly more typesafe (strict aliasing), those optimizers can do more for C++ code than for C. So despite the more complex language, C++ can be marginally faster (~1%).

Probably not even that. In the tiny number of cases where strict aliasing buys you anything at all (which on modern out-of-order hardware it almost never does), it's around the same order of magnitude as the performance that you lose in C++ due to maintaining exception handling information. There's really nothing between C and C++ given the same code these days. In practice, most of the performance gains in C++ come from metaprogramming.

Which gets us to the faster hardware: how often is that performance even needed?

For the vast majority of "embedded" devices that I own, the main performance impact isn't CPU speed, it's battery life. A program which gets its job done as quickly as possible and then puts the CPU into an idle state is far more desirable than one which is perceptually just as responsive but wears down the battery faster.

Comment Re:problems, lol (Score 1) 102

Or, you know. You could actually learn how to write good code at the most powerful level. That's a radical thought.

I did, and that's why I'm using Python. I'm capable of writing web services in C, but who the hell's got time for that craziness? Also consider Amdahl's Law: in most of stuff I write, the "running code to process data" bit is a teensy portion of wall clock time. Much more is spent in socket handshaking or waiting for database queries to finish. Out of a 50ms request lifecycle, perhaps 1ms is spent inside a box that I have complete control of. Even if I rewrote it in assembler (C is for high-level pansies) to be 1000x faster, the request would still take 49.001ms. An assload of work porting security-sensitive code into an untyped languages so that the end result can be 2% faster? Yeah, no. My boss would fire me with a quickness if I proposed that.

I'd be much more likely to rewrite performance-critical code in Go or Rust. They're as fast as C but without the death of a thousand cuts like gotofail waiting to ruin your careful planning. Life's too short to waste it hacking in languages that hate you and make you want to look incompetent.

Comment Re:It's not a popularity contest (Score 2) 102

if I want something to run on most Linux distributions, as well as the BSDs with minor modifications, C is the obvious choice

Well, C++ could make that same claim, as well as many other languages. In fact, some are arguably much *better* at cross-platform functionality.

I think where C shines is that it's sort of a "common denominator" language. Just about every language (C++ included) can make use of a C library, or with minimal effort can create hooks into it, like with C#, Objective-C, Lua, or dozens of other languages that rely on low-level code for lots of their functionality. It's also a reasonably simple language, rather easy to wrap your head around (if written well), and is straightforward to learn, with power enough to get close to the metal when needed. So, if you write some code in C, just about anyone else can use it, even if they have to write a bit of "glue" first.

That makes it a hell of a pragmatic choice for many projects, even considering C's more problematic aspects.

Comment Re:Next Phase (Score 1) 399

So you think the 1.7 billion that Burnie Madoff defrauded people out of, and then had seized by the FBI [...]

That is a fair point, and it does go to the fact that we don't measure these things well. That $1.7 billion was a technically a "seizure", but it was actually a settlement with JPMorgan Chase. A fairer comparison would only count assets seized without an accompanying criminal conviction.

Still, the mere fact that they're in the same ballpark is a problem. Where I live, non-contraband assets may be frozen prior to a conviction, but they may not be seized until after.

Comment Re:Unsustainable pricing on high tech gadgets (Score 1) 93

It doesn't cost $800 to manufacture an iPhone. More like $100. In the US it would maybe be $150. It is Apples greed that is the blame.

There are always lines around the block on launch day. People cheerfully buy tens of millions of each iPhone. If people are willing to pay that price without a gun to their head, and there are alternatives that they could buy instead but they choose to buy iPhones anyway, how do you justify describing it as greed?

Submission + - Québec politician vows to nationalize internet (

Pig Hogger writes: Québec (Canada) official opposition Parti-Québécois leadership candidate Martine Ouellet says that she would nationalize ISPs if they fail to be able to deliver consistent high-speed (in the gigabit range) for an affordable price.
It is, however, doubtful that they would be able to achieve this, because in Canada, telecommunications are solely regulated by the federal government.
But, nevertheless, it’s a good acknowledgement that Internet is being recognized as a necessity.

Submission + - Lightning blamed for deaths of 300 reindeer (

mi writes: More than 300 wild reindeer were recently killed by lightning at a Norwegian national park, officials say.

The Norwegian Environment Agency has released haunting images of reindeer — including women and children — that seemingly fell over where they stood in the grasses of Hardangervidda, the largest high mountain plateau in northern Europe.

Submission + - CNN removes "Crooked" from Trump's tweet about Hillary (

mi writes: Whether or not you share Mister Trump's opinion on Senator Clinton's corruption, you probably agree, that, when a news organization purports to quote someone, the quote sall be unaltered. Even when the change is simply to improve grammar, journalism rules advise against it...

Well, on Sunday CNN published Trump's challenge to "Crooked Hillary" to share their health records with voters together — without the "Crooked" part.

Comment Re:WTF Profits (Score 4, Insightful) 270

People say "profits" a lot. They try to ignore that prices don't follow inflation, and that costs are real.

The long and short of it is, somewhere behind the opaque shroud, Apple goes from selling the last-model iPhone at a 10% profit to selling it at a 10% loss. What's probably actually happening is people just aren't interested in spending on a new phone now, and will take a low-cost phone at a bargain. Apple can't cut the current-model back to that cost, and can't even get the old-model down that low, and so is trying to hit prices that the consumer will pay by cutting costs back.

In other words: the "cutting into profits" is more like "losing business, and facing extinction." Apple isn't going to die out today; they know that if they can't keep their phones in the consumer market, they're going to die out in a decade, maybe. Strategic executives actually look way ahead and try to minimize the likelihood of such an outcome.

You're talking about a 20% mark-up, and you've managed to ignore that Apple will take a 10% mark-up but the consumer won't pay $600 for a $550 phone. If Apple wants to sell a phone like that in a market of $350 full-featured phones, it needs its Chinese manufacturers to deliver a $350 phone that it can *maybe* mark up to $400 as a premium option.

At the base, this happens when competitors are offering top-of-the-line technology at the break-out price point. 10% more for 10% more feature, until you're suddenly paying 50% more for 10% more feature; you stop just at that point, and now your next competitor can only offer a better product at 1.5 times the price. Yours might cost $400, but their barely-any-better gadget now costs $600. Even if most of your market is in mid-tier $250-$300 phones, your major competitor can't distinguish themselves as a better product without a distinguished price point: to stand apart in features, you must stand apart in price.

This is a common strategy for other reasons. You release a low, mid-tier, and high-end flagship product; then the customer sees that the mid-tier product is much cheaper than the top-tier product but almost as good, and buys the mid-tier product due to its excellent value. Without the top-tier product, they make a more price-conscious decision, determining their need rather than bare purchasing efficiency. What I've described is an extension: you ensure that the high-end flagship product of distinction is someone else's, and that it's *very* expensive by way of making the most-expensive *reasonable* product on the market yourself. Maybe nobody buys your Galaxy S7; but they're sure as hell not going to spend twice as much on a fucking iPhone.

Apple has the extra disadvantage of not selling a mid-tier product; they sell the iPhone 5 currently, which broadcasts loudly that it's an out-of-date product because it was the premier product four years ago. If it was called the iPhone 7n (new budget offering), people would perceive it as a modern, budget-friendly phone without all the bells and whistles.

Slashdot Top Deals

Real Programs don't use shared text. Otherwise, how can they use functions for scratch space after they are finished calling them?