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!

Show HN: DynamicNotch – An interactive, customizable notch utility for macOS

https://github.com/Hitjack007/DynamicNotch
1•Hitjack007•4m ago•0 comments

Show HN: Agenttab – Status Icons for Claude Code, Codex and OpenCode Tabs

https://github.com/marciob/agenttab
1•marciob•5m ago•0 comments

How do you turn a random idea into a good X post?

https://hokly.vercel.app
1•Raimundoevita•8m ago•1 comments

Gold-rich Nicaragua hands Chinese miners rights to a tenth of its land

https://www.ft.com/content/452648fd-90d6-450f-9739-073f5b6a0d18
1•JumpCrisscross•11m ago•0 comments

Judge orders release of records on Nazi war criminals who settled in Canada

https://ottawacitizen.com/public-service/defence-watch/judge-orders-release-of-records-on-nazi-wa...
3•Teever•13m ago•1 comments

Leaked Gemini 4 Pro numbers

https://www.reddit.com/r/GoogleGeminiAI/comments/1wqze2k/looking_at_the_leaked_gemini_4_pro_numbe...
1•simonpure•15m ago•0 comments

What Happened in Austin

https://www.freerange.city/p/what-happened-in-austin
1•JumpCrisscross•16m ago•0 comments

Hitachi to double US production of small and medium-sized power transformers

https://www.utilitydive.com/news/hitachi-to-double-us-production-of-small-and-medium-sized-power-...
3•JumpCrisscross•16m ago•0 comments

The Great Crime Decline Is Happening All Across the Country

https://www.theatlantic.com/ideas/2026/01/great-crime-decline/685695/
2•andsoitis•17m ago•0 comments

ISO100 – Photography portfolios without designing a website

https://iso100.app/
1•ElbertF•18m ago•0 comments

Dropping Swift from our Bevy iOS crates

https://rustunit.com/blog/2026/09-04-bevy-ios-crates-objc2/
1•arto•18m ago•0 comments

Medicare admin using WISeR AI to approve/deny medical care for seniors

https://arstechnica.com/health/2026/09/trump-admin-using-ai-to-deny-medical-care-for-seniors-in-d...
1•Gaishan•19m ago•0 comments

An Open Letter to Scott Alexander

https://quillette.com/2026/09/26/an-open-letter-to-scott-alexander-steven-pinker-ai-alignment-saf...
2•cobbzilla•19m ago•0 comments

Show HN: Has Anthropic been nerfing their models without disclosure

https://github.com/ninjahawk/livenerf
2•ninjahawk1•22m ago•0 comments

Safe Optimistic Lock Coupling

http://databasearchitects.blogspot.com/2026/04/safe-optimistic-lock-coupling.html
1•greghn•22m ago•0 comments

As A.I. Accelerates, Governments Are Increasingly Being Left Behind

https://www.nytimes.com/2026/09/27/technology/ai-government-regulation.html
2•Betelbuddy•23m ago•0 comments

Show HN: Sigilla – A Lexicon of Marks

https://symbol.wiki/?q=&t=&v=
2•r_singh•29m ago•0 comments

Flipper Zero on Garmin Watch

https://rdnsec.info/projects/flipper-on-garmin/
2•rdn86•30m ago•0 comments

Ownership

https://registerspill.thorstenball.com/p/ownership
2•gpi•40m ago•0 comments

Blend and Haul: Fertilizer Blending Simulator

https://game.wedgworth.com/
2•paltman•42m ago•1 comments

Raku Koans

https://hankache.github.io/raku-koans/
2•hankache•43m ago•0 comments

Jupyter Ipywidget for Editable Tables

https://pypi.org/project/ipyrowtable/
2•jeffrey_t_b•50m ago•1 comments

Newcomb's Problem and Two Principles of Choice (1969) [pdf]

https://danielhoek.com/wp-content/uploads/2020/02/Nozick-Newcombs-Problem-and-Two-Principles-of-C...
3•doener•56m ago•0 comments

Predictable Swarm Scaling

https://wenhaochai.com/blogs/predictable-swarm-scaling.html
1•arkwor•57m ago•0 comments

Show HN: Fusor – Like Vue, but the logic is Rust

https://fusor.build
3•andreespirela•58m ago•0 comments

Newcomb's Problem and Two Principles of Choice

https://link.springer.com/chapter/10.1007/978-94-017-1466-2_7
1•doener•59m ago•0 comments

Functional Decision Theory: A New Theory of Instrumental Rationality (2018)

https://arxiv.org/abs/1710.05060
2•doener•1h ago•0 comments

Ask HN: What are people doing with their OpenClaw set ups now?

2•will10pa•1h ago•0 comments

Rene-1: Open-weight classifier sets SOTA on Decision Index (+9 over Jev)

https://huggingface.co/salfatigroup/rene-1-31b-fp8
4•elonsalfati•1h ago•2 comments

What archaeology reveals about the rise of all-powerful rulers

https://knowablemagazine.org/content/article/society/2026/what-archaeology-reveals-about-rise-of-...
3•marojejian•1h ago•1 comments