frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Fil's Unbelievable Garbage Collector

https://fil-c.org/fugc
105•pizlonator•2h ago

Comments

reactordev•1h ago
Oh this is so cool
kerkeslager•1h ago
I'm not sure I understand all of what they're doing there, but I did read the referenced Doligez-Leroy-Gonthier paper a while back and I am glad someone is doing something with that in a non-academic (maybe?) context. That paper looked promising to me when I read it, but I basically had no faith that it would ever make it out of academia because the algorithm is so complex. It took me a really long time to think I understood it, and it's one of those things I actually am not confident I could implement even when I understood it (I certainly don't understand it now).
pizlonator•58m ago
I don’t think I’m the only one doing something in the vicinity of that paper. I think close relatives of DLG shipped in some prod JVMs.
kerkeslager•5m ago
Interesting. I've read a lot about some complex JVMs, but I guess maybe they didn't cite their sources and I didn't make the connection on my own.
pcfwik•1h ago
Given the goal is to work with existing C programs (which already have free(...) calls "carefully" placed), and you're already keeping separate bounds info for every pointer, I wonder why you chose to go with a full GC rather than lock-and-key style temporal checking[1]? The latter would make memory usage more predictable and avoid the performance overhead and scheduling headaches of a GC.

Perhaps storing the key would take too much space, or checking it would take too much time, or storing it would cause race condition issues in a multithreaded setting?

[1] https://acg.cis.upenn.edu/papers/ismm10_cets.pdf

pizlonator•59m ago
I think the lock and key approaches don’t have Fil-C’s niftiest property: the capability model is totally thread safe and doesn’t require fancy atomics or locking in common cases
pcfwik•54m ago
makes sense, thanks --- cool project!
pcfwik•58m ago
Also find it interesting that you're allowing out-of-bounds pointer arithmetic as long as no dereference happens, which is a class of UB compilers have been known to exploit ( https://stackoverflow.com/questions/23683029/is-gccs-option-... ). Do you disable such optimizations inside LLVM, or does Fil-C avoid this entirely by breaking pointers into pointer base + integer offset (in which case I wonder if you're missing out on any optimizations that work specifically on pointers)?
pizlonator•53m ago
For starters, llvm is a lot less willing to exploit that UB

It’s also weird that GCC gets away with this at all as many C programs in Linux that compile with GCC make deliberate use of out of bounds pointers.

But yeah, if you look at my patch to llvm, you’ll find that:

- I run a highly curated opt pipeline before instrumentation happens.

- FilPizlonator drops flags in LLVM IR that would have permitted downstream passes to perform UB driven optimizations.

- I made some surgical changes to clang CodeGen and some llvm passes to fix some obvious issues from UB

But also let’s consider what would happen if I hadn’t done any of that except for dropping UB flags in FilPizlonator. In that case, a pass before pizlonation would have done some optimization. At worst, that optimization would be a logic error or it would induce a Fil-C panic. FilPizlonator strongly limits UB to its “memory safe subset” by construction.

I call this the GIMSO property (garbage in, memory safety out).

kartoffelsaft•2m ago
Not knowing the exact language used by the C standard, I suspect the reason GCC doesn't cause these issues with most programs is that the wording of "array object" refers specifically to arrays with compile-time-known sizes, i.e. `int arr[4]`. Most programs that do out of bounds pointer arithmetic are doing so with pointers from malloc/mmap/similar, which might have similar semantics to arrays but are not arrays.
jandrewrogers•47m ago
I think it is really cool that someone is going hard at this part of the design space from an engineering geek standpoint even though I can’t use it myself.
crawshaw•37m ago
It is great that Fil-C exists. This is the sort of technique that is very effective for real programs, but that developers are convinced does not work. Existence proofs cut through long circular arguments.
charleslmunger•30m ago
This is really cool! I noticed

>The fast path of a pollcheck is just a load-and-branch.

A neat technique I've seen used to avoid these branches is documented at https://android-developers.googleblog.com/2023/11/the-secret... under "Implicit suspend checks".

pizlonator•27m ago
Yeah that’s a common optimization for poll checks. I think most production JVMs do that.

I’m very far from doing those kinds of low level optimizations because I have a large pile of very high level and very basic optimizations still left to do!

Rails 8.1 Beta 1: Job continuations, structured events, local CI

https://rubyonrails.org/2025/9/4/rails-8-1-beta-1
1•ksec•1m ago•0 comments

Educated Elite Rigged Society [video]

https://www.youtube.com/watch?v=QSa52TR9tCA
1•adm4•2m ago•0 comments

Mermaid Diagram Editor/Renderer

https://mermaid-editor.online
2•gkoos•7m ago•1 comments

Warner Bros Discovery Sues Midjourney for Stealing Superman, Scooby-Doo

