frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

A simplified model of Fil-C

https://www.corsix.org/content/simplified-model-of-fil-c
60•aw1621107•1h ago

Comments

whatsakandr•46m ago
Fil-C is one of the most unrated projects I've ever seen. All this "rewrite it in rust for safety" just sounds stupid when you can compile your C program completely memory safe.
gnabgib•41m ago
Not here, lots of discussion:

Fil-Qt: A Qt Base build with Fil-C experience (143 points, 3 months ago, 134 comments) https://news.ycombinator.com/item?id=46646080

Linux Sandboxes and Fil-C (343 points, 4 months ago, 156 comments) https://news.ycombinator.com/item?id=46259064

Ported freetype, fontconfig, harfbuzz, and graphite to Fil-C (67 points, 5 months ago, 56 comments) https://news.ycombinator.com/item?id=46090009

A Note on Fil-C (241 points, 5 months ago, 210 comments) https://news.ycombinator.com/item?id=45842494

Notes by djb on using Fil-C (365 points, 6 months ago, 246 comments) https://news.ycombinator.com/item?id=45788040

Fil-C: A memory-safe C implementation (283 points, 6 months ago, 135 comments) https://news.ycombinator.com/item?id=45735877

Fil's Unbelievable Garbage Collector (603 points, 7 months ago, 281 comments) https://news.ycombinator.com/item?id=45133938

pizlonator•36m ago
Thanks for the love man!

> "rewrite it in rust for safety" just sounds stupid

To be fair, Fil-C is quite a bit slower than Rust, and uses more memory.

On the other hand, Fil-C supports safe dynamic linking and is strictly safer than Rust.

It's a trade off, so do what you feel

masfuerte•30m ago
Minor nitpick. Or confusion on my part. In the filc_malloc function the call to calloc doesn't seem to allocate enough memory to store an AllocationRecord for each location in visible_bytes. Should it be:

    ar->invisible_bytes = calloc(length, sizeof(AllocationRecord));
pizlonator•17m ago
Note, I'm not the author of the OP.

I am the author of Fil-C

If you want to see my write-ups of how it works, start here: https://fil-c.org/how

kbolino•35m ago
Fil-C has two major downsides: it slows programs down and it doesn't interoperate with non-Fil-C code, not even libc. That second problem complicates using it on systems other than Linux (even BSDs and macOS) and integrating it with other safe languages.
kvemkon•33m ago
> it slows programs down

Interesting, how costly would be hardware acceleration support for Fil-C code.

kbolino•26m ago
I think there's two main avenues for hardware acceleration: pointer provenance and garbage collection. The first dovetails with things like CHERI [1] but the second doesn't seem to be getting much hardware attention lately. It has been decades since Lisp Machines were made, and I'm not aware of too many other architectures with hardware-level GC support. There are more efficient ways to use the existing hardware for GC though, as e.g. Go has experimented with recently [2].

[1]: https://en.wikipedia.org/wiki/Capability_Hardware_Enhanced_R...

[2]: https://go.dev/blog/greenteagc

pizlonator•32m ago
You’re not wrong but both problems could be alleviated by sending patches :-)
kbolino•22m ago
I would never say it's impossible, and you've done some amazing work, but I do wonder if the second problem is feasibly surmountable. Setting aside cross-language interop, BYOlibc is not really tolerated on most systems. Linux is fairly unique here with its strongly compatible syscall ABI.
pizlonator•13m ago
You're right that it's challenging. I don't think it's infeasible.

Here's why:

1. For the first year of Fil-C development, I was doing it on a Mac, and it worked fine. I had lots of stuff running. No GUI in that version, though.

2. You could give Fil-C an FFI to Yolo-C. It would look sort of like the FFIs that Java, Python, or Ruby do. So, it would be a bit annoying to bridge to native APIs, but not infeasible. I've chosen not to give Fil-C such an FFI (except a very limited FFI to assembly for constant time crypto) because I wanted to force myself to port the underlying libraries to Fil-C.

