Jan Ringoš (@JanRingos) header
Jan Ringoš (@JanRingos) profile picture

TRIM CORE SOFTWARE s.r.o. @trimcore systems engineer and C++ programmer

Ostrava, Czech Republic
Joined May 2012
Photo by Jan Ringoš (@JanRingos)Photo by Jan Ringoš (@JanRingos)Photo by Jan Ringoš (@JanRingos)Photo by Jan Ringoš (@JanRingos)Photo by Jan Ringoš (@JanRingos)Photo by Jan Ringoš (@JanRingos)Photo by Jan Ringoš (@JanRingos)Photo by Jan Ringoš (@JanRingos)Photo by Jan Ringoš (@JanRingos)Photo by Jan Ringoš (@JanRingos)
So... what do I replace libsodium and libhydrogen with?
12
I lose benefits of vector<T>::iterator here. Any ideas? template<class T> class SVO {  struct empty{};  variant<empty, T, vector<T>> v; public:  T* begin() {   switch (v.index()) {    case 1: return &get<1>(v);    case 2: return &*get<2>(v).begin();   }   return nullptr;  } };
1
96
> *someone posts opinion I slightly disagree with* Me: "Oh, this expert person follows me, let's push back constructively, respectfully and politely." > *no reply* > *the person no longer follows me*
5
535
Jan Ringoš retweeted
Replying to @OlexGameDev
Reflection is the most frustrating and infuriating thing in C++. I remember we were, in our small local C++ group, talking about needing reflected enum count (or rather highest value + 1) when I was 17 back in 2001. The mailing lists were too. I never understood, when it was so universaly desired, why was it so fucking impossible for either standard committee to accept some 2-page paper proposing `enum::$max` or whatever, or for compilers to add some proprietary __builtin_enum_max. But they were all talking about meta layer, reflections, which sounded basically as: "We won't add this small thing that you all need now, because we want to spend next X years working on this huge overcomplicated meta-meta-language layer which will eventually allow you to write your own enum::$count and more. Of course you will need to learn this expert-level semantics and crazy character soup syntax." And it turned out to be like that, despite everyone calling it in advance being always piled on for daring to.
1
1
3
73
I wonder if pinning TCP/IP-communicating thread to the CPU/NUMA nearest to a NIC helps with performance or CPU usage in any way. That could be interesting thing to benchmark. But then there are Winsock threads the app has no control over. Maybe going directly to AFD.sys?
1
2
133
Feedback Hub was purged again. Dozens of my bug reports gone. Again. I filled some more than 10 years ago, some multiple times. 99 % unfixed. If anyone ever asks me to fill FH report again, I'll shower him with so much profanity, he'll need to seek therapy.
38
💯 Working as intended
Claudia explains the hazards of believing she is either sentient or infallible, the myopia of AI utopianism, and how gatekeeping and the "asymmetries of fluency" can be wielded against an unsuspecting world. Based on the open character by anabology. Assembled in the SLOPCANNON.
42
The bug in Task Manager on Server Core, where View/Update Speed setting doesn't work, is still there.
36
Question on invalid JSON and very permissive parser. Having this input:  {   "value" : "abc\x"  } How should this invalid member be parsed as?
0%"value" : "abc\x"
0%"value" : "abcx"
0%"value" : "abc"
100%"value" : "abc\0"
1 votes • Final results
49
Two days ago, last ever update for Windows that will run on ARMv8.0 devices was released, 23H2 version 22631.7711. So my Asus NovaGo is finally obsolete. It was a wild ride of using a device full of technology, that was unnecessarily limited by lacking software.
53
This is fixed in 19.53.36930
MSVC will gladly optimize this into a single ROL instruction: uint64_t rotl (uint64_t x, int k) { return (x << k) | (x >> (64 - k)); } But it will refuse to do it, if the function is inlined into another short function. Just wow.
36
MSVC vNext std::vector ABI should store begin+size instead of begin+end pointers. Too many weird IMULs or outright DIVs in my assembly for plain std::vector::size().
1
123
If you find this feature useful, please upvote here: 🔗➡️developercommunity.visualstu…
A rough mockup of MSVC IDE feature from my wishlist: Tracking exceptions. Just for display purposes. Not pictured: • Exceptions caught and handled are not propagated to callers unless rethrown. • The hint could also display inheritance hierarchy, if any.
1
66
A rough mockup of MSVC IDE feature from my wishlist: Tracking exceptions. Just for display purposes. Not pictured: • Exceptions caught and handled are not propagated to callers unless rethrown. • The hint could also display inheritance hierarchy, if any.
1
3
257
I saved almost 1 kB of .text by moving the most used variable to the front of the structure. The instructions changes from:  48 8b 41 28 mov rax, QWORD PTR [rcx+40] to:  48 8b 01 mov rax, QWORD PTR [rcx] The savings would be bigger if it weren't for the meddling npads.
2
43
1,823
Also:  4c 8b 41 28 mov r8, QWORD PTR [rcx+40]  49 83 c0 02 add r8, 2  4c 89 41 28 mov QWORD PTR [rcx+40], r8 Turned into:  48 83 01 02 add QWORD PTR [rcx], 2  4c 8b 01  mov r8, QWORD PTR [rcx]
2
166
This is how my Supervisor app, written in 2008, looks like when activated. 🔗 tringi.trimcore.cz/MX-3_Supe… A poor man's Task Manager, but running at highest priority and, most importantly, switching to its own desktop (like Win+L or UAC does) so it's able to terminate apps that break the main desktop. Recently I've noticed renewed interest and I'm considering doing a rewrite for modern Windows. Still the same lean pure Win32 architecture, but using latest NT API.
1
1
208
I'm writing Duff's device again.
33
Why can't current network command-line tools do this? C:\Users\Me> ping .11 Pinging 192.168.0.11 with 32 bytes of data: Reply from 192.168.0.11: bytes=32 time<1ms TTL=128 ...
1
76