frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Sampling at Negative Temperature

https://cavendishlabs.org/blog/negative-temperature/
1•ag8•59s ago•0 comments

Why Fears of a Trillion-Dollar AI Bubble Are Growing

https://www.bloomberg.com/news/articles/2025-10-04/why-ai-bubble-concerns-loom-as-openai-microsof...
2•haltingproblem•2m ago•0 comments

YC, Take Two

https://www.raf.xyz/blog/01-yc-take-two
1•2arrs2ells•6m ago•0 comments

Black to Play

https://blacktoplay.com/?p=624
2•kqr•8m ago•0 comments

How We Picked the Name 'Monzo' (2016)

https://monzo.com/blog/2016/08/26/how-we-picked-monzo
2•susam•10m ago•0 comments

AI-powered, self-hostable image proxy

https://imgproxy.net/
1•gschier•11m ago•1 comments

Unrealistic but Dreamworthy Interior Design Ideas

https://estimateproperty.blogspot.com/2025/10/unrealistic-but-dreamworthy-interior.html
1•dweepseek•18m ago•0 comments

If you can get past the terrible logo, Audacity 4 looks pretty great

https://www.theverge.com/news/792368/if-you-can-get-past-the-terrible-logo-audacity-4-looks-prett...
4•mikhael•24m ago•0 comments

Impro: Palantir's Weirdest Book Recommendation

https://www.generalist.com/p/impro
2•walterbell•30m ago•1 comments

Publication and Citation-Based Impact

https://www.rosenberglab.net/impact.html
2•kkoncevicius•33m ago•0 comments

High-Quality Pull-Request Descriptions

https://www.racecondition.software/blog/pr-descriptions/
2•ingve•41m ago•0 comments

I built a tool that lets you backtest trading strategies using plain English

3•satabdom27•46m ago•0 comments

Why George R.R. Martin Broke the Cardinal Rule of Hollywood

https://www.hollywoodreporter.com/movies/movie-features/george-r-r-martin-howard-waldrop-ugly-chi...
6•throwoutway•50m ago•3 comments

He Drops Trump Jr.'S Name in Pursuit of Billion-Dollar Deals

https://www.wsj.com/politics/policy/donald-trump-jr-friend-gentry-beach-03824825
2•doener•52m ago•0 comments

Hybrid unary-binary design for multiplier-less printed ML classifiers

https://arxiv.org/abs/2509.15316
1•PaulHoule•53m ago•0 comments

The two minute mile problem

https://hollisrobbinsanecdotal.substack.com/p/the-two-minute-mile-problem
1•HR01•54m ago•0 comments

Move Fast and Break Nothing

https://www.theatlantic.com/technology/2025/10/is-waymo-safe/684432/
1•andrewmutz•56m ago•0 comments

Google Chrome RCE (No Sandbox) via CanonicalEquality:EqualValueType()

https://ssd-disclosure.com/google-chrome-rce-no-sandbox-via-canonicalequalityequalvaluetype/
2•ogig•56m ago•0 comments

Ask HN: 10-Year Reddit Account Hacked Despite 2FA

6•guilamu•57m ago•4 comments

Short Science Fiction, by Isaac Asimov – Standard Ebooks

https://standardebooks.org/ebooks/isaac-asimov/short-science-fiction
2•WithinReason•57m ago•0 comments

Toybox: All-in-one Linux command line

https://github.com/landley/toybox
2•welovebunnies•58m ago•0 comments

Dimensional Analysis in Programming Languages (2018)

https://www.gmpreussner.com/research/dimensional-analysis-in-programming-languages
2•v9v•1h ago•1 comments

Show HN: OpenScreen. Open-source video assessment screening tool

https://github.com/dylnbk/open-screen
1•dylnbk•1h ago•0 comments

Kenneth Clark Civilisation 1969

https://www.youtube.com/playlist?list=PL4wbshl89IWTHc94BhZI-C-v-neF40boG
1•mosiuerbarso•1h ago•0 comments

A year of improving Node.js compatibility in Cloudflare Workers

https://blog.cloudflare.com/nodejs-workers-2025/
2•CharlesW•1h ago•0 comments

Florida student asks ChatGPT how to kill his friend, ends up in jail: deputies

https://www.wfla.com/news/florida/florida-student-asks-chatgpt-how-to-kill-his-friend-ends-up-in-...
2•trhway•1h ago•1 comments

Cariad: VW subsidiary largely discontinues its own software development

https://www.heise.de/en/news/Cariad-VW-subsidiary-largely-discontinues-its-own-software-developme...
1•esher•1h ago•0 comments

I Have a Wodehouse Problem. The Problem Is I Can't Stop Reading Him

https://thewalrus.ca/i-have-a-wodehouse-problem-the-problem-is-i-cant-stop-reading-him/
1•lermontov•1h ago•0 comments

GBoard Dial Version

https://www.youtube.com/watch?v=BgdWyD0cBx4
2•skogstokig•1h ago•0 comments

Gliding behind existing aircraft, Aerocart cargo gliders

https://www.aerolane.com/
2•fcpguru•1h ago•0 comments
Open in hackernews

Callbacks in C++ using template functors – Rich Hickey (1994)

http://www.tutok.sk/fastgl/callback.html
20•zengid•2h ago

Comments

zengid•2h ago
Heard about this watching Casey Muratori's "The Big OOPs" talk [0]. Thought it couldn't be _that_ Hickey, but turns out it was!

[0] https://youtu.be/wo84LFzx5nI?si=SBv1UqgtKJ1BH3Cw&t=5159

drnick1•1h ago
C++ was so much cleaner in the 90s, when it was still essentially "C with classes," which is how I like to use the language. Modern standards have turned it into an ugly mess.
drob518•1h ago
Amen. The syntax just kept getting more and more complicated. I gave up in the late 1990s. Ironically for this post, I now prefer to write everything in Clojure. It seems like my own journey has paralleled Rich’s journey. Maybe that’s why I appreciate so many of the design choices in Clojure. It’s not perfect, but it’s really, really good.
lbalazscs•53m ago
A sentence from the article: "Given the extreme undesirability of any new language features I'd hardly propose bound-pointers now."

It shows that C++ was considered too complex already in the 90s.

pton_xd•51m ago
I also use C++ as "C with classes," however I will concede that many of the modern C++ additions, particularly around templating, are extremely convenient. If you haven't had a chance to use requires, concepts, "using" aliases, etc I'd recommend giving them a try. I don't reach for those tools often, but when I do, they're way nicer than whatever this article is demonstrating from 1994! Oh yeah, also lambdas, those are awesome.
MomsAVoxell•32m ago
>ugly mess

That may be the case, but there are plenty of examples of elegant implementations.

JUCE, for instance:

    #include <juce_core/juce_core.h>

    class MyComponent {
    public:
        void doAsyncOperation(std::function<void(int)> callback) {
            // Simulate async work
            juce::MessageManager::callAsync([callback]() {
                callback(42); // Call the functor with result
            });
        }
    };

    // Usage
    MyComponent comp;
    comp.doAsyncOperation([](int result) {
        juce::Logger::writeToLog("Callback received with: " + juce::String(result));
    });
.. I think that's kind of clean and readable, but ymmv, I guess?
asveikau•9m ago
I dunno, I skimmed the article's 31 year old code examples and immediately thought they would be shorter and simpler in c++11 or later.

But it's important to see the 1994 (and 1998) view of the world to understand how modern c++ features work. Because they start from that worldview and start adding convenient stuff. If you don't understand how c++ used to work, you may be confused with why c++ lambdas look so weird.

mwkaufma•1h ago
Red flags for me when I see nonstandard functors in a c++ codebase (esp if the "glue" is in a setup function independent of the objects):

(i) Have they thought about the relative lifetimes of the sender and receiver?

(ii) Is the callback a "critical section" where certain side-effects have undefined behavior?

(iii) Does the functors store debugging info that .natvis can use?

(iv) Is it reeeeeeeally that bad to just implement an interface?

tcbawo•56m ago
Can you elaborate on your third point? What would a class need to do to affect debugging info?

Regarding your fourth point, sometimes an architecture can be vastly simplified if the source of information can abstracted away. For example, invoking a callback from a TCP client, batch replay service, unit test, etc. Sometimes object oriented design gets in the way.

To your first point, I think RAII and architecture primarily address this. I'm not sure that I see callback implementation driving this. Although I have seen cancellable callbacks, allowing the receiver to safely cancel a callback when it goes away.

mwkaufma•26m ago
>> Can you elaborate on your third point? What would a class need to do to affect debugging info?

Common implementations are a function pointer + void* pair, which in most debuggers just show you two opaque addresses. Better to include a info block -- at least in debug builds -- with polymorphic type pointers that can actually deduce the type and show you all the fields of the receiver.

>> sometimes an architecture can be vastly simplified if the source of information can abstracted away.

"sometimes" is doing a lot of heavy lifting here. That's my whole point -- more often than not I see some type of homespun functor used in cases that are _not_ simplified, but actually complicated by the unnecessary "plumbing."

>> RAII and architecture primarily address this

If the receiver uses RAII to clean up the callback, then you've reintroduced the "type-intrusiveness" that functors are meant to avoid...?

tcbawo•2m ago
> most debuggers just show you two opaque addresses

This has not been my experience. But I haven't needed to deal with RTTI disabled.

By RAII, I mean using destructors to unregister a callback. This covers 99.9% of use cases. Generally callback registration is not where you really want type erasure anyways.

dang•1m ago
Related. Others?

Callbacks in C++ using template functors (1994) - https://news.ycombinator.com/item?id=18650902 - Dec 2018 (50 comments)

Callbacks in C++ using template functors – Rich Hickey (1994) - https://news.ycombinator.com/item?id=12401400 - Aug 2016 (1 comment)

Callbacks in C++ using template functors (1994) - https://news.ycombinator.com/item?id=10410864 - Oct 2015 (2 comments)