3. Apple could do a Fil-C build of their userland, and MS could do a Fil-C build of their userland. Not saying they will do it. But the feasibility of this is "just" a matter of certain humans making choices, not anything technical.

rvz•31m ago
It makes more sense for new software to be written in Rust, rather than a full rewrite of existing C/C++ software to Rust in the same codebase.

Fil-C just does the job with existing software in C or C++ without an expensive and bug riddled re-write and serves as a quick protection layer against the common memory corruption bugs found in those languages.

dataflow•29m ago
> Fil-C is one of the most unrated projects I've ever seen

When's the last time you told a C/C++ programmer you could add a garbage collector to their program, and saw their eyes light up?

FuckButtons•18m ago
Exactly, the Venn diagram of programmers using c/c++ and programmers who can use a garbage collector for their workload is two circles.
pizlonator•10m ago
Except for:

- Me. I'm a C++ programmer.

- Any C++ programmer who has added a GC to their C++ program. (Like the programmers who used the web browser you're using right now.)

- Folks who are already using Fil-C.

GaggiX•28m ago
Fil-C is much slower, no free lunch, if you want the language to be fast and memory safe you need to add restrictions to allow proper static analysis of the code.
omcnoe•19m ago
The issue with Fil-C is that it's runtime memory safety. You can still write memory-unsafe code, just now it is guaranteed to crash rather than being a potential vulnerability.

Guaranteed memory safety at compile time is clearly the better approach when you care about programs that are both functionally correct and memory safe. If I'm writing something that takes untrusted user input like a web API memory safety issues still end up as denial-of-service vulns. That's better, but it's still not great.

Not to disparage the Fil-C work, but the runtime approach has limitations.

boredatoms•17m ago
For some things the just-crash is ok, like cli usage of curl
pizlonator•11m ago
> write memory-unsafe code, just now it is guaranteed to crash

If it's guaranteed to crash, then it's memory-safe.

If you dislike that definition, then no mainstream language is memory-safe, since they all use crashes to handle out of bounds array accesses

100ms•6m ago
What's the alternative?

https://play.rust-lang.org/?version=stable&mode=debug&editio...

forrestthewoods•4m ago
Rust also has run-time crash checks in the form of run-time array bounds checks that panic. So let us not pretend that Rust strictly catches everything at compile-time.

It’s true that, assuming all things equal, compile-time checks are better than run-time. I love Rust. But Rust is only practical for a subset of correct programs. Rust is terrible for things like games where Rust simply can not prove at compile-time that usage is correct. And inability to prove correctness does NOT imply incorrectness.

I love Rust. I use it as much as I can. But it’s not the one true solution to all things.

Claude Design

https://www.anthropic.com/news/claude-design-anthropic-labs
765•meetpateltech•8h ago•511 comments

A simplified model of Fil-C

https://www.corsix.org/content/simplified-model-of-fil-c
60•aw1621107•1h ago•22 comments

All 12 moonwalkers had "lunar hay fever" from dust smelling like gunpowder (2018)

https://www.esa.int/Science_Exploration/Human_and_Robotic_Exploration/The_toxic_side_of_the_Moon
184•cybermango•4h ago•101 comments

Measuring Claude 4.7's tokenizer costs

https://www.claudecodecamp.com/p/i-measured-claude-4-7-s-new-tokenizer-here-s-what-it-costs-you
506•aray07•7h ago•346 comments

Landmark ancient-genome study shows surprise acceleration of human evolution

https://www.nature.com/articles/d41586-026-01204-5
16•unsuspecting•43m ago•1 comments

I'm spending 3 months coding the old way

https://miguelconner.substack.com/p/im-coding-by-hand
97•evakhoury•6h ago•89 comments

Isaac Asimov: The Last Question (1956)

https://hex.ooo/library/last_question.html
588•ColinWright•11h ago•233 comments

Show HN: Smol machines – subsecond coldstart, portable virtual machines

https://github.com/smol-machines/smolvm
183•binsquare•5h ago•78 comments

NASA Force

https://nasaforce.gov/
194•LorenDB•7h ago•212 comments

Arc Prize Foundation (YC W26) Is Hiring a Platform Engineer for ARC-AGI-4

https://www.ycombinator.com/companies/arc-prize-foundation/jobs/AKZRZDN-platform-engineer-benchma...
1•gkamradt_•2h ago

How to Host a Blog on a Subdirectory Instead of a Subdomain

https://www.davidma.org/blog/2025-11-14-host-your-blog-on-a-subdirectory/
5•taikon•20m ago•2 comments

Middle schooler finds coin from Troy in Berlin

https://www.thehistoryblog.com/archives/75848
186•speckx•8h ago•86 comments

I built a 3D printing business and ran it for 8 months

https://www.wespiser.com/posts/2026-04-12-3D-Printing-Biz.html
63•wespiser_2018•2d ago•59 comments

The GNU libc atanh is correctly rounded

https://inria.hal.science/hal-05591661
35•matt_d•2d ago•2 comments

Are the costs of AI agents also rising exponentially? (2025)

https://www.tobyord.com/writing/hourly-costs-for-ai-agents
43•louiereederson•2d ago•1 comments

NIST gives up enriching most CVEs

https://risky.biz/risky-bulletin-nist-gives-up-enriching-most-cves/
157•mooreds•8h ago•37 comments

Even "cat readme.txt" is not safe

https://blog.calif.io/p/mad-bugs-even-cat-readmetxt-is-not
52•arkadiyt•4h ago•21 comments

Hyperscalers have already outspent most famous US megaprojects

https://twitter.com/finmoorhouse/status/2044933442236776794
96•nowflux•6h ago•75 comments

Introducing: ShaderPad

https://rileyjshaw.com/blog/introducing-shaderpad/
24•evakhoury•2d ago•6 comments

Webloc: Analysis of Penlink's Ad-Based Geolocation Surveillance Tech

https://citizenlab.ca/research/analysis-of-penlinks-ad-based-geolocation-surveillance-tech/
50•Cider9986•4d ago•0 comments

The Unix Executable as a Smalltalk Method [video]

https://www.youtube.com/watch?v=sZjPQ7vtLNA
9•surprisetalk•1d ago•0 comments

Ban the sale of precise geolocation

https://www.lawfaremedia.org/article/it-is-time-to-ban-the-sale-of-precise-geolocation
555•hn_acker•8h ago•150 comments

Healthchecks.io now uses self-hosted object storage

https://blog.healthchecks.io/2026/04/healthchecks-io-now-uses-self-hosted-object-storage/
134•zdw•8h ago•62 comments

Connie Converse was a folk-music genius. Then she vanished

https://www.bbc.com/culture/article/20260413-the-mystery-of-a-missing-folk-music-pioneer
60•mellosouls•2d ago•9 comments

Show HN: Stage – Putting humans back in control of code review

https://stagereview.app/
86•cpan22•1d ago•86 comments

Iceye Open Data

https://www.iceye.com/open-data-initiative
99•marklit•8h ago•14 comments

Detecting DOSBox from Within the Box

https://datagirl.xyz/posts/dos_inside_the_box.html
50•atan2•7h ago•14 comments

Tesla tells HW3 owner to 'be patient' after 7 years of waiting for FSD

https://electrek.co/2026/04/17/tesla-hw3-owners-be-patient-7-years-fsd/
134•breve•4h ago•88 comments

Show HN: PanicLock – Close your MacBook lid disable TouchID –> password unlock

https://github.com/paniclock/paniclock/
95•seanieb•6h ago•41 comments

The Gregorio project – GPL tools for typesetting Gregorian chant

https://gregorio-project.github.io/index.html
51•mcookly•7h ago•9 comments