Thread 105907529 - /g/ [Archived: 262 hours ago]

Anonymous
7/14/2025, 11:39:06 PM No.105907529
boolvec
boolvec
md5: 01fedb538b5fc3a550bb5f3d056009eb🔍
Regrets? I've had a few...
Replies: >>105907779 >>105909264 >>105910110 >>105913222
Anonymous
7/14/2025, 11:40:31 PM No.105907551
Rust doesn't have this problem.
Replies: >>105909155 >>105909235 >>105911392
Anonymous
7/15/2025, 12:01:13 AM No.105907779
>>105907529 (OP)
Lmao
Anonymous
7/15/2025, 2:22:29 AM No.105909115
Yeah, it’s stupid, but it has never been a problem for anyone. Just use std::vector<uint8_t>. This is why I hate Rust and people like you, always trying to solve problems that don’t exist and never doing anything to solve real problems.
Replies: >>105909208 >>105911349
Anonymous
7/15/2025, 2:27:58 AM No.105909155
>>105907551
Rust doesn't have bitmaps.
Replies: >>105910331
Anonymous
7/15/2025, 2:35:14 AM No.105909208
>>105909115
using a single ! on a uint8_t is a compiler warning though :(
Replies: >>105909906 >>105910476
Anonymous
7/15/2025, 2:38:13 AM No.105909235
IMG_1293
IMG_1293
md5: 4adbf71f945adf3ab97ffcd2e8a7eb7e🔍
>>105907551
Anonymous
7/15/2025, 2:41:59 AM No.105909264
>>105907529 (OP)
explain like I'm a gopher why this is problematic
Replies: >>105910702 >>105912826 >>105913095
Anonymous
7/15/2025, 3:52:28 AM No.105909906
>>105909208
so write a class and add the operators you like.
Anonymous
7/15/2025, 4:15:01 AM No.105910110
>>105907529 (OP)
What a retarded decision this was. Almost as retarded as Bjarne refusing to make any decisions on ABI.
bruce3434
7/15/2025, 4:44:29 AM No.105910331
>>105909155
It’s called i32.
Anonymous
7/15/2025, 4:58:02 AM No.105910414
I regret not transitioning to rust.
Anonymous
7/15/2025, 5:05:14 AM No.105910476
>>105909208
Double it up to !!, saar. Old C trick before C99's _Bool. Or just convert it to a bool. The compiler knows what you want in this case and will give you the best assembly to check it.
Anonymous
7/15/2025, 5:39:14 AM No.105910702
>>105909264
std::vector<bool> isn't actually an array of booleans under the hood but instead stores each value in a single bit. This can create some weird behavior if you're not expecting it. This should have been something like std::dynamic_bitset and has no place being std::vector.
Replies: >>105911551
Anonymous
7/15/2025, 7:11:41 AM No.105911349
>>105909115
The only problem I've evr had with it was for ImGui::Checkbox. But it's solvable issue.
Anonymous
7/15/2025, 7:17:48 AM No.105911392
>>105907551
this type of "cleverness" is also prominent in rust community. it's culture issue.
people who would write stl or vector<bool> would say that java is a boring language.
Anonymous
7/15/2025, 7:39:17 AM No.105911551
>>105910702
sounds like a skill issue
Anonymous
7/15/2025, 7:57:09 AM No.105911688
Not a problem. We have enough RAM.
Anonymous
7/15/2025, 10:46:18 AM No.105912826
>>105909264
The problem is it's a smart decisions but algorithm devs didn't know / think about it so their implementation is slow when it should be faster.
bruce3434
7/15/2025, 10:57:38 AM No.105912894
i am a rust tranny who loves bbc
Replies: >>105913078
Anonymous
7/15/2025, 11:28:16 AM No.105913078
>>105912894
Based
Anonymous
7/15/2025, 11:31:57 AM No.105913095
>>105909264
it wouldn't be problematic if they also didn't fuck up the proxy type for access. As a result, you can't make a pointer to member with & operator.
Overall its just annoying that it behaves differently than other vectors. There is std::bitset for fixed length but no dynamically sized bitset. And bitset lacks common operations that you would expect. Its basically useless.
Replies: >>105913227
Anonymous
7/15/2025, 11:55:56 AM No.105913222
>>105907529 (OP)
It's because of how CPUs are made, minimum variable size is 8bit, so any implementation of array of 1bit values would have some problem.
Anonymous
7/15/2025, 11:56:36 AM No.105913227
>>105913095
in C# this is just BitArray
since sepples can't program, you can copy the implementation from C#