News for hackers. Stuff that matters.
Re:Why Is SQLite Coded in C? (2017) by imtringued on Wednesday March 14, 2018 @01:05PM (#16586290)
>It's not wise to suggest that everything written in C must be re-written in some other language because of hand-waving reasons like buffer-overflows or off-by-one errors.

These security vulnerabilities are trivial to fix at the language level but cause extremely negative consequences if exploited successfully. Yet the default stance of C programmers is to not adress them at all. A competitor like Rust absolutely becomes necessary because of the complacency of C programmers. They will then will strongly critizise the newcomer that is built on strong fundamentals as "language of the week" that is chosen by "dumber programmers" that are trying to ride the latest hype train.

Re:Why Is SQLite Coded in C? (2017) by agentultra on Thursday March 15, 2018 @12:37AM (#16590430)
Ignoring your comments about other programmers...

Engineering is trade offs. I think the SQLite programmers are well aware of the risk the use of C brings in the context of security vulnerabilities. Given the statistics collected here: https://www.cvedetails.com/vendor/9237/Sqlite.html it seems that their choice of C was not a security disaster, because C. It actually seems well within a risk tolerance threshold that I don't sleep uneasy at night recommending its use in systems. If their choice of language came with unavoidable vulnerabilities I'd expect those statistics to be much worse.

So what does a Rust implementation of SQLite offer anyone? That within 8 years there may be one less SQL injection attack or perhaps < 4 overflow vulnerabilities? Will it have better interoperability or performance than SQLite does now or will have once this new version is done? Will the market care?

I'm not saying that care shouldn't given when choosing to use C in a greenfield project today. I am saying that for many problem domains the risks associated with C are tolerable given a well trained, disciplined team.

And I doubt there's much of a market for an in-memory database system that is going to be feature compatible with SQLite in a few years that is also as performant as SQLite and can deployed on as many platforms. But that's just a prediction... maybe I'm wrong.

I've chosen Haskell on a greenfield project recently for many of the safety guarantees it brings... who knows?

Re:Why Is SQLite Coded in C? (2017) by jmull on Wednesday March 14, 2018 @03:46PM (#16587683)
You're making some mistakes here.

If the problem is complacent programmers, switching languages is going to have no effect.

You're also making blanket statements about the attitudes of C programmers which have nothing to do with the C language. That probably means your generalizations are overly broad and not true, not even for a significant fraction of C programmers.

I think you need to use some logic to argue your point, not wild claims.

Re:Why Is SQLite Coded in C? (2017) by irundebian on Wednesday March 14, 2018 @08:58PM (#16589704)
There is no need for arguments here. C leads to vulnerabilities. That's self-evident. See ISO/IEC TR 24772:2013 for more information.
Re:Why Is SQLite Coded in C? (2017) by tekknik on Friday March 16, 2018 @10:19AM (#16600806)
printf(“hello, world!”);

Please, find the vulnerability in that code, or quit making wild claims

Re:Why Is SQLite Coded in C? (2017) by irundebian on Friday March 16, 2018 @05:05PM (#16604012)
Besides the fact that your code doesn't compile, I would argue that you should deliver real world examples to assess and then comparing it to alternativ solution.

I know, theoretically it's possible to write secure code. Even in C. Experience showed, that 99,999% of people aren't able to do that. And many reasons have its origin in the design of this bad language.