5. Interconverting Std:Function with Copyable_function (quuxplusone.github.io)

C++11 introduced std::function as a type-erased
callable-object holder. function was badly designed in a few ways: Its rarely used
β€œgo fish” API bloats
every user; it advertises operator() const even when the controlled object’s operator()
is mutating; it handles what should be a precondition violation by throwing an exception,
which again bloats every user and means its operator() can never be noexcept.
So C++26 fixed these problems by adding
std::copyable_function.
(Which preserves some of function’s
suboptimal design decisions: copyable_function<bool()> remains implicitly convertible
to copyable_function<void()>, contextually convertible to bool, and assignable
from nullptr.)

C++26 introduces std::copyable_function to address the shortcomings of std::function, such as its cumbersome API and exception handling. This new type aims to improve usability while ensuring better performance and safety for developers.

8. Show HN: I think I made my own web version of minimalistic audacity (github.com)

Professional audio polishing in the browser. Zero servers. 100% Private. Built with FFmpeg.wasm. - askpext/HERTZ

A new web-based tool offers professional audio editing without the need for servers, ensuring complete privacy. Built using FFmpeg.wasm, it presents a minimalistic alternative to traditional software like Audacity.

16. Thanatos Rising (theamericanscholar.org)

A 1930s correspondence between Albert Einstein and Sigmund Freud laid out each man’s views on war and peace

A fascinating exchange between two intellectual giants, Albert Einstein and Sigmund Freud, reveals their contrasting perspectives on the nature of war and the possibility of peace during the tumultuous 1930s. Their correspondence offers valuable insights into the philosophical underpinnings of conflict and human behavior.

Article Details

Browse by Date

Type to search HN and engineering blog articles
Press Escape to close  |  ↑↓ to navigate  |  Enter to open