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!

Pacerift – I built a motorcycle telemetry app using only phone sensors

https://play.google.com/store/apps/details?id=com.xspl.pacerift&hl=en_US
1•sauravXzent•26s ago•0 comments

I'm an obsessed hobby cheesemaker. [AMA]

https://old.reddit.com/r/AskMeAnythingIAnswer/comments/1uo6cqc/im_an_obsessed_hobby_cheesemaker_ama/
1•consumer451•57s ago•0 comments

Bird nests of fibre-optic cables show war's impact on Ukraine

https://www.reuters.com/business/aerospace-defense/bird-nests-fibre-optic-cables-show-wars-impact...
1•joebig•59s ago•0 comments

LaCie drives contain just regular Seagate drives inside

https://twitter.com/eftegarie/status/2073881763055641034
1•amin•1m ago•0 comments

Live Image/Video Translation

https://blog.davidv.dev/posts/mobile-translator-video/
1•wonger_•4m ago•0 comments

Time-based background colour transitions with Temporal and CSS color-mix

https://localghost.dev/blog/time-based-background-colour-transitions-with-temporal-and-css-color-...
3•gslin•6m ago•0 comments

WhaleCap: Keep your DeepSeek API credits from running out on day one

https://www.npmjs.com/package/whalecap
1•wayepoint•6m ago•0 comments

RPB – Raylib Project Builder

https://raysan5.itch.io/raylib-project-builder
1•Erenay09•8m ago•0 comments

RPC – Raylib Project Creator

https://raysan5.itch.io/raylib-project-creator
1•Erenay09•8m ago•0 comments

EasyJet reaches 'agreement in principle' over potential takeover

https://www.bbc.com/news/articles/cgjxx7ngz51o
1•a_paddy•9m ago•0 comments

A hot summer trend in the sharing economy? Rental swimming pools

https://text.npr.org/nx-s1-5876505
2•mooreds•10m ago•0 comments

Completing a Computer Science Degree on Coursera

https://notesbylex.com/completing-a-computer-science-degree-on-coursera
3•lexandstuff•10m ago•0 comments

Ask HN: How to get a non-technical friend into tech?

2•yesitcan•11m ago•2 comments

Small details in my Mastodon client that I wanted more people to notice

https://w.on-t.work/outpost-frontend-details
2•birdculture•11m ago•0 comments

Everyone loves apprenticeships. So why can't Britain create more of them?

https://www.ft.com/content/1a19a8c6-2472-497a-8f2e-68ace9532804
2•mmarian•14m ago•1 comments

Show HN: Can I Walk My Dog? Weather-based safety calculator for dog walks

https://rainbow-salmiakki-336e9b.netlify.app/
2•OtmaneBenazzou•18m ago•0 comments

Show HN: Thunderstorm tracker for Mexico England world cup game

https://tlaloc.cloud/
2•mgranados•22m ago•0 comments

Reparaible and open source paper printer

https://www.opentools.studio/
10•bouh•28m ago•0 comments

Dungeon Proof Crawler: learn how to write proofs with RPG

https://dhilst.github.io/algae/game/index.html
8•SchwKatze•30m ago•1 comments

Why New Jersey's balcony solar bill is a huge deal for renters

https://www.cnn.com/climate/new-jersey-balcony-solar-renters
5•breve•33m ago•1 comments

Y Combinator.singles

https://www.ycombinator.singles/
2•nadermx•33m ago•0 comments

Ask HN: Are you guys happy with existing social networkin apps?

7•julienreszka•34m ago•5 comments

Pint in England

https://dispatch-media.com/the-best-pint-in-england/
7•gripfx•35m ago•0 comments

The new Teddy Roosevelt library is a gorgeous extension of the prairie

https://www.fastcompany.com/91568422/theodore-roosevelt-presidential-library
4•eatonphil•36m ago•0 comments

Hollywood's spent 25 years chasing the wrong lessons from The Lord of the Rings

https://www.polygon.com/lord-of-the-rings-25-years-fantasy/
4•HelloUsername•39m ago•0 comments

How to Dox Anyone

https://madattheinternet.substack.com/p/how-to-dox-anyone
9•majorchord•40m ago•2 comments

Show HN: clip.video - Turn podcasts and long videos into short vertical clips

https://clip.video/
2•nadermx•42m ago•0 comments

Organic Maps open source dispute

https://isitreallyfoss.com/projects/organic-maps/
3•maxloh•43m ago•0 comments

What Should We Optimize Away?

https://www.autodidacts.io/holistic-optimization/
2•Curiositry•45m ago•0 comments

Dependencies should be fetched directly from VCS

https://www.arp242.net/deps-vcs.html
4•mrngm•47m ago•1 comments