frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Subtitle Quality Monitoring

https://subtitles.org.uk/
1•edward•1m ago•0 comments

Court Injunctions Are the Thoughts and Prayers of Data Breach Response

https://www.troyhunt.com/court-injunctions-are-the-thoughts-and-prayers-of-data-breach-response/
1•anitil•2m ago•1 comments

DirecTV screensavers will show AI-generated ads with your face in 2026

https://arstechnica.com/gadgets/2025/10/directv-screensavers-will-show-ai-generated-ads-with-your...
1•CharlesW•4m ago•0 comments

Raster Master v5.2 Sprite/Tile/Map Editor 85 Stars on GitHub

https://github.com/RetroNick2020/raster-master/releases/tag/v5.2R119
1•retronick2020•4m ago•0 comments

'I love Hitler': Leaked messages expose Young Republicans' racist chat

https://www.politico.com/news/2025/10/14/private-chat-among-young-gop-club-members-00592146
1•tastyface•5m ago•1 comments

Interior cancels largest solar project in North America

https://www.politico.com/news/2025/10/10/trump-interior-department-cancels-largest-solar-project-...
2•pseudolus•9m ago•0 comments

Sam Altman says ChatGPT will soon allow erotica

https://techcrunch.com/2025/10/14/sam-altman-says-chatgpt-will-soon-allow-erotica-for-adult-users/
1•academic_84572•9m ago•0 comments

When Existence is Inefficient (2022)

https://inference-review.com/article/when-existence-is-inefficient
2•aleph_minus_one•11m ago•0 comments

SQL Server Management Studio 22 Has ARM64 Support

https://techcommunity.microsoft.com/blog/sqlserver/announcing-the-release-of-sql-server-managemen...
1•vyrotek•15m ago•0 comments

Meta Erases Gaza Journalist's Instagram

https://twitter.com/DropSiteNews/status/1977795050206576763
14•cramsession•16m ago•1 comments

Building and scaling Notion's data lake

https://www.notion.com/blog/building-and-scaling-notions-data-lake
3•olayiwoladekoya•17m ago•0 comments

Nanonets-OCR2-3B – VLM that transforms documents into structured Markdown

https://huggingface.co/nanonets/Nanonets-OCR2-3B
7•PixelPanda•19m ago•3 comments

Killing the GIL: How to Use Python 3.14's Free-Threading Upgrade

https://www.neelsomaniblog.com/p/killing-the-gil-how-to-use-python
2•nsomani•30m ago•0 comments

Ask HN: Thoughts on the New Unplugged Up Phone?

1•ibejoeb•31m ago•0 comments

Augment Code: 22.5% of our users are consuming 20x what they're currently paying

https://old.reddit.com/r/AugmentCodeAI/comments/1o60nlz/addressing_community_feedback_on_our_new_...
3•jrflowers•33m ago•0 comments

Nvidia's 'Personal AI Supercomputer'

https://www.theverge.com/news/798775/nvidia-spark-personal-ai-supercomputer
4•kristianpaul•35m ago•0 comments

El Luchador a Page-Aware AI Sidebar for Chrome

https://chromewebstore.google.com/detail/el-luchador-smart-web-ass/nahjdfphfjnooodfboepbnihgjamehhi
1•sebastianrw•36m ago•1 comments

Patch Tuesday, October 2025 'End of 10' Edition

https://krebsonsecurity.com/2025/10/patch-tuesday-october-2025-end-of-10-edition/
1•todsacerdoti•41m ago•0 comments

JavaScript Library Runs Machine Learning Models in Browser

https://thenewstack.io/javascript-library-runs-machine-learning-models-in-browser/
1•afrinxnahar•42m ago•0 comments

How the Iframe Tag Changed the World

https://blog.hmpl-lang.dev/2025/10/14/how-the-iframe-tag-changed-the-world/
2•aanthonymax•44m ago•1 comments

Soviet-Era Computer Is Both a Mystery and a Disaster

https://hackaday.com/2023/05/07/soviet-era-computer-is-both-a-mystery-and-a-disaster/
3•stmw•47m ago•0 comments

Beads: Coding Agent Memory Upgrade

https://github.com/steveyegge/beads
1•jemiluv8•47m ago•0 comments

Wes Anderson shot a movie in San Francisco [video]

https://www.youtube.com/watch?v=m2P9PZwi8W4
1•nonconstant•47m ago•1 comments

Common yeast can survive Martian conditions

https://phys.org/news/2025-10-common-yeast-survive-martian-conditions.html
3•geox•47m ago•1 comments

RenameForce

https://renameforce.com/
1•codeulike•51m ago•0 comments

ReCAPTCHA migration to Google Cloud by the end of 2025: what do you need to do

https://privatecaptcha.com/blog/recaptcha-migration-to-google-cloud-2025/
1•ribtoks•1h ago•0 comments

'Under tremendous pressure': Newsom vetoes long-awaited AI chatbot bill

https://www.sfgate.com/politics/article/newsom-vetoes-ai-chatbot-bill-21099045.php
7•voxadam•1h ago•3 comments

Convergent CTOS Source Files

https://bitsavers.org/bits/Convergent/ngen/CTOS_source/
1•CTOSian•1h ago•0 comments

AI and the Digital Content Provider's Dilemma

https://katedowninglaw.com/2025/10/14/ai-and-the-digital-content-providers-dilemma/
3•lindenksv1•1h ago•0 comments

GrapheneOS is finally ready to break free from Pixels and it may never look back

https://www.androidauthority.com/graphene-os-major-android-oem-partnership-3606853/
54•MaximilianEmel•1h ago•29 comments
Open in hackernews

Why Is SQLite Coded in C and not Rust

https://www.sqlite.org/whyc.html
37•plainOldText•3h ago

Comments

mikece•2h ago
The fact that a C library can easily be wrapped by just about any language is really useful. We're considering writing a library for generating a UUID (that contains a key and value) for reasons that make sense to us and I proposed writing this in C so we could simply wrap it as a library for all of the languages we use internally rather than having to re-implement it several times. Not sure if we'll actually build this library but if we do it will be in C (I did managed to get the "wrap it for each language" proposal pre-approved).
01HNNWZ0MV43FF•27m ago
It is. You can also write it in C++ or Rust and expose a C API+ABI, and then you're distributing a binary library that the OS sees as very similar to a C library.

Occasionally when working in Lua I'd write something low-level in C++, wrap it in C, and then call the C wrapper from Lua. It's extra boilerplate but damn is it nice to have a REPL for your C++ code.

Edit: Because someone else will say it - Rust binary artifacts _are_ kinda big by default. You can compile libstd from scratch on nightly (it's a couple flags) or you can amortize the cost by packing more functions into the same binary, but it is gonna have more fixed overhead than C or C++.

plainOldText•2h ago
I’d be curious to know what the creators of SQLite would have to say about Zig.

Zig gives the programmer more control than Rust. I think this is one of the reasons why TigerBeetle is written in Zig.

Jtsummers•2h ago
> Nearly all systems have the ability to call libraries written in C. This is not true of other implementation languages.

From section "1.2 Compatibility". How easy is it to embed a library written in Zig in, say, a small embedded system where you may not be using Zig for the rest of the work?

Also, since you're the submitter, why did you change the title? It's just "Why is SQLite Coded in C", you added the "and not Rust" part.

plainOldText•2h ago
The article allocates the last section to explaining why Rust is not a good fit (yet) so I wanted the title to cover that part of the conversation since I believe it is meaningful. It illustrates the tradeoffs in software engineering.
Jtsummers•1h ago
> Otherwise please use the original title, unless it is misleading or linkbait; don't editorialize.

From the site guidelines: https://news.ycombinator.com/newsguidelines.html

pm2222•2h ago
These points strike me:

  Safe languages insert additional machine branches to do things like verify that array accesses are in-bounds. In correct code, those branches are never taken. That means that the machine code cannot be 100% branch tested, which is an important component of SQLite's quality strategy.

  Rust needs to mature a little more, stop changing so fast, and move further toward being old and boring.

  Rust needs to demonstrate that it can do the kinds of work that C does in SQLite without a significant speed penalty.
rstuart4133•1h ago
> Safe languages insert additional machine branches to do things like verify that array accesses are in-bounds. In correct code, those branches are never taken. That means that the machine code cannot be 100% branch tested, which is an important component of SQLite's quality strategy.

This is annoying in Rust. To me array accesses aren't the most annoying, it's match{} branches that will never been invoked.

There is unreachable!() for such situations, and you would hope that:

    if array_access_out_of_bounds { unreachable!(); }
is recognised by the Rust tooling and just ignored. That's effectively the same as SQLite is doing now by not doing the check. But it isn't ignored by the tooling: unreachable!() is reported as a missed line. Then there is the test code coverage including the standard output by default, and you have to use regex's on path names to remove it.
steveklabnik•40m ago
A more direct translation of the sqlite strategy here is to use get_unchecked instead of [], and then you get the same behaviors.

Your example does what [] does already, it’s just a more verbose way of writing the same thing. It’s not the same behavior as sqlite.

steveklabnik•38m ago
If the branch is never taken, and the optimizer can prove it, it will remove the check. Sometimes if it can’t actually prove it there’s ways to help it understand, or, in the almost extreme case, you do what I commented below.
pella•32m ago
Turso:

https://algora.io/challenges/turso "Turso is rewriting SQLite in Rust ; Find a bug to win $1,000"

------

- Dec 10, 2024 : "Introducing Limbo: A complete rewrite of SQLite in Rust"

https://turso.tech/blog/introducing-limbo-a-complete-rewrite...

- Jan 21, 2025 - "We will rewrite SQLite. And we are going all-in"

https://turso.tech/blog/we-will-rewrite-sqlite-and-we-are-go...

- Project: https://github.com/tursodatabase/turso

Status: "Turso Database is currently under heavy development and is not ready for production use."

01HNNWZ0MV43FF•28m ago
But if you don't have the bounds checks in machine code, then you don't have bounds checks.

I suppose SQLite might use a C linter tool that can prove the bounds checks happen at a higher layer, and then elide redundant ones in lower layers, but... C compilers won't do that by default, they'll just write memory-unsafe machine code. Right?

Jtsummers•58m ago
Two previous, and substantial, discussions on this page:

https://news.ycombinator.com/item?id=28278859 - August 2021

https://news.ycombinator.com/item?id=16585120 - March 2018

bfkwlfkjf•20m ago
> Safe languages insert additional machine branches to do things like verify that array accesses are in-bounds. In correct code, those branches are never taken. That means that the machine code cannot be 100% branch tested, which is an important component of SQLite's quality strategy.

Huh it's not everyday that I hear a genuinely new argument. Thanks for sharing.

firesteelrain•19m ago
One thing I found especially interesting is the section at the end about why Rust isn’t used. It leaves open the door and at least is constructive feedback to the Rust community
DarkNova6•19m ago
> All that said, it is possible that SQLite might one day be recoded in Rust. Recoding SQLite in Go is unlikely since Go hates assert(). But Rust is a possibility. Some preconditions that must occur before SQLite is recoded in Rust include:

- Rust needs to mature a little more, stop changing so fast, and move further toward being old and boring.

- Rust needs to demonstrate that it can be used to create general-purpose libraries that are callable from all other programming languages.

- Rust needs to demonstrate that it can produce object code that works on obscure embedded devices, including devices that lack an operating system.

- Rust needs to pick up the necessary tooling that enables one to do 100% branch coverage testing of the compiled binaries.

- Rust needs a mechanism to recover gracefully from OOM errors.

- Rust needs to demonstrate that it can do the kinds of work that C does in SQLite without a significant speed penalty.

dgfitz•11m ago
> Rust needs to mature a little more, stop changing so fast, and move further toward being old and boring.

Talking about C99, or C++11, and then “oh you need the nightly build of rust” were juxtaposed in such a way that I never felt comfortable banging out “yum install rust” and giving it a go.

jasonthorsness•8m ago
“None of the safe programming languages existed for the first 10 years of SQLite's existence. SQLite could be recoded in Go or Rust, but doing so would probably introduce far more bugs than would be fixed, and it may also result in slower code.”

Modern languages might do more than C to prevent programmers from writing buggy code, but if you already have bug-free code due to massive time, attention, and testing, and the rate of change is low (or zero), it doesn’t really matter what the language is. SQLIte could be assembly language for all it would matter.

pizlonator•8m ago
SQLite works great in Fil-C with minimal changes.

So, the argument for keeping SQLite written in C is that it gives the user the choice to either:

- Build SQLite with Yolo-C, in which case you get excellent performance and lots of tooling. And it's boring in the way that SQLite devs like. But it's not "safe" in the sense of memory safe languages.

- Build SQLite with Fil-C, in which case you get worse (but still quite good) performance and memory safety that exceeds what you'd get with a Rust/Go/Java/whatever rewrite.

Recompiling with Fil-C is safer than a rewrite into other memory safe languages because Fil-C is safe through all dependencies, including the syscall layer. Like, making a syscall in Rust means writing some unsafe code where you could screw up buffer sizes or whatnot, while making a syscall in Fil-C means going through the Fil-C runtime.

wodenokoto•5m ago
I think it’s more interesting that DuckDB is written in C++ and not rust than SQLite.

SQLite is old, huge and known for its gigantic test coverage. There’s just so much to rewrite.

DuckDB is from 2019, so new enough to jump on the “rust is safe and fast”