Show more

what's the difference between

template<typename T>
auto add1(const T& a, const T& b)
{ return a + b; }

and

template<typename T>
auto add2(T a, const T& b)
{ return a += b; }

?

would you call a wrapper type, that holds a pointer to a container provides a range interface through that pointer, a range_reference or a reference_range?

hmmm... referring_range?? indirect_range???

why would you ever need aligned storage for a single object that just holds a couple of references?

the aligned storage
github.com/OpenBW/openbw/blob/

the class it's used with
github.com/OpenBW/openbw/blob/

is it some kind of "as long as it's aligned it's atomic" x86 nonsense? tempted to just nuke it all...

Show thread

still can't get over the fact that you'd make something that's not endianness dependent endianness dependent just because you are a C programmer

things that bit me:

operator precedence
note: algebra am I right?

overload resolution
note: a universal reference without type constraints in an overload set should be a yellow flag

value/reference semantics:
note: if you want to absolutely make sure you are referring to a value as a constant and not owning one, use const pointer to const value (or something like std::reference_wrapper to exclude nullptr), not a const reference, since, as we all know, a const reference can bind to a temporary and extend its lifetime.

final thoughts: god I wish I had a garbage collector or a borrow checker to save me from... wait none of these are memory errors? how come?

Show thread

ended up reworking a lot of the ui code... all the Xes and Ys and half-assed SDL wrappers were getting on my nerves, so partially replaced them with my own half-assed SDL wrappers and vector library...

notabug.org/fuglycodelord420/o

what's new objectively? well you can make an SCV now by pressing S...

Show thread

so the only value of CMake is that it works on windows? which would be negative value... like every system comes with it's own programming environment and package manager and stuff, and you're like "no, the objective reasons by which you chose your system are irrelevant, a language gotta have a unified build system that nullifies them, hurr durr"...

undefined behavior on line 75!

I should probably stop staring at this and do something useful instead...

Show thread

witness code compression (>^-^)>
ix.io/3vy0/cpp

>but you introduced three new libraries :v

libraries don't count :V

>but your version is also slower :v

it can be optimized >:V nothing inherently slow about it :<

Show thread

nevermind, the right edge is on the inside too, it's just the bottom, so lets file this under off by one errors... I'm just too used to the two dimensions being consistent

Show thread

ok so you need to outline a rectangle on square grid, you know yer pixels... logically you can choose to do it on the inside of the rectangle, to make sure you don't go out of bounds, or on the outside if you need the in-bound pixels untouched... however a very common choice is to go completely insane and do the top and left edges on the inside and bottom and right edges on the outside:

github.com/OpenBW/openbw/blob/

Now I understand, my eyes are finally open, a monolith can only grow!

Show thread

I'm going to make this ginormous file even more humongous!

Show thread

another note: so stupid to ever expect something like this to work, I mean a file is a file, it's not like it's a stream or something, and everything is a file, so it's not like there are any alternatives or something... sheesh grow a brain me...

Show thread

note to self: do not download and upload a file at the same time

Show thread

next is Stardust - absolutely bonkers backwards directory and include structure, but otherwise minimum language level issues. I aint got the micro to kill it with 4 workers, mainly cause probes are OP, so gotta continue working on the UI, but feels like if you can properly body block the building probes you can just kill them one by one, just like with Stormhammer.

Show thread

apparently MSVC has no problem binding temporaries to lvalue references... why yes, of course, let's break the most basic building blocks of the language

andrew disappeared... filthy peddler :<

Show more
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.