https://www.reuters.com/legal/litigation/warner-bros-discovery-sues-ai-photo-generator-midjourney...
1•petethomas•10m ago•0 comments

What the splinternet means for big tech

https://www.economist.com/business/2025/09/04/what-the-splinternet-means-for-big-tech
1•petethomas•16m ago•1 comments

A Geometric Technique for Evaluating Integrals

https://www.cantorsparadise.com/an-amazing-geometric-technique-for-evaluating-integrals-48b68e9b4638
1•pykello•17m ago•0 comments

How 'neural fingerprinting' could analyse our minds

https://www.ft.com/content/151fc3e4-ef6d-4ae6-b3dd-33b16e62f849
1•petethomas•17m ago•1 comments

Is class imbalance a problem in machine learning?

https://datascience.stackexchange.com/questions/134389/is-class-imbalance-really-a-problem-in-mac...
1•malshe•27m ago•1 comments

Best Grow a Garden Script – Mobile Delta Free No Key

https://grow-agardenscript.com
1•heihieih•28m ago•0 comments

I burned out and quit after working at Deloitte, Salesforce, Yelp, and Cruise

https://www.businessinsider.com/ex-deloitte-salesforce-yelp-cruise-employee-burnout-quit-corporat...
1•mgh2•32m ago•1 comments

Sen. Warren calls Intel a failing company [pdf]

https://www.banking.senate.gov/imo/media/doc/letter_to_commerce_dept_re_intel-chips.pdf
2•osnium123•33m ago•1 comments

New method to synthesize carbohydrates could pave the way to biomedical advances

https://phys.org/news/2025-08-method-carbohydrates-pave-biomedical-advances.html
2•PaulHoule•38m ago•0 comments

Speech Repo is widely used in daily communication scenarios

https://github.com/tabelf/speech-repo
1•1437173153•39m ago•0 comments

Jury Instructions Rodriguez v. Google (3:20-cv-04688-RS) [pdf]

https://storage.courtlistener.com/recap/gov.uscourts.cand.362381/gov.uscourts.cand.362381.666.0.pdf
2•1vuio0pswjnm7•39m ago•0 comments

Thinkspot Is Closing Down

https://www.thinkspot.com/discourse/Dpu8Kz/post/thinkspot/a-heartfelt-goodbye-to-our-amazing-comm...
4•felineflock•41m ago•1 comments

Rare and Old Computers

https://randoc.wordpress.com/
1•pabs3•44m ago•0 comments

Flock Safety currently solves 700k reported cases of crime per year

https://twitter.com/garrytan/status/1963256544524640456
1•nationsecwatch•49m ago•5 comments

Show HN: Nano Banana Prompt Collection

https://nanobananaprompt.app
1•jacksonLiu89•52m ago•0 comments

It's past time to start protecting US nuclear power reactors from drones

https://thebulletin.org/2025/09/its-past-time-to-start-protecting-us-nuclear-power-reactors-from-...
1•pseudolus•53m ago•0 comments

cparted – curses front end to pyparted that mimics cfdisk

https://github.com/dcampbell24/cparted
1•pabs3•56m ago•0 comments

Using AI to perceive the universe in greater depth

https://deepmind.google/discover/blog/using-ai-to-perceive-the-universe-in-greater-depth/
2•diwank•58m ago•0 comments

Tech CEOs take turns praising Trump

https://www.wsj.com/politics/trump-tech-ceo-rose-garden-dinner-1fee2de3
14•SanjayMehta•58m ago•1 comments

Why the Internet Is Worse Than Ever

https://macleans.ca/society/why-the-internet-is-worse-than-ever/
2•bookofjoe•59m ago•0 comments

Show HN: A credibility-based social platform (no Likes) to fight misinformation

https://noblenews.io
2•whatsyoursource•1h ago•8 comments

You Know What to Do

https://staysaasy.com/management/2025/08/21/you-know-what-to-do.html
1•thisismytest•1h ago•0 comments

simonw has vibe-coded 124 useful tools

https://simonwillison.net/2025/Sep/4/highlighted-tools/
3•doppp•1h ago•0 comments

What My Father Taught Me About Bullies

https://robertreich.substack.com/p/what-my-father-taught-me-about-bullies
1•hkhn•1h ago•0 comments

Look on my works, ye Mighty

https://snyder.substack.com/p/look-on-my-works-ye-mighty
2•hkhn•1h ago•1 comments

AI Snacks: Small Ways to Sprinkle AI into Everyday Tools

https://amirmalik.net/2025/09/05/ai-snacks-sprinkle-ai-into-everyday-tools
1•ammmir•1h ago•0 comments

David Walker's Paper Clip Collection

https://www.presentandcorrect.com/blogs/blog/david-walkers-paper-clip-collection
1•NaOH•1h ago•0 comments