HNHacker News
TopNewBestAskShowJobs

embe42

43 karma · joined June 17, 2021

submissionscomments
embe42··on Skip the Tips: A game to select "No Tip" but dark patterns try to stop you
My bank (mBank in Poland) has per card options for declining various types of transactions, among others: made using the magnetic strip, with DCC, with added ATM surcharges. The bank probably cannot disable the "service" offered by the terminal but seems to get enough information to be able to decline the transaction.
embe42··on Uv is the best thing to happen to the Python ecosystem in a decade
You might be interested in pixi, which is roughly to conda as uv is to pip (also written in Rust, it reuses the uv solver for PyPI packages)
embe42··on Why Safety Profiles Failed
I think the implementation in C++ does not do realloc on push_back, but allocates new memory, creates the new element and only then deallocates it.

I believe the reason f3 is safe is that the standard says that the iterators/references are invalidated after push_back – so push_back needs to be carefully written to accept aliasing pointers.

I am pretty sure if I were writing my own push_back it would do something like "reserve(size() + 1), copy element into the new place", and it would have different aliasing requirements...

(For me this is a good example of how subtle such things are)