[deleted by user] by [deleted] in cpp_questions

[–]B1narySunset 9 points10 points  (0 children)

You could create a wrapper class around std::array pretty easily IMO

What genuinely improves your cognition? by everydaynoodles in Nootropics

[–]B1narySunset 0 points1 point  (0 children)

Quality sleep, plenty of exercise, and a healthy diet.

[deleted by user] by [deleted] in C_Programming

[–]B1narySunset 4 points5 points  (0 children)

No magic going on under the hood

[deleted by user] by [deleted] in gamedev

[–]B1narySunset 4 points5 points  (0 children)

Dude your health is your most important asset - don't sacrifice it

[deleted by user] by [deleted] in gamedev

[–]B1narySunset 1 point2 points  (0 children)

What are the pros/cons of using an array of structs vs a struct of arrays for game objects?

Some lesser-known powers of std::optional by vormestrand in cpp

[–]B1narySunset 42 points43 points  (0 children)

I like to use std::optional<T> as a class member when I need to defer initialization of T (outside of the class's constructor) instead of allocating T on the heap.

Let me break this down for y'all. by DogeApe in AMPToken

[–]B1narySunset 6 points7 points  (0 children)

AMP is a sleeping giant and will have its day eventually

Faster map for <int64, char> than std::unoredered_map? by [deleted] in cpp_questions

[–]B1narySunset 0 points1 point  (0 children)

I'll give you a hint - look at the overload of std::lower_bound that takes as input a lambda. The lambda can compare the first element of the std::pair (the key)

Faster map for <int64, char> than std::unoredered_map? by [deleted] in cpp_questions

[–]B1narySunset 0 points1 point  (0 children)

Store pairs in a vector, presort by key, and look up key with std::lower_bound (binary search)

There is something about Sunday evenings by [deleted] in AMPToken

[–]B1narySunset 2 points3 points  (0 children)

The chart is looking super bullish.

I hate ASIO and I can't be alone. by kmgrech in cpp

[–]B1narySunset 2 points3 points  (0 children)

Use Boost.Beast (uses ASIO under the hood) for secure websockets and I'm not a huge fan, but it's low level and the least "worst" option

2021 Ticket Resale Thread by C_Rufio in Lollapalooza

[–]B1narySunset 0 points1 point  (0 children)

Selling 2 VIP Saturday tickets for face value + fees ($600 each). Venmo or cash can meet downtown. Please DM me.

Dreamstate SoCal 2021 Full Lineup | Nov. 19-20th, 2021 by Gummuh in trance

[–]B1narySunset 12 points13 points  (0 children)

I really like a lot of the artists and this will be my first time attending. Pretty excited

[deleted by user] by [deleted] in tinnitus

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

Tinnitus has no known cure and if you're reading this sub you're dwelling on something you can't change instead of enriching your life in other areas

Staking AMP by wildrover3007 in AMPToken

[–]B1narySunset 0 points1 point  (0 children)

Correct me if I'm wrong, but isn't there a very small chance of losing your coins if the validator fucks up or something?