News for hackers. Stuff that matters.
Re:Why Is SQLite Coded in C? (2017) by pcwalton on Wednesday March 14, 2018 @12:52PM (#16586157)
I agree. SQLite gets away with using C because it literally uses military-grade levels of verification. As John Regehr pointed out, SQLite is quite possibly the only piece of software that goes to that level of validation and testing without being required to by law.

It's not just a matter of skill, either. The cost in terms of money and time needed to develop software in that way is completely impractical in almost any commercial scenario. Aside from some very specific situations, it's not an economically viable way to produce software.

Re:Why Is SQLite Coded in C? (2017) by bsenftner on Wednesday March 14, 2018 @02:06PM (#16586897)
it is not economically viable for entertainment or disposable "apps", but extremely required for any serious, mission critical software. Seriously, the comments here betray how many people are in disposable software careers.
Re:Why Is SQLite Coded in C? (2017) by pcwalton on Wednesday March 14, 2018 @02:17PM (#16587007)
The comments here betray how much of the software economy depends on developer productivity. The fact is that SQLite style verification is not practical for almost any software, very much including "mission-critical" software.
Re:Why Is SQLite Coded in C? (2017) by phaer on Wednesday March 14, 2018 @05:05PM (#16588291)
Yes, but look how much of the software economy's infrastructure* depends on underfunded products. OpenSSH, GnuPG and OpenSSL are just 3 projects which are installed on pretty much every Linux server on the internet, including the servers of billion-dollar-businesses. It got a lot better in recent years, but still: Quite a few economically viable software companies just depend on free labor for mission-critical software product which take a lot of resources to become solid.

And while we are at it: http://www.openbsdfoundation.org https://gnupg.org/donate/ https://www.openssl.org/support/donations.html

Re:Why Is SQLite Coded in C? (2017) by jt2190 on Wednesday March 14, 2018 @02:25PM (#16587081)
Can't it be both? We need it right now and we don't need to to work perfectly or last forever.

Really, we're talking about the same thing like they're two separate things: The software [1] (in this case, SQLite) and the application (whatever tables, queries, etc. you need to solve your problem) are used together. So we build the poorly tested, quick and dirty application on top of the well tested, solid software.

[1] Yes, I realize that "software" is a terribly generic term to use to mean "well designed and tested software" and that "application" is also a terribly generic term to use to mean "hastily designed and untested software". Feel free to mentally substitute your own terms if you have better ones.

Re:Why Is SQLite Coded in C? (2017) by simias on Wednesday March 14, 2018 @02:55PM (#16587305)
I wish that were true. I've worked on products that are very much not "disposable" and I've seen some terrible code and very poor testing infrastructure. It's especially bad in shops that were not primarily writing software and had to integrate software solutions to remain competitive. Execs don't understand it, don't care for it, don't invest enough resources in it. It's often delegated to some 3rd party and integrated like a black box in their solution.
Re:Why Is SQLite Coded in C? (2017) by msla on Wednesday March 14, 2018 @04:36PM (#16588070)
First: Apps can definitely be mission-critical. If you're lost somewhere dangerous, your GPS and mapping app can be as mission-critical as it gets. Your app which makes a phone call (and, yes, I'm calling the be-a-phone functionality of a cell phone an app here) can be mission-critical.

Is that software held to the standards of mission-critical software? Probably not.

Second: There's a lot of space between the software which is recognized as being mission-critical and software which is just Bioware's latest patch target, and that software includes things like web browsers and the web server software which hosts your company's website. Given how essential a web presence is to, you know, being able to make money, web server software is hardly disposable, but it is not held to the rigorous standards of mission-critical software.

Re:Why Is SQLite Coded in C? (2017) by khedoros1 on Wednesday March 14, 2018 @05:02PM (#16588268)
I think you're using the words differently than the post you're replying to. As defined in that post:

"apps": entertainment or disposable

"software": serious, mission critical

Aside from the difference in terminology, it sounds like your opinions go in the same general direction.

Re:Why Is SQLite Coded in C? (2017) by zerr on Wednesday March 14, 2018 @01:09PM (#16586328)
Regarding the viability, another thing to consider is that C gives you an ubiquitous compatibility.
Re:Why Is SQLite Coded in C? (2017) by kderbe on Wednesday March 14, 2018 @06:02PM (#16588719)
The Opus codec has an impressive amount of testing behind it as well:

https://www.ietf.org/proceedings/82/slides/codec-4.pdf

Re:Why Is SQLite Coded in C? (2017) by IloveHN84 on Wednesday March 14, 2018 @01:09PM (#16586325)
In Germany there are strict regulations if you're writing secure software, especially under the lens of BSI and of the Bundesdruckerei. Softwares which deal with eID are verified and certified with strict rules
Re:Why Is SQLite Coded in C? (2017) by signa11 on Thursday March 15, 2018 @03:09AM (#16590950)
> In Germany there are strict regulations if you're writing secure software, especially under the lens of BSI and of the Bundesdruckerei. Softwares which deal with eID are verified and certified with strict rules

just curious, does this extend to dependent libraries as well ?

Re:Why Is SQLite Coded in C? (2017) by epse on Thursday March 15, 2018 @03:24PM (#16595801)
Yup
Re:Why Is SQLite Coded in C? (2017) by z3t4 on Thursday March 15, 2018 @05:31AM (#16591397)
Most/All these tests are done by machine. Debugging (in production) (while your service is down) costs much more then writing a bunch of tests. The more states your program can be in the more rigorous tests are needed.
Re:Why Is SQLite Coded in C? (2017) by nialv7 on Thursday March 15, 2018 @06:01AM (#16591507)
SQLite went through thorough testing, not verification.

These are two different things.

Re:Why Is SQLite Coded in C? (2017) by adwn on Thursday March 15, 2018 @07:22AM (#16591820)
> SQLite went through thorough testing, not verification. These are two different things.

I think you're confusing the terms "formal verification" and "verification". Testing is a subset of verification, but not of formal verification.

Re:Why Is SQLite Coded in C? (2017) by crb002 on Wednesday March 14, 2018 @05:36PM (#16588520)
SQLite is litteraly used by the military in their Android phones.
Re:Why Is SQLite Coded in C? (2017) by sli on Thursday March 15, 2018 @04:46PM (#16596404)
It's literally used by every Android phone, military or not. It can be used in iOS apps, too.