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

Yes and as a corollary, it has nothing to do with Venezuela having the largest oil reserves of any country.

Not a lot since Maduro had no objections to selling the Oil to the US.

Is one reason that Russia is an empire, created as the same time as the British and French empires, ruling over countries with their own long histories and separate cultures that would break apart without an autocratic government?

Open a file in the constructor, close it in the destructor. RAII with 0 allocations.


std::vector<int> allocated and freed on the stack will allocate an array for its int’s on the heap…


I've heard that MSVC does (did?) that, but if so that's an MSVC problem. gcc and clang don't do that.

https://godbolt.org/z/nasoWeq5M


WDYM? Vector is an abstraction over dynamically sized arrays so sure it does use heap to store its elements.


I think usefulcat interpreted "std::vector<int> allocated and freed on the stack" as creating a default std::vector<int> and then destroying it without pushing elements to it. That's what their godbolt link shows, at least, though to be fair MSVC seems to match the described GCC/Clang behavior these days.


Sure, but my point was that RAII doesn't need to involve the heap. Another example would be acquiring abd releasing a mutex.


If they are trans or not he still "died for his beliefs", as he had said:

"I think it’s worth to have a cost of, unfortunately, some gun deaths every single year so that we can have the Second Amendment to protect our God-given rights."


Is "trans people shouldn't own guns" a "deeply intellectual" thought? Or even one that supports 2A?


Reminds me of parts of Service Model by Adrian Tchaikovsky:

https://en.m.wikipedia.org/wiki/Service_Model


Why can't you use this for the comparison operator:

  bool operator<(const interval& x, const interval& y)
  {
     if x.min < y.min return true;
     if x.min > y.min return false;
     return x_max < y.max;
   }


better implemented as

    tie(x.min, x.max) < tie(y.min, y.max)


Or since C++20, just default operator<=>: https://en.cppreference.com/w/cpp/language/default_compariso...


That’s fine if you just need any well-defined SWO, but I presume the author needs this specific ordering for some algorithmic reason. Still, it’s pretty ugly for a comparator to be throwing.


Possibly however homo erectus used the same design for their hand axes for over a million years. This implies the design was hardwired in their brains, in the same way the design of nests are hardwired in bird brains, as opposed to a rationally thought out design.


The deeper you go into those thoughts the more you realize theres no rationalization if you go the hard deterministic way


English and Scots are also of course remnants of a foreign invasion.


So are the Gaelic languages. (It's turtles all the way down).


Gaelic arrived in Scotland within 100 years of English arriving in England. They are both attested to arrive in around the 4th - 5th AD century IIRC. Before that Scotland spoke Pictish (which is not known in the modern era and may/maynot have been a Brythonic language) and a language related to Welsh in the Lowlands. Gaelic is a very interesting language and should absolutely get championed and preserved, but it is not the ancient language of Scotland, and hasn't really been spoken there much longer than the English language was in the UK.


"Beware of bugs in the above code; I have only proved it correct, not tried it."

Donald E. Knuth


Single cell organisms can be light sensitive. Can move away or towards light. The signal cell erythropsidinium even has an "eye":

https://en.wikipedia.org/wiki/Erythropsidinium


Yes, these organisms are really complex even though they are unicellular.


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

Search: