News for hackers. Stuff that matters.

dabitude

Re:Why do you guys hate school so much? on Sunday November 27, 2022 @03:24PM (#33766503)
In schools, there is a lot of violence and aggressivity. Kids hit, lie, steal, call names, harass. When two kids are fighting, they frequently are both punished even if actually one was only defending themselves and was in the right. Sometimes the whole class is punished for the misbehaving of a few.

We would not accept being treated like this as adults, but yet we have no problems putting our kids through this.

Re:In Defense of Linked Lists on Saturday November 05, 2022 @02:10AM (#33478462)
These are flat_map, flat_set, flat_hash_map, etc ...

See: https://en.cppreference.com/w/cpp/header/flat_map

Re:Constructors and evil initializers in C++ on Wednesday November 24, 2021 @03:37PM (#29334841)
I work without exceptions, and the typical solution is to crash the whole program (using assert) if the parameter is invalid. This way you can preserve the invariant.

To avoid crashing, the caller has to validate the parameters before calling the constructor, and handle the invalid parameters at this time rather than in the exception handler, but in the end it's the same.

Re:iDOS 2 will be gone soon on Thursday July 22, 2021 @05:49PM (#27924799)
You are not allowed to submit a web browser to the app store with your own javascript interpreter.
Are real numbers uniformly spaced? Or are there clusters?
Chrome developper here: do you have details about this? If it happens that's definitely a bug.
Re:Should C Programmers Learn C++, Go or Rust? (2018) on Thursday May 09, 2019 @01:24PM (#19870201)
You don't need a benchmark. Given any C code, you can make a C++ code that runs as fast (just use the same code). This proves that C++ is at least as fast as C.

From there, maybe you could use C++ features to improve the speed (and then C++ is faster) or you could not (and then they have the same speed).

Re:Git reset vs. Git revert on Tuesday February 05, 2019 @03:12AM (#19083701)
This is a pretty bad article.

In the last example (which is actually the most common case in practice), they give wrong instructions. They should only revert the bad commit, not all the following commits. Reverting everything is impractical and useless, and if you want to do that you may as well use revert (which is still a bad idea).

Re:Why Doesn't Google Comply with Do Not Track? on Friday December 07, 2018 @03:59PM (#18631590)
As far as I remember, one of the main problems with DNT is that most its users actually didn't enable it intentionally (because there are browsers that enable it by default).

Edit: internet explorer used to do that (https://en.wikipedia.org/wiki/Do_Not_Track#Internet_Explorer...)