News for hackers. Stuff that matters.
Re:C’s Biggest Mistake (2009) by konjin on Saturday September 12, 2020 @10:05PM (#24457589)
It's been 11 years, and C is running on more hardware than it ever has before, viz every android device.

By what measure would C be losing ground?

Re:C’s Biggest Mistake (2009) by xmprt on Saturday September 12, 2020 @10:33PM (#24457723)
Is the number of devices that C is running on a good metric? I think the number of developers or number of projects using C makes more sense to track. And then get the market share. If there are 10x more devices today than 10 years ago then I'd sure hope C was running on more devices but anything less than 10x means C is losing ground.
Re:C’s Biggest Mistake (2009) by pjmlp on Sunday September 13, 2020 @02:34AM (#24458877)
The pyrrhic victory, other than the Linux kernel, everything else is a mix of C++ and Java, with a native compiler written in C++.

And the history of Linux kernel and Android might come to an end if Zirkon ever replaces it, then it will be no more C on Android.

Re:C’s Biggest Mistake (2009) by konjin on Sunday September 13, 2020 @04:08AM (#24459294)
[[citation needed]]
Re:C’s Biggest Mistake (2009) by pjmlp on Sunday September 13, 2020 @05:00AM (#24459481)
Citations for what?

Android and Fuchsia source code are public available, just as their code reviews and ongoing work to port ART to Fuchsia.

Anyone skilful to use C without creating CVEs of their own, is surely able to find that information.

Re:C’s Biggest Mistake (2009) by giancarlostoro on Saturday September 12, 2020 @11:56PM (#24458188)
> By what measure would C be losing ground?

When we start seeing Rust or similar being used instead of C would be a good metric and / or major OS development.

Re:C’s Biggest Mistake (2009) by AlphaSite on Sunday September 13, 2020 @04:11AM (#24459313)
Linux is currently investigating using Rust in drivers (The main issue being lack of compiler support for the more isoteric architectures).
Re:C’s Biggest Mistake (2009) by YeGoblynQueenne on Sunday September 13, 2020 @08:09AM (#24460302)
Thank you for the new knowledge that "eso" is pronounced similar to "iso" in some dialects of English, I didn't know that.

However, the word "isoteric" is more correctly spelled (in non-phonetic spelling) as esoteric. The prefix "eso-" means "inside" in Greek, as in "esothermic", or "esophagus". The prefix "iso-" means "equal", as in "isomorphism", "isosceles", "isometric", etc.

Re:C’s Biggest Mistake (2009) by hanche on Sunday September 13, 2020 @08:56AM (#24460550)
Maybe dial back the sarcasm a notch or two?
Re:C’s Biggest Mistake (2009) by YeGoblynQueenne on Sunday September 13, 2020 @12:30PM (#24461942)
Many apologies - I was not being sarcastic and I'm sorry that this is how my comment came across. As chongli says I'm a native speaker of Greek and I really didn't know how "eso" is pronounced by native English speakers. I've lived for 15 years in the UK and I'm still surprised to hear how people pronounce the more obscure words in their language (some of which come from Greek).
Re:C’s Biggest Mistake (2009) by hanche on Sunday September 13, 2020 @03:48PM (#24463415)
Oops, sorry, I apologise for the mistake. I have seen too much bad behaviour on the 'net, so naturally I assumed the worst. It's a valuable lesson at the modest cost of a few karma points. (I guess I violated HN guidelines too, there. Good thing I don't have the power to downvote yet. I might have done so, and never discovered my mistake.)
Re:C’s Biggest Mistake (2009) by YeGoblynQueenne on Monday September 14, 2020 @01:40AM (#24467139)
Hey, it's OK, no need to apologise. Sorry I caused you to be downvoted.
Re:C’s Biggest Mistake (2009) by hanche on Monday September 14, 2020 @05:47AM (#24468385)
You didn't cause the downvote. Really. But in any case, there are more important things in the world than HN karma. And keep up your Greek lessons. That's one language I'd love to learn, if only I had the time. But I understand it is fiendishly difficult for non-native speakers. (Source: Greek to Me: Adventures of the Comma Queen by Mary Norris.)
Re:C’s Biggest Mistake (2009) by chongli on Sunday September 13, 2020 @11:05AM (#24461301)
I’m pretty sure they’re a native speaker of Greek, given their name on GitHub.
Re:C’s Biggest Mistake (2009) by extempore on Sunday September 13, 2020 @10:39AM (#24461151)
He wasn’t being sarcastic.
Re:C’s Biggest Mistake (2009) by YeGoblynQueenne on Sunday September 13, 2020 @12:30PM (#24461950)
He, who? :)
Re:C’s Biggest Mistake (2009) by pjmlp on Sunday September 13, 2020 @02:36AM (#24458884)
Like C++ on Windows, Arduino, ARM mbed, macOS,...
Re:C’s Biggest Mistake (2009) by mytherin on Sunday September 13, 2020 @05:46AM (#24459671)
The same is likely true of Fortran, since Fortran code is shipped around with several Python data science libraries and included in R. Does that mean Fortran is a thriving language, or does it just mean Fortran was used a long time ago to write some important libraries that are now hard to get rid of?
Re:C’s Biggest Mistake (2009) by pjmlp on Sunday September 13, 2020 @07:06AM (#24460043)
Except Fortran 2018 is quite modern, supports modules, generics, and even OOP, first class support on CUDA alongside C++, whereas C18 hardly changed since C89 besides some cosmetic stuff and it is as secure as when it got used to rewrite UNIX in the early 70s.
Re:C’s Biggest Mistake (2009) by estebank on Sunday September 13, 2020 @01:18PM (#24462368)
It could be argued though that less usage means fewer stake holders to convince of the need for specific changes to the language, which helps with increased evolution. (I have only cursory knowledge of what's happening in C and none about what's happening in Pascal nowadays, just pointing out that being a smaller community might ironically help the language).
Re:C’s Biggest Mistake (2009) by munificent on Saturday September 12, 2020 @11:21PM (#24458009)
The relevant metric would be what fraction of hardware it's running on.
Re:C’s Biggest Mistake (2009) by konjin on Saturday September 12, 2020 @11:31PM (#24458056)
Literally all of it.
Re:C’s Biggest Mistake (2009) by raverbashing on Sunday September 13, 2020 @02:03AM (#24458760)
By number of new projects using it (without counting legacy code)

Nobody would do a project in C today with Go/Rust/C++ etc unless it's for a very specific situation

Re:C’s Biggest Mistake (2009) by the_hoser on Sunday September 13, 2020 @02:49AM (#24458933)
Careful with generalizations like that. You're forgetting the most important reason anyone uses a language:

It's the one they know.

A C programmer isn't automatically going to switch to Rust for new projects that they would use C for, unless their goal is to use Rust.

Re:C’s Biggest Mistake (2009) by tonyarkles on Sunday September 13, 2020 @07:37PM (#24464870)
Lol C programmer since 1994 here... just started a Rust project with the specific goal of learning Rust. The project itself is just to scratch my own itch. I’d honestly probably write it in Python if I didn’t want to see what Rust was all about :)
Re:C’s Biggest Mistake (2009) by baylessj on Monday September 14, 2020 @11:32AM (#24471358)
C is also used a lot in embedded environments where the hardware won't support languages with a larger footprint. Quite common in my line of work.
Re:C’s Biggest Mistake (2009) by ayende on Sunday September 13, 2020 @05:44AM (#24459659)
I started a project this year, I write it in C.
Re:C’s Biggest Mistake (2009) by sriku on Sunday September 13, 2020 @12:42AM (#24458425)
C doesn't "run on hardware" .. unless you're talking interpreted C. Of course compiled machine code is running on more hardware but that's just a truism.

The question is are people using C to program these hardware more? .. or are people gravitating towards safer compiled languages (Rust?). That's a valid question, even if the answer is "no C's usage is only increasing."

Re:C’s Biggest Mistake (2009) by saagarjha on Sunday September 13, 2020 @05:45AM (#24459667)
You’re being pedantic to the point of being actively misleading.