Hacker Newsnew | past | comments | ask | show | jobs | submit | hacker_homie's commentslogin

You are thinking of std::swap, std::rotate does throw bad_alloc

I see it says that it may throw bad_alloc, but it's not clear why, since the algorithm itself (e.g see "Possible implementation" below) can easily be done in-place.

https://en.cppreference.com/w/cpp/algorithm/rotate.html

I'm wondering if the bad_alloc might be because a single temporary element (of whatever type the iterators point to) is going to be needed to swap each pair of elements, or maybe to allow for an inefficient implementation that chose not to do it in-place?


Time to go outside and touch grass it’s the only financially responsible thing to do until prices become reasonable again.

2026: Copilot chat boxes everywhere, Users typed everything. Peak convenience.

You type the question, Copilot tells you where to click.

"Bit higher, higher, no too far, down now, no, below the red line. The other red line. Yes this one... no the one you were just over".


Press any key to continue, or any other key to quit.

Probably because there's internal conflicts between the store team and the applications group, that neither of them want to deal with anymore, this might have been for the windows S support (remember store only windows).

They have their own distribution system, so they don't need this anymore.


clickonce for a brief shining moment was the closest we ever got to being able to deploy an application like a webpage.

I did run into a lot of issues with the store/winrt APIs where there were backdoors that the NTDev team used to work around all the limitations, but they would never publish them.


Honestly it really has been nice down here in Gentoo, now they have bin packages it even use it on laptops.

I even use flatpaks for the stuff I don't want to build, everything just works most of the time.

there are only two versions of libc mine and the one you brought with you.


This kinda sounds like hell for low memory machines. RIP shared memory optimizations.

I wish I could make the borrow checker give warnings not errors. It would make exploration so much easier, so I don’t have to fight the borrow checker until I know how to build what I want.

Then you have code full of warnings and undefined behavior?

I think fighting the borrow checker is more like a rite of passage. Rust is not my favorite language but the borrow checker is great.


This is not a hacker’s take

I'm lazy. If you turn off the borrow checker the code will need a rewrite later, since it's there for a very good reason.

Test, just don’t verify.

How I learned to deploy faster.


Make the deprecated method slower with a function from the deprecation release so the longer it goes on until it gets to around a day.

then remove the function.


But I need to see what they are googling! /sarcasm


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: