frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Beautiful Type Erasure with C++26 Reflection

https://ryanjk5.github.io/posts/rjk-duck/
33•RyanJK5•1h ago

Comments

RyanJK5•1h ago
Try it on Compiler Explorer: https://godbolt.org/z/91dj5jeGW

Check out the source code: https://github.com/RyanJK5/rjk-duck

rob74•1h ago
The things people describe as "beautiful" never cease to amaze me...

...but, as they say, beauty is in the eye of the beholder!

RyanJK5•1h ago
Beauty in C++ may be most similar to lipstick on a pig, but we try our best.
flossly•1h ago
I admire you guy keep trying.

I'm also glad I do not write C++ on the daily anymore: luckily my software does not need that kind of performance characteristics.

germandiago•1h ago
I still reach for C++ on the backend. Honestly, with all its warts, I like it overall.

You can write pretty fast and reasonable code nowadays.

pjmlp•2m ago
Yet I imagine your software depends on C++.
bunderbunder•27m ago
I don’t really like much about C++ anymore, but I still enjoy reading C++ articles and listening to C++ podcasts, and I would consider it beautiful. Oftentimes the things I dislike about it are also the beautiful things. The term “beautiful mess” seems appropriate.

It’s a bit like a well-kept Victorian home. The amount of work, money, and dealing with discomfort that goes into maintaining one isn’t something I really want to experience for myself. But the amount of skill and craftsmanship that it takes to preserve one is still impressive, and I have to appreciate the respect for history and the care that goes into balancing it with modern concerns.

And talking to people who do live the life is always a great learning experience.

tw1984•17m ago
> I would consider it beautiful

I had the same misunderstanding before I get to know CS. that was 30 years ago.

feverzsj•1h ago
Reflections, especially static ones, are horrible for debugging.
RyanJK5•1h ago
This library tries its best to mitigate that, catching common errors and whatnot, but it can definitely still happen. C++ doesn't have full token injection yet, so it avoids some of the more common pitfalls, if incidentally.

As an aside, you may want to check out Jai's approach. I believe everything you generate statically gets turned into a file by the compiler for debugging purposes, which it provides references to in the output.

pjmlp•3m ago
Depends pretty much on the language and IDE tooling being used.

Those against IDEs, well they already voted against good tooling in first place.

Codex starts encrypting sub-agent prompts

https://github.com/openai/codex/issues/28058
266•embedding-shape•2h ago•161 comments

Codex scraped the ICM website and discovered 2026 Fields Medal winner list

https://phemex.com/news/article/2026-fields-medal-winners-list-leaked-includes-two-peking-univers...
101•zaikunzhang•2h ago•71 comments

Proof of Care in the Age of A.I

https://jacobfilipp.com/care/
54•jfil•1h ago•26 comments

Beautiful Type Erasure with C++26 Reflection

https://ryanjk5.github.io/posts/rjk-duck/
34•RyanJK5•1h ago•11 comments

Show HN: I RL-trained an agent that trains models with RL (for –$1.3k)

https://github.com/Danau5tin/ai-trains-ai
37•Danau5tin•1h ago•13 comments

Coding agents think ahead of time

https://arxiv.org/abs/2607.05188
40•andre15silva•1h ago•29 comments

Kids (With Phones) Are Alright

https://heatherburns.tech/2026/07/08/the-kids-with-phones-are-alright/
31•JumpCrisscross•3d ago•24 comments

Tensor Is the Might

https://zserge.com/posts/tensor/
18•eatonphil•1h ago•6 comments

Japan develops a method to recover up to 90% of lithium from used EV batteries

https://tech.supercarblondie.com/japan-recovers-up-to-90-of-lithium-from-used-ev-batteries/
646•donohoe•11h ago•172 comments

Punch Yourself in the Face with Reality

https://adi.bio/reality
66•AdityaAnand1•2h ago•28 comments

Alternative(s) to run CUDA on non-Nvidia hardware

https://www.hpcwire.com/2026/07/09/spectral-compute-aims-to-set-cuda-free-will-it-succeed/
94•alok-g•5h ago•43 comments

Actegories

https://bartoszmilewski.com/2026/06/30/actegories/
30•ibobev•3h ago•4 comments

Differentiable Fortran with LFortran and Enzyme

https://docs.pasteurlabs.ai/projects/tesseract-core/latest/blog/2026-07-09-enzyme-lfortran-autodi...
19•dionhaefner•1h ago•2 comments

Germany set to restrict its Freedom of Information Act

https://www.dw.com/en/germany-freedom-of-information-act/a-77939695
123•robtherobber•2h ago•68 comments

Australian energy retailers must provide three hours of free daytime electricity

https://lenergy.com.au/free-daytime-electricity-is-coming-heres-how-it-actually-works/
172•i2oc•9h ago•264 comments

Indian scientists produce most detailed 3D atlas of the human brainstem

https://www.bbc.com/news/articles/cg53l737v1qo
121•BaudouinVH•7h ago•15 comments

A framework for frontier AI and the dawning of a new age

https://twitter.com/demishassabis/status/2076957440109625718
5•asiergoni•5h ago•0 comments

The git history command

https://lalitm.com/post/git-history/
372•turbocon•13h ago•249 comments

The Future Worth Building Is Human

https://thinkingmachines.ai/blog/the-future-worth-building-is-human/
74•bilsbie•3h ago•44 comments

Just Let Me Write Digits

https://gendx.dev/blog/2026/07/13/input-digits.html
111•brandon_bot•8h ago•41 comments

YouTrackDB is a general-use object-oriented graph database

https://github.com/JetBrains/youtrackdb
151•gjvc•10h ago•48 comments

Paxos Made Simple (2001)[pdf]

https://lamport.azurewebsites.net/pubs/paxos-simple.pdf
3•grep_it•4d ago•0 comments

Notable Knot Index (2016)

https://knots.neocities.org/knotindex
45•surprisetalk•5d ago•6 comments

Your 'App' Could Have Been a Webpage (so I fixed it for you)

https://danq.me/2026/07/09/your-app-could-have-been-a-webpage/
171•MrVandemar•3d ago•142 comments

Show HN: Rejourney – Open-source revenue leak prediction for web and mobile apps

https://github.com/rejourneyco/rejourney
20•mrr7337•3h ago•1 comments

Fundamentals of Wireless Communication (2005)

https://web.stanford.edu/~dntse/wireless_book.html
158•teleforce•12h ago•10 comments

How to build a circular LCD clock

https://blinry.org/lcd-clock/
115•birdculture•2d ago•53 comments

An Englishwoman who sketched India before photography took hold

https://www.bbc.com/news/articles/cm2drrv6q54o
196•1659447091•15h ago•60 comments

Satellite Tracker – Live Map of Starlink and 30k Satellites

https://satellitemap.space/
128•rolph•12h ago•64 comments

The great digital fatigue: How digital burnout is changing social media use

https://blog.incogni.com/digital-fatigue-and-burnout/
66•derbOac•3h ago•61 comments