News for hackers. Stuff that matters.
Re:Why Is SQLite Coded in C and not Rust by 1vuio0pswjnm7 on Wednesday October 15, 2025 @12:12PM (#45594760)
This begs the question of why Rust evangelists keep targeting existing projects instead of focusing writing new, better software. In theory these languages should allow software developers to write programs that they would or could not attempt using languages without automatic memory management

Instead what I see _mostly_ is re-writes and proposed re-writes of existing software, often software that has no networking functions, and/or relatively small, easily audited software that IMHO poses little risk of memory-related bugs

This is concerning to me as an end-user who builds their software from source because the effects on compilation, e.g., resource requirements, interdependencies, speed, are significant

Re:Why Is SQLite Coded in C and not Rust by MangoToupe on Wednesday October 15, 2025 @12:33PM (#45595075)
> This begs the question of why Rust evangelists keep targeting existing projects instead of focusing writing new, better software.

Designing new software is orders of magnitude more difficult than iterating on existing software

Re:Why Is SQLite Coded in C and not Rust by itopaloglu83 on Wednesday October 15, 2025 @08:45PM (#45600225)
Yes, of course, but if a project owner wants to stay with a non-rust programming language, maybe we should just let them be, instead of nagging them multiple times a day about why they haven't switched, in that case writing your own project with rust to prove that it can be done better is the way to go.
Re:Why Is SQLite Coded in C and not Rust by burntsushi on Wednesday October 15, 2025 @08:52PM (#45600277)
And when they do that, they'll be vilified for "rewriting in Rust" and creating nothing new.

Who actually is nagging people multiple times per day to do free labor for them and rewrite a project in a completely different programming language?

Re:Why Is SQLite Coded in C and not Rust by MangoToupe on Monday October 20, 2025 @05:10AM (#45641657)
Hey if it increases participation, why not? I certainly don't blame anyone for avoiding the adhoc mess that is C
Re:Why Is SQLite Coded in C and not Rust by steveklabnik on Wednesday October 15, 2025 @12:43PM (#45595215)
There's no such thing as "Rust evangelists targeting existing projects" as some sort of broad strategy. What you're observing is that some people like to write programs in Rust, and so they choose to write new code in Rust. For some people, writing versions of software they understand already is a good way to learn a language, for some, it's that they don't like some aspect of the existing software and want to make something similar, but different.

That is, nobody perceives, say, "the silver searcher" as being some sort of nefarious plot to re-write grep, but they did with ripgrep, even though that's not what it is trying to do.

There are a few projects that are deliberately doing a re-write for reasons they consider important, but they're not "just because it's in Rust," they're things like "openssl has had memory safety issues, we should use tools that eliminate those" or "sudo is very important and has grown a lot of features and has had memory safety issues, we should consider cutting some scope and using tools that help eliminate the memory safety issues." But those number of projects are very small. Heck, even things like uutils were originally "I just want to learn Rust" projects and not some sort of "we must re-write the world in Rust."

Re:Why Is SQLite Coded in C and not Rust by LexiMax on Wednesday October 15, 2025 @08:22PM (#45600096)
> That is, nobody perceives, say, "the silver searcher" as being some sort of nefarious plot to re-write grep, but they did with ripgrep, even though that's not what it is trying to do.

I have a suspicion as to why this perception exists in the C++ crowd.

I don't think it's because of evangelists. C++ was that evangelized language in the early 90's, but after a period in the sun it then survived the evangelism of Java, Python, Go, and others, despite losing ground to them in general purpose tasks.

And that's because all of those other languages, while being much safer than C++, came at the cost of performance or the overhead of a runtime. There was really no other language that had the expressiveness of C++ while allowing the developer to get down to the bare metal if they needed speed.

The existence and growing popularity of Rust changes that calculus, and I imagine that makes certain developers who might have a lot of investment in the C++ ecosystem defensive, causing them to overreact to any perceived slight in a way that other languages simply don't provoke.

Re:Why Is SQLite Coded in C and not Rust by throwawaymaths on Friday October 17, 2025 @12:16PM (#45618458)
"Broad strategy" is your words, not gp's. you are fighting a strawman. gp is just arguing that this is happening, and it's annoying.
Re:Why Is SQLite Coded in C and not Rust by burntsushi on Wednesday October 15, 2025 @01:09PM (#45595612)
<rewind to the 90s>: This begs [sic] the question why copyleft evangelists keep targeting existing projects instead of focusing writing new, better software.

Few things in this life are novel. Regardless, when I wrote ripgrep, I was focusing on writing new and better software. I perceived several problems with similar tools at the time and set out to do something better.

Imagine if people actually listened to whinging like your comment. I'm glad I never have.

Re:Why Is SQLite Coded in C and not Rust by wolvesechoes on Thursday October 16, 2025 @03:05AM (#45602248)
Good analogy with copyleft rewrites - most of those Rust rewrites tend to use permissive licenses, so it is clear they aim to destroy civilizational achievements.
Re:Why Is SQLite Coded in C and not Rust by burntsushi on Thursday October 16, 2025 @04:38AM (#45602893)
That doesn't make any sense.
Re:Why Is SQLite Coded in C and not Rust by friendly_wizard on Thursday October 16, 2025 @05:28AM (#45603230)
Close to 100% positive that comment was tongue in cheek
Re:Why Is SQLite Coded in C and not Rust by 1vuio0pswjnm7 on Thursday October 16, 2025 @04:04PM (#45610042)
https://sqlite.org/copyright.html

Public domain. No "copyleft" license needed

Being written in a small, fast, "old and boring" language may be part of what makes SQLite apealing. Another (related) part may be the thoughtfulness and carefulness of its author, e.g., "time, attention and testing"

As suggested by the top comment, in effect the author's language choice, by itself, may be irrelevant regarding the issue of safety. If true, then even an "unsafe language" may not reduce the value of SQLite^1

djb's software is also public domain and written in an "unsafe language", mostly the same "old and boring" one as used to write SQLite. Like SQLite it is appealing to many people and is found in many places^2

1. But the thoughtlessness and carelessness of an author, no matter what language they choose, is still relevant to "safety" and may reduce the value of the software

2. https://ianix.com

Re:Why Is SQLite Coded in C and not Rust by 1vuio0pswjnm7 on Saturday October 18, 2025 @12:32AM (#45624909)
"The Silver Searcher" is a program written in the _same_ "unsafe" language as grep

This is obviously not analogous to Rust evangelism that targets projects written in C

The author claims the program is a clone of ack; ack is written in a "safe" language

https://geoff.greer.fm/ag/

https://beyondgrep.com/