frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Would you believe try-catch-finally works in plain old C?

4•mf_taria•1y ago
I was digging through some of my old repositories and found a C language extension I wrote years ago. Even now, I think it’s kinda cool — and I’d love for you to check it out.

https://github.com/simpart/c-try

It recreates `try {}` / `catch {}` / `finally {}` in plain C using just macros and global variables. There's also a `$` macro to propagate errors between function calls — a bit like a mini DSL for error handling.

You can find a working example in `test.c`.

It doesn't support nesting or multithreading, and yes, it abuses macros. But hey, it's C.

Comments

actionfromafar•1y ago
Finally!

America's obsession with whey protein has a delicious consequence: More cheese

https://www.nbcnews.com/business/consumer/americas-obsession-whey-protein-leading-cheese-rcna588939
2•bushwart•1m ago•0 comments

Disney Data Dump: What's the Best Day of the Week to Visit the Magic Kingdom?

https://touringplans.com/blog/disney-data-dump-whats-the-best-day-of-the-week-to-visit-the-magic-...
1•bariumbitmap•1m ago•0 comments

David Ellison: Here's Why You Can Trust Me with the News

https://www.nytimes.com/2026/08/04/opinion/david-ellison-paramount-warner-deal.html
1•aaronbrethorst•2m ago•0 comments

New museum find shows nature can't stop inventing seahorses

https://phys.org/news/2026-08-museum-nature-seahorses.html
1•MaxLeiter•3m ago•0 comments

The Investing Heavyweights That Backed Situational Awareness Before It Blew Up

https://www.wsj.com/finance/investing/the-investing-heavyweights-that-backed-situational-awarenes...
1•vdalal•8m ago•0 comments

Google AI Studio exposed. Drive Trash is fake

https://scored.co/c/News/p/1ATC9NarFD/google-drive-trash-is-just-a-vis/c
1•Bitu79•9m ago•1 comments

Dark Mode for Pinterest – Themes and Night Mode

https://www.sortpin.com/pinterest-dark-mode
1•trungpv1601•9m ago•0 comments

OpenAI's Unreleased Model Astra Solves Ten Major Open Mathematics Problems

https://thezvi.substack.com/p/openais-unreleased-model-astra-solves
1•paulpauper•10m ago•0 comments

Cyberpunk on 1GB of VRAM [video]

https://www.youtube.com/watch?v=H6uX-PI95ok
1•behnamoh•10m ago•0 comments

Roby Yonge

https://en.wikipedia.org/wiki/Roby_Yonge
1•petethomas•11m ago•1 comments

Hackerne.ws Cert Needs Updating

https://hackerne.ws
1•mproud•11m ago•2 comments

Ukrainian and Iran War Coalescence Discussion

https://open.spotify.com/episode/2Q6jmheUC8nTDDEH9xgL4h
1•silver92bullet•12m ago•0 comments

Designing a Query System

https://bal-e.org/speed/krabby/2026/query-system-design/
1•vinhnx•13m ago•0 comments

In-Terminal Jupyter Notebook for Agentic Data Science

https://www.reddit.com/r/ClaudeAI/comments/1vfv9a3/interminal_jupyter_notebook_for_agentic_data/
1•syumei•13m ago•0 comments

Cookies leaked to the wrong host: a URL parsing differential in tough-cookie

https://hackzero.ai/learn/tough-cookie-cookie-leak
1•cuaupadilla•16m ago•0 comments

Survey Statistics: structured MRP to smooth survey weights

https://statmodeling.stat.columbia.edu/2026/08/04/survey-statistics-structured-mrp-to-smooth-surv...
1•paulpauper•20m ago•0 comments

Economy in an automated post-scarcity society

https://qalamjadal.substack.com/p/economy-in-a-fully-automated-post
3•x0axz•21m ago•1 comments

Lunch With Freeman Dyson, in 196,883 Dimensions

https://mathshistory.st-andrews.ac.uk/Obituaries/Dyson_2_NY_Times/
1•paulpauper•22m ago•0 comments

The little-told story of the WWII pet cull (2013)

https://www.bbc.com/news/magazine-24478532
1•Teever•23m ago•0 comments

Cloudflare Wallet, developers who need it can reserve a name they like

https://cloudflare.pay/
1•BearBest•23m ago•0 comments

Show HN: Structured search for Who is hiring threads

https://gethnjobs.com/
1•hboon•25m ago•0 comments

All Knowledge Is Provisional (2024)

https://www.sebastianmellen.com/post/2024/all-knowledge-is-provisional/
2•andsoitis•27m ago•0 comments

Farewell Etaoin Shrdlu (1978) [video]

https://www.youtube.com/watch?v=1MGjFKs9bnU
2•mitthrowaway2•28m ago•0 comments

Seeing the World Through Your Field (2024)

https://www.sebastianmellen.com/post/2024/seeing-the-world-through-your-field/
1•andsoitis•29m ago•0 comments

BorrowSanitizer

https://borrowsanitizer.com/
1•vinhnx•29m ago•0 comments

Tests for a PDF

https://blog.lvmbdv.dev/posts/tests-for-a-pdf/
1•vinhnx•30m ago•0 comments

Show HN: Memcode launches a new terminal coding agent

https://www.memcode.ai/
1•timerwin•31m ago•0 comments

Telegram Briefly Removed from App Store

https://www.macrumors.com/2026/08/04/telegram-briefly-removed-from-app-store/
1•zdkaster•32m ago•0 comments

Show HN: MCP for building secured apps on SQL databases

https://www.dronahq.com/mcp-server/
1•kinj28•39m ago•0 comments

Who coined the term "spin doctor"?

https://www.theguardian.com/notesandqueries/query/0,5753,-1124,00.html
2•teleforce•45m ago•0 comments