Recent submissions

Comment · 1 year ago
What's stopping you from UAF or OOB array access in Delphi?
Comment · 1 year ago
Why is Delphi/Object Pascal an MSL?
Comment · 2 years ago
What libraries have you used?
Comment · 3 years ago
Why not use “:memory:”?
Comment · 3 years ago
std::aligned_storage has been deprecated since C++23
Comment · 3 years ago
What’s wrong with generators?
Comment · 3 years ago
Using the svg as mask image in css is presented to have the disadvantage of two separate requests (one for css and the other for the svg content). That can be overcome by inlining the svg directly in the css file.
Comment · 3 years ago
Nice, but good luck debugging if cmp returns -1. This is C++ after all and there is no constraint/concept to enforce the function to return bool. If you're lucky you get a sign mismatch warning.
Comment · 3 years ago
Not entirely true. You can pool allocate a C++ coro.
Comment · 4 years ago
You can do both: two years ago I was looking for the best solution to ship a cross platform app (Android + Windows) and I just couldn’t decide whether to go platform-based UI + a shared C++ core or React Native. I ended up using React Native + a shared C++ core exposed as a RN module. As long as the API surface is narrow (and it is for my use case) this turned out well and it still gives me the possibility to scrap RN at any given time for platform based UIs.

Bonus: since most of my logic is C++, I am still able to ship the app using two RN versions: 0.59 for Windows 7 and 0.67 for Android

Comment · 4 years ago
And then someone will convert a std::string_view to a const char* and things will explode...
Comment · 4 years ago
Comment · 4 years ago
That's interesting, but it won't work with native code that statically links a SSL implementation.
Comment · 4 years ago
Your example only works because the optimizer eliminates your call to std::to_string.

Call get_fizzbuzz(11) and you'll see the error.

Comment · 4 years ago
No, it can't. std::to_string isn't constexpr. And even if it was, it still wouldn't work because the std::string needs to be destroyed inside the constexpr context.

The article is also wrong because std::to_chars isn't constexpr so you can't use that.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton