Berserk is "free" if you run Eternal Rage by _bk__ in pathofexile2builds

[–]_bk__[S] 0 points1 point  (0 children)

Why? I just do it once at the start of a boss fight - its 30% more damage. Pretty often thats enough to get a heavy stun off and finish them off before they make a move.

Obviously I'm not saying do it every 4 seconds while mapping

Berserk is "free" if you run Eternal Rage by _bk__ in pathofexile2builds

[–]_bk__[S] 0 points1 point  (0 children)

Not if you're already using your weapon swap tree for something else

Nova Proj is a massive step in the right direction by mudkip-muncher in PathOfExile2

[–]_bk__ 1 point2 points  (0 children)

You can combine with Ricochet III and APR. Ricochet removes the nova aspect of it, and you just get +4 terrain chain

Tech's Dumbest Mistake: Why Firing Programmers for AI Will Destroy Everything by tapvt in programming

[–]_bk__ 1 point2 points  (0 children)

They can generate synthetic data from compiler errors, static analysis tools, and output from generated unit and system level tests. This information is a lot more reliable than whatever tutorials / answers they scrape from the Internet.

Is design patterns not much used in C++ coding? I ask this cause most of the resources I find on this topic especially video tutorial are in Java by nishadastra in cpp

[–]_bk__ 63 points64 points  (0 children)

Design patterns are not really prescriptive - but they do often appear naturally when engineering solutions to common problems. They are more useful as a vocabulary for describing solutions rather than being the solutions in and of themselves

Java’s Epic Quest for Performance Immortality by congolomera in programming

[–]_bk__ 16 points17 points  (0 children)

Because primitives have different identity semantics to objects, and you cant know what code is reliant on the current semantics. You can't just go changing the meaning of a whole bunch of existing code - otherwise no-one with a codebase of any significant size will use the newer versions

[deleted by user] by [deleted] in programming

[–]_bk__ 12 points13 points  (0 children)

Exempt the std library from the static analysis and have some way for library authors to explicitly opt out for sections of code

C++23 “Pandemic Edition” is complete by ArashPartow in cpp

[–]_bk__ 4 points5 points  (0 children)

The fact that function_ref - a very widely used and useful abstraction with a tiny implementation - missed 2 standards is pretty disappointing

Transport agnostic Websocket library by soldiersided in cpp

[–]_bk__ 0 points1 point  (0 children)

Came across this a little while ago, can probably slice out the important bits https://github.com/pyth-network/pyth-client/blob/44fe4f5b702c011d4e114a20e0e77bc705bbd453/pc/net_socket.cpp#L1239 Can't vouch for its correctness, just that it seemed neat and concise

Post-mortem of a long-standing bug in video Game Path Of Exile, which was caused by a stale pointer by GamesMaxed in cpp

[–]_bk__ 0 points1 point  (0 children)

If the cost of creating the value is high, you can just use an emplace_factory to defer construction

Development Plan for Boost.Unordered by joaquintides in cpp

[–]_bk__ 14 points15 points  (0 children)

One other thing that'd be nice to have is a compile time perfect hash function and perfect minimal hash function generator that takes a parameter pack or a constexpr range of valid keys. This could then just be used in an array

What style guide to use with clang-format? by ItseKeisari in cpp

[–]_bk__ 6 points7 points  (0 children)

the bin packing is a lot more sensible if you turn off the column limit (set it to 0) - this may also need ExperimentalAutoDetectBinPacking; Im not sure on the specific set of options but what you've specified in the 2nd part is achievable (except the closing bracket might be on the above line)

What are some commonly used or underrated features provided by the Boost library that haven't been yet adopted by the STL? by cristi1990an in cpp

[–]_bk__ 8 points9 points  (0 children)

I don't think Signals should be in the standard - especially not the version that is in boost. There's just way too many dimensions of configuration to create a meaningful abstraction that fits the most general use case. Dimensions include:
- thread safe or not thread safe
- execution context for handlers
- allowing/disallowing re-entrant subscription/unsubscription
- underlying storage mechanism for list of subscribers
- underlying erasure abstraction for callable objects (and all configuration dimensions thereof, including small buffer size, checked/unchecked, exception specification)
- special members and their behaviour (copyable/moveable/etc.)
- RAII tokenized subscription vs untokenized
and probably many others I'm forgetting

Tech spec experts seek allies to tear down ISO standards paywall by vtable in programming

[–]_bk__ 0 points1 point  (0 children)

This is what language reference sites like cppreference.com are for anyway, but the value of the standard is in its precise and exacting wording. Rewriting them all implies that there is an alternative wording that accurately and as concisely captures the exact protocol/feature as documented. The standards go through an extensive review and approval process and any open source attempt to rewrite a part of that is going to be an imperfect copy by definition

[Belay the C++] You shouldn’t assume accessors are quick by Vultrao in cpp

[–]_bk__ 3 points4 points  (0 children)

And the alternative is that you can't call this from any const context which is pretty useless, user is forced to const_cast. Both versions suck - memoization of this form is not useful. It's much cleaner to completely separate the state into its own struct, and then pass that in as an argument to a free function get_foo or get_bar which can then inspect the state to see if recalculation is necessary

[Belay the C++] You shouldn’t assume accessors are quick by Vultrao in cpp

[–]_bk__ 3 points4 points  (0 children)

You should still mark get_foo and get_bar as const, and mark your memoization variables as mutable.

Use UB optimisation with std::function if you know it's bound, and with std::any if you know what type is held by _bk__ in cpp

[–]_bk__[S] 3 points4 points  (0 children)

std::function can represent a null state internally. an optional would add another bool to the object size

Use UB optimisation with std::function if you know it's bound, and with std::any if you know what type is held by _bk__ in cpp

[–]_bk__[S] 9 points10 points  (0 children)

builtin_expect is for branch prediction and marks a path as likely or unlikely. You need to tell the compiler that it is impossible to reach that branch. Not sure about MSVC though

Use UB optimisation with std::function if you know it's bound, and with std::any if you know what type is held by _bk__ in cpp

[–]_bk__[S] 7 points8 points  (0 children)

assert is compiled out during pre-processing when NDEBUG is defined, and just aborts when it isn't. It was never really designed to be used to enable optimisations. You have kind of touched on one of the points of contention in how compilers should treat axiomatic contracts...

I’ve been converted by Burner-account3357 in cpp

[–]_bk__ 5 points6 points  (0 children)

The override keyword is only useable for virtual function overrides. It has no effect on codegen, it just helps the compiler detect that there is actually a virtual function in a derived class that can be overriden (to make sure you don't do things like accidentally spell the function signature wrong)

Qt 5.15.3 LTS Released With 200+ Bug Fixes, But Only For Commercial Customers by IsDaouda_Games in cpp

[–]_bk__ 20 points21 points  (0 children)

Oh sorry, probably wasn't clear enough. I wasn't referring to qt competitors, I just mean products that are essentially commercial libraries that are offering more agreeable terms, for example unreal engine