« first day (3986 days earlier)      last day (964 days later) » 

nwp
7:16 AM
Putting an answer in the comment box smh. Time for LRIO to copy/paste your comment and then flag it for deletion.
 
 
3 hours later…
10:45 AM
@nwp I had the proper answer but it got downvoted by a high rep user that then posted a provably false answer I was able to disprove with a single link from my answer.... and it's also a dupe
 
10:58 AM
 
 
3 hours later…
nwp
2:17 PM
I wasted all day trying to figure out how to make SetMonitorBrightness work. It happens to work on my desktop PC for some weird reason, but fails on all other desktop PCs, laptops and tablets.
The funny thing is that there is supposed to be an easy way to test if the hardware supports setting the brightness. If you go to display settings and get a brightness slider or just click on the bottom right of the task bar then it's obviously supported.
It turns out my desktop PC doesn't have a brightness slider and the laptops and tablets do.
 
@nwp did you call GetMonitorCapabilities first?
 
nwp
Yes. It works fine on my PC and fails on all other devices.
 
also LOL DegaussMonitor
so it returns all the monitors have the capability but it does nothing when you do it?
 
nwp
There is also DestroyPhysicalMonitor.
3
 
I know what that does, but I also know what I want it to do...
 
nwp
2:28 PM
The fucking installer broke too.
I know that GetMonitorCapabilities returns FALSE, so the call itself fails. I can't tell right now what GetLastError says.
 
Something else messing with the error?
 
nwp
> Error 3223725442/C0262582: An error occurred while transmitting data to the device on the I2C bus.
Some voices in my head are telling me to open the display system settings, making the window invisible and programmatically setting the slider.
Other voices tell me to hook into a DtrBacklightHelperApi64.dll because it happens to have a BacklightHelper_Set and _Get function.
 
@nwp I kinda get the feeling this API is de-facto dead
 
nwp
It's part of a program called "Control Center V1.3.7.53" which makes it rather difficult to search for.
 
hmm are the monitors that are failing using the default driver?
 
nwp
2:39 PM
Yes
There is also IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS, but I failed to get it to work. It seems to be intended for drivers or something.
What I don't understand is why Windows has the obviously named function SetMonitorBrightness but then apparently uses something else in its control panel implementation. Why would you do that?
 
Soooo how much you want to bet it will always fail on the default driver?
 
nwp
A lot because I already know it works with the default driver on my pc.
I even compared version numbers. They are pretty random, but some are just slightly newer than my version and also fail.
 
the MS driver or the monitor driver?
on my desktop I have two monitors, one that uses the MS default PNP driver and one that doesn't
 
nwp
All devices use the default PnP driver.
devmgmt.msc -> Monitor -> PnP-Monitor -> Driver
That shows 10.0.19041.488 for me. 10.0.17764.771 and 10.0.19041.1151 on other devices fail.
 
same physical monitor?
 
nwp
2:48 PM
No, I haven't yet tried to unplug one of my monitors, plugging it into the tablet and see what happens.
 
so almost all monitors have I2C connections now on the cables
 
nwp
The tablet doesn't have HDMI or DVI or anything -.-
I'll go find a laptop.
 
or at least in protocol
 
3:06 PM
Speaking of monitors, I recently have made rPi 4B to work on an old, retired monitor that only supports VGA.
Had to get 2 adaptors though, because there is no Micro-HDMI to male VGA adaptor.
 
nwp
Laptop acquired. Laptop fails to start the program because the graphics driver is ancient and doesn't support OpenGL 2.0 or higher.
According to Wikipedia, OpenGL 2.0 is from September 2004.
 
that can only be an Intel GPU
those didn't have OpenGL2.0 drivers for the longest time on windows, because Microsoft only requires D3D support for the "compatible with Windows XP/Vista/7/etc" stickers and certifications
they ran OpenGL 2.0 fine on Linux though
 
@PeterT so the Ivy Bridge era GPU I have on an old laptop supports OpenGL4.0 and that's HD4000
 
I was thinking like GMA950 and friends, they were really popular for a while
especially in Asia for some reason
 
Nobody should be using those anymore
 
nwp
3:19 PM
My monitors have HDMI and DVI. The laptop has VGA.
 
how old is the laptop?
 
nwp
The application prints out its failure to change the monitor settings before dying due to lack of OpenGL 2.0, but that's not good enough.
It's very old.
I'm not sure how to tell.
 
Then the failure may be expected?
 
nwp
Lenovo T520
 
so ~2012?
but also CPUz
 
nwp
3:22 PM
The serial number thing on the back has "12/05" on the back. Not sure if December 2005 or May 2012.
Either way more time was spent and no progress was made.
Oh, and the laptop shows the same I2C error.
Apparently my PC is very special.
 
> The drivers for Intel HD Graphics 3000 in Windows 10 does not expose all Open GL capabilities of the GPU. So software relying on Open GL features not present in Open GL 1.1 will not work. Using older versions of Windows or Linux might work since the chip have more features than the driver exposes.
 
3:37 PM
@sehe 🙂
Noticed you were mentioned here (one of the last comments): https://news.ycombinator.com/item?id=8705413
Curious what your take on the post is (just found it interesting, is all)
 
 
2 hours later…
5:11 PM
@Lapys Oh. That explains that that answer got more than 1 upvote :). I answer Boost questions almost exclusively and it's the most thankless tag to spend time in. However, grokking Boost is its own reward :)
 
I'm half surprised the committee doesn't ask you which bits they are considering for standardization see the most misuse
 
@Lapys I didn't read the whole post, just the one linked and its parent (which took me a lot of painful scanning, how do people use that site?). Most it does it make me yawn a little. It's all old and repeated stuff.
Obviously, one can write high perf code in Python and Java (spoiler: its all native under the hood) and you can write abusmal code in C++ (easily). C++ doesn't need much evangelism because it's proven tech.
 
IIRC there are quite a few libraries that people like to hold up as examples of those being high perf that are really C or C++ where it counts
 
Oh, lots. But PropertyTree should just be burninated. It's 99.99% abused for "JSON" and "XML" tasks. And beyond that the intrinsic feature set has a very clumsy and archaic interface.
(I'd say the only nice thing it has is multi-index property sets. A thing often neglected.)
@Mgetz Yup.
 
FWIW you could be thanklessly slumming around with in
There's even overlap!
0
Q: Communicating between coroutines in ASIO

christianOI have a coroutine that listens asynchronously on an asio UDP socket. When it receives a message it co_spawns a new co-routine to handle the message and then goes back to listening on the port. This new coroutine may need to do additional communication on the same UDP socket. What is a good way t...

 
5:45 PM
Interesting. Thanks for the comment 👋🏾
 
 
2 hours later…
8:14 PM
@Lapys 👋🏾
@Mgetz Are you? I tinker with those a bit but my hesitance is spotty compiler support. I hate to get into "works-on-machine" territory in SO posts
 
@sehe it works fine on windows with the latest VS. It's de-facto required to use some winrt libraries in fact. Linux it depends more on your compiler, but latest clang/gcc seem to support them fine at a custom written level. But there isn't any real extensive library support other than std::coroutine_handle IME
That said... they are nice to use when I can. I just think linux needs better support and an equivalent to what MS has done with cppwinrt
 
Lewis's lib is the goto thing for me
 
cppcoro?
 
Yup
 
I've looked but haven't used because I've been primarily on windows
other than some COM stupidity using the winrt helpers works nicely
 
8:19 PM
Big difference. I think much of the coro proposal(s) was driven with an MSVC bias. Symptom of which is co_await and friend existing long before on MSVC.
@Mgetz What about COM? Just that you need to initialize it for winrt or sumtin more?
 
I think that's fair. Expanding on that MS has had a long focus on OVERLAPPED for ages
 
Yup. Linux'es afio and stuff are younger but slightly more usable I guess. I hate that they managed to give overlapped IO the API feel of rotten win3.1 kernel objects. I guess I've written too much WinAPI rubble in my life.
 
@sehe See the context grab I'm doing on line 365? That's necessary because winrt by default does a lot of things in a multithreaded apartment. So it's the usual "calling the wrong apartment" COM garbage. Or getting called back on a thread without one. So you just capture the context and do the resume there.
 
I'd expect a non-intrusive framework to support/default to free threaded stuff.
 
which would be wonderful if WinUI3 was out
buuut it's not and that's MFC
 
8:24 PM
Byt yeah, probably still need the context, so it's kind of what I execpted
 
but in terms of wrapping WIN32 calls it's not bad, clearly I've done it.
 
@Mgetz :eyes-twitching: Oh lovely. I remember replacing some MFC cruft with generic code. Back in 2001. I almost implemented a custom MFC serialization archive format around 2012 just to escape the vendor lockin but the project lead wouldn't let me
@Mgetz That actually sounds nice. I'd like to try it once, but it'll have to be professionally. I can't see myself picking Windows for anything personal in the future
 
There is a reason I'm trying to space off the MTR code from the UI code. So when WinUI3 finally does drop I can move over with minimal pain
@sehe I only did it for this because WinMTR didn't support IPv6... and it spiraled out and got out of hand from there
still need to reduce the amount of UB in that code because @#$@ sockets
but I think I've technically got that down to the socket casts
 
Mmm? How do sockets invite UB?
@Mgetz Oh I see
 
because you cast sockaddr_in and sockaddr_in6 to sockaddr_storage and sockaddr
because why have compatible types!
I'll probably try to dump sockaddr_storage for std::variant
it's smaller anyway
but I can't completely get rid of the reinterpret_casts sadly
 
8:36 PM
In the glue code I suppose it's acceptable. And much preferrable to handling it directly. At least now you can test the glue code and update it when needed. And toss it when possible.
 
lol at this point that code has turned into "Let's learn this new C++ feature that this code probably doesn't need"
did it need concepts? Heck no
did it get concepts... lol yes
 
Did you need C++? Also np
 
import noproblem as numpy
 
9:02 PM
lol visual studio can still update faster than a mac
heck... I'm pretty sure freeDOS releases faster than a mac updates
 
@Mgetz Now that's a very unlikely claim
Oh, a SO post. Never mind
 
@sehe my work mac took an hour to install the update today, VS just did it's latest update in 3min
both are on SSDs
 

« first day (3986 days earlier)      last day (964 days later) »