← Home ← Back to /g/

Thread 105907529

24 posts 4 images /g/
Anonymous No.105907529 [Report] >>105907779 >>105909264 >>105910110 >>105913222
Regrets? I've had a few...
Anonymous No.105907551 [Report] >>105909155 >>105909235 >>105911392
Rust doesn't have this problem.
Anonymous No.105907779 [Report]
>>105907529 (OP)
Lmao
Anonymous No.105909115 [Report] >>105909208 >>105911349
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.
Anonymous No.105909155 [Report] >>105910331
>>105907551
Rust doesn't have bitmaps.
Anonymous No.105909208 [Report] >>105909906 >>105910476
>>105909115
using a single ! on a uint8_t is a compiler warning though :(
Anonymous No.105909235 [Report]
>>105907551
Anonymous No.105909264 [Report] >>105910702 >>105912826 >>105913095
>>105907529 (OP)
explain like I'm a gopher why this is problematic
Anonymous No.105909906 [Report]
>>105909208
so write a class and add the operators you like.
Anonymous No.105910110 [Report]
>>105907529 (OP)
What a retarded decision this was. Almost as retarded as Bjarne refusing to make any decisions on ABI.
bruce3434 No.105910331 [Report]
>>105909155
It’s called i32.
Anonymous No.105910414 [Report]
I regret not transitioning to rust.
Anonymous No.105910476 [Report]
>>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 No.105910702 [Report] >>105911551
>>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.
Anonymous No.105911349 [Report]
>>105909115
The only problem I've evr had with it was for ImGui::Checkbox. But it's solvable issue.
Anonymous No.105911392 [Report]
>>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 No.105911551 [Report]
>>105910702
sounds like a skill issue
Anonymous No.105911688 [Report]
Not a problem. We have enough RAM.
Anonymous No.105912826 [Report]
>>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 No.105912894 [Report] >>105913078
i am a rust tranny who loves bbc
Anonymous No.105913078 [Report]
>>105912894
Based
Anonymous No.105913095 [Report] >>105913227
>>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.
Anonymous No.105913222 [Report]
>>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 No.105913227 [Report]
>>105913095
in C# this is just BitArray
since sepples can't program, you can copy the implementation from C#