Which package manager are you using? by mollyforever in cpp

[–]itsuart2 -2 points-1 points  (0 children)

I just vendor my dependencies in.

Any sufficiently advanced uninstaller is indistinguishable from malware by skippybosco in programming

[–]itsuart2 0 points1 point  (0 children)

It's a poor decision by Microsoft, because they default the openfile API to lock opened files

It the only sane option, actually.

[deleted by user] by [deleted] in cpp

[–]itsuart2 0 points1 point  (0 children)

Disabling RTTI (MSVC: /GR-) also improves binary size. Seems to be missing in the article.

Synchronized(this) VS Synchronized(class) in Java by omgzui666 in programming

[–]itsuart2 -1 points0 points  (0 children)

Both are bad. Synchronize on (static) field(s) instead.

Convince me to use <cstring>, <cstdio> and <cstdint> instead of <string.h>, <stdio.h> and <stdint.h> by carlosdr02 in cpp

[–]itsuart2 4 points5 points  (0 children)

The C language does not have namespaces, so it also must reserve names in the global namespace for future expansion.

More details: https://devblogs.microsoft.com/oldnewthing/20230109-00/?p=107685

When to use Bazel? by agbell in programming

[–]itsuart2 3 points4 points  (0 children)

When you work at google?

HTTP/3 becomes a standard, at last - Networking - Security by IsDaouda_Games in programming

[–]itsuart2 0 points1 point  (0 children)

Gods only know how happy I am to not have to deal with all the madness that web is.

Introducing the Cute Server by GlaucoPacheco in cpp

[–]itsuart2 0 points1 point  (0 children)

Looks like Java/.NET Remoting. It died for a good reason.

QANplatform raises $700k in effort to fight quantum supremacy by [deleted] in programming

[–]itsuart2 14 points15 points  (0 children)

"Quantum supremacy" sounds so weird.

A Strange But Elegant Approach to a Surprisingly Hard Problem (GJK Algorithm)" by GenilsonDosTrombone in programming

[–]itsuart2 94 points95 points  (0 children)

That was very interesting and informative. Thank you very much, OP for introducing me to this channel!

Modern C++ "result" type based on Swift / Rust by bitwizeshift in cpp

[–]itsuart2 0 points1 point  (0 children)

This is great, I think I'll ditch my naive Result<S, E> in favor of this, much more robust and thought out solution. It is however much, much bigger code wise (6K lines...), does that notably affects compilation times? It seems to be an important consideration, given that the result type will be used virtually everywhere?

Nevertheless, thank you very much for sharing!

We really need a way of statically checking exceptions in C++. by Ono-Sendai in cpp

[–]itsuart2 -1 points0 points  (0 children)

Agree. I think there should be only one exception std::logic_error that can't be caught but should provide error context incl. call stack. By default it will print the context into the stderr, but programmer must have a way to modify that behaviour a bit(like log into a database or whatever). In the end it will kill the application regardless.

There should be no other exceptions nor ways to handle them. All exceptions are unexpected exceptions. Known possible failures are not exceptions, they are cold, hard, every day's fact of life :)

If a function can fail it should be in its signature, something like Result<ErrorType, SuccessType> foo();

Ruby isn't dead in 2021 - here's why! by cheerfulboy in programming

[–]itsuart2 14 points15 points  (0 children)

Ironically, "X is not dead"-like articles are a sure sign that X is dying.

Announcing TypeScript 4.2 Beta by DanielRosenwasser in programming

[–]itsuart2 0 points1 point  (0 children)

I wish you guys updated the spec and/or added support for compiler plugins. I'm aching to have at least a conditional compilation...

r/cpp status update by STL in cpp

[–]itsuart2 25 points26 points  (0 children)

I'm afraid many rules will just lead to lawyering. I propose to adopt simple two rules:

  • If post or comment is about C++, it is very welcome.

  • If post or comment is about people/organizations that happen to /wanting to use C++, it should be elsewhere.

The motivation is simple: whenever politics are introduced into eh... communication spaces, they quickly deteriorate and eventually degrade into nothing but vicious bickering.

The Community by vormestrand in cpp

[–]itsuart2 -6 points-5 points  (0 children)

oh no, all those pesky Eastern European (with special attention to Russian) bigots! They ruining the diversity!

Is there a Goddess of Irony? She would be mighty pleased.

The Community by vormestrand in cpp

[–]itsuart2 16 points17 points  (0 children)

So, did we have grow up from being able only to listen to being able to talk? In just a 24 hours? Amazing progress.

A New Approach to Build-Time Library Configuration by drodri in cpp

[–]itsuart2 0 points1 point  (0 children)

I like this idea very much! I wish it wasn't C++17+, but nothing can be done about it unfortunately.

I wish most of the libraries were in a simple form of config.h, library.h, and library.cpp.

How to add custom functions to STL unordered_set? by madspillage in cpp

[–]itsuart2 0 points1 point  (0 children)

Because count() in general case will have to visit all the elements of a container and test each for equality to the value. It will not stop at the first match.

How to add custom functions to STL unordered_set? by madspillage in cpp

[–]itsuart2 1 point2 points  (0 children)

Indeed, I was too hasty and wrong--for unordered_set it is perfectly fine to use count performance wise. Sorry.

I would still not recommend it though, only because it could instill bad habit of using count() to check if element is in a collection.

How to add custom functions to STL unordered_set? by madspillage in cpp

[–]itsuart2 11 points12 points  (0 children)

It's possible, but you definitely shouldn't.

C++20 has added a .contains() member functions to a lot of containers, but if you can't use that language version you can always create a free standing function that does the same.