r/cpp • u/mvorbrodt • Apr 05 '19
My C++ blog (so far)
So I don't want to make a post on here every time I write a short article (I've been scolded for that in the past :) ), but I figured I come back here and share with you the archive of my blog posts so far. There's 75 topics I've covered in the last 2 months since I started blogging and I hope some of you will find this information useful :)
Thanks for reading! Have a great day guys!
10
3
u/rammstein_koala Apr 06 '19
Thanks for the great posts. Especially liked the hashing, TOTP, and gRPC examples!
2
11
u/James20k P2005R0 Apr 06 '19
Just as a psa, I don't think dekkers algorithm would work in a gpu environment, there is one potential deadlock which is where both threads acquire their flag simultaneously every iteration (as is the case on a gpu due to the way threads work)
0
8
u/gurpreetshanky Apr 06 '19
Awesome work. I remember people were upset about your posts. This is a way better to highlight all the short topics from your website.
5
4
3
u/heyrandompeople12345 Apr 06 '19
I do remember you. I really really really like your posts alot. Have you on my feed. Really appreciate all the work from you, and hope that you will continue doing so :)
2
u/serEatAlot Apr 06 '19
It's my first time seeing your blogs, so I checked enum to string part one and two because I had to switch enums to strings a lot in my project (I have atleast 5 to 7 enum to string methods).
And you taught me a much better way of doing those, I can't wait to read your other posts!
2
2
u/RealNC Apr 08 '19
C-style callbacks and lambda functions
AFAIK, that's not guaranteed to work. You'd need to somehow declare the lambda extern "C".
3
u/serchq Apr 06 '19
have an upvote
saving the post so it not gets lost for me :)
thanks for posting it!
2
u/Narase33 -> r/cpp_questions Apr 06 '19
I really like the topics you have but the style with all the smileys :/
1
1
Apr 06 '19
The fact that the language doesn't support enum to string natively is one of the greatest embarrassments of the 21 century
1
1
u/kingaillas Apr 08 '19
Your blog is great, filled with short, practical examples. It’s in my feed reader and I’ve learned a lot about using the libraries you cover.
5
u/AffectionateMath6 Apr 06 '19
I just looked the first one 'better bloom filter' and it doesn't look like it works. What it does is Finds hash once and runs a pseudo random number generator for other hashes. The point of bloom filter is you use multiple hash functions so that the chances of collision is decreased. In your implementation, they will be the same hashes.
E.g. Lets say two strings foo, bar generates same hash function,
Bloom filter
Your implementation: https://vorbrodt.blog/2019/04/05/better-bloom-filter/
string: foo
hash1(foo) => 42
PRNG(42) -> 23, 45, 53
string: bar
hash1(bar) => 42
PRNG(42) -> 23, 45, 53