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

when talking about a set of characters, alphabet is a commonly used term https://cs.stackexchange.com/search?q=string++alphabet+size


Sure, but if your doing work in machine learning that’s generally not the terminology used, hinting that this isn’t the area the author specializes in (which isn’t a bad thing, but take their explanations with a grain of salt).


did you check the header of that cpp? they are storing it in a shared_ptr: shared_ptr = referenced counted pointer = RAII

they should have used make_shared, but it is still safe


Which isn't exception safe, as any good C++ developer would know.


You are getting that because other people do not care about what you are searching for :( their AI is maximizing the chances of quickly finding what most people want, not what you want.


Most people want offers to sell fictional criminal records and address records that don't match what I searched for? I don't think the AI understands what the word "most" means.


unfortunately, those websites are probably more popular than the church's website in question (or at least, receive more clicks from google search)


They are relying too much on AI and "collective wisdom". The results you get now are what Google thinks you want based on what others want, not on what you are actually searching for. What you typed is now treated as a mere clue, not as a search key.


Stepanov disagrees. You should return the second parameter if a, b are equivalent (and you should use < anyway):

  template<typename T>
  inline constexpr const T& max(const T& a, const T& b) {
     return (b < a ? a : b);
  }


What’s the reasoning behind this?


I think to be comparable in c++ types are required to implement < operator and the same is exclusively used by the stdlib.


If you sort2(a, b), it would be nice if min(a, b) == a && max(a, b) == b.


disable high resolution clocks for non-sudo programs?


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

Search: