Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Const-me
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
30 ms
·
391.
▲
by
Const-me
3y ago
> Just because a GPU includes a 3D graphics pipeline that doesn't mean that everything has to go through it. That’s how modern Windows does that in practice. Everything does go through the 3D graphics pipeline, and starting from Win
392.
▲
by
Const-me
3y ago
Yes, but note no hardware composition is involved. The composition is done by the 3D GPU like I said. Either in your app if you render that video yourself, or if you supply a swap chain’s back buffer to IMFMediaEngine.TransferVideoFrame met
393.
▲
by
Const-me
3y ago
> The best way for video is to use the hardware decoder and hardware compositor. Not according to Microsoft, see that page https://learn.microsoft.com/en-us/windows/win32/medfound/how... Microsoft st
394.
▲
by
Const-me
3y ago
GDI is only used by legacy apps. It gonna stay there for quite a while for backward compatibility reasons, but modern Windows apps are using better GPU-centric APIs to render their GUI. Specifically, WPF is based on DirectX 9, Direct2D is b
395.
▲
by
Const-me
3y ago
The originally posted article is about new 3D GPU-based backend in the GTK, which is unrelated to games. Hardware accelerated 3D graphics is the best way to render pretty much everything on modern hardware, games or not games. High-resoluti
396.
▲
by
Const-me
3y ago
The socket is fine for messages, but not for rendering. Here’s a simplified version of how 3D rendering apps usually work in different environments I have used. Direct3D on Windows: app renders something and calls IDXGISwapChain.Present. Th
397.
▲
by
Const-me
3y ago
2D games are mostly rendering sprites. GUI renderers do that too for raster images and font glyphs, but the harder part for GUI is vector 2D graphics.
398.
▲
by
Const-me
3y ago
Couple times in the past I have implemented GPU-targeted GUI renderers, here’s an example: https://github.com/Const-me/Vrmac?tab=readme-ov-file#vector-... https://github.com/Const-me/Vrmac/blo
399.
▲
by
Const-me
3y ago
> How do you return an error that communicates "missing quote on line 42 character 200"? For that use case you gonna need some other piece of data besides the error code. Maybe another type like json_error_t in Jansson library.
400.
▲
by
Const-me
3y ago
On Windows, this problem is already solved well. Return 32-bit integers which conform to that spec: https://learn.microsoft.com/en-us/openspecs/windows_protocol... Possible to pack OS errors, third party library s
401.
▲
by
Const-me
3y ago
Here’s an example of a custom 4 bits/weight codec for ML weights: https://github.com/Const-me/Cgml/blob/master/Readme.md#bcml1... llama.cpp does it slightly differently but still, AFAIK their quanti
402.
▲
by
Const-me
3y ago
The higher levels of the stack, be it hardware or software, need to make sure that never happens. That’s how GPUs are doing that. Each thread group can use a limited amount of SRAM, programs declare in advance how many bytes they need. Then
403.
▲
by
Const-me
3y ago
It seems you apply US laws to the rest of the world. Ukraine is not part of the US, it’s a part of Europe. In Europe, the legal systems are rather different. For example, public display of Nazi symbols in the US is a protected free speech u
404.
▲
by
Const-me
3y ago
> being far from the front lines is better than being near them Kherson is less than 5 km from the active war zone. Northern parts of Kharkiv oblast have a Russian border nearby, with Russian recon groups routinely trying to infiltrate.
405.
▲
by
Const-me
3y ago
> C and C++ programmers need to be taught that they must not write that. Things have stabilized quite a while ago. 99% of people who write C or C++ in 2024 will never use any computers where sizeof(int) != 4, or big endian processors, or
406.
▲
by
Const-me
3y ago
Very relevant. Apart from a few minor exceptions, C++ is a superset of C i.e. almost any C code can be compiled as C++ language, and will result in a correct program.
407.
▲
by
Const-me
3y ago
> not nearly as rosy as yours Ukraine is at war, nothing rosy about that. Still, living conditions of people north of Kyiv, north of Kharkiv, or in Kherson is dramatically better than GP’s situation. Note GP can’t even freely talk to Eng
408.
▲
by
Const-me
3y ago
If I would rework that snippet to be in C instead of C++, that code would no longer be my today’s WTF. Also, IMO `std::max` is more readable than the equivalent conditional operator.
409.
▲
by
Const-me
3y ago
Interesting, thanks. BTW, I fixed like that: uint64_t mask = -( missingLanes < 8 ); mask >>= missingLanes * 8; I only care about the AMD64 because the surrounding code uses AVX2 intrinsics, i.e. my new version is hopef
410.
▲
by
Const-me
3y ago
My today’s WTF on the topic. The following C++ returns incorrect value when the argument is 8 or greater: inline uint64_t makeRemainderMask( ptrdiff_t missingLanes ) { // This is not a branch, compiles to conditi
411.
▲
by
Const-me
3y ago
If you use Windows and you have a discrete GPU from any vendor with at least 6GB VRAM, you could test my implementation of Mistral model: https://github.com/Const-me/Cgml Screenshot: https://github.com/
412.
▲
by
Const-me
3y ago
> circuses (the internet) According to a Russian resident I follow on social media, over the last 2 years Russians improved their localized circuses: VK, mail.ru, etc. The guy says these are now somewhat close to the originals i.e. Faceb
413.
▲
by
Const-me
3y ago
GP won’t suffer from anarchy or societal collapse. According to internationally recognized state borders, they live in Ukraine, not in Russia. Russians have lost approximately half of the land they have occupied in the first 3 months of the
414.
▲
by
Const-me
3y ago
I recently bought a pair of headphones after asking ChatGPT, the free 3.5 version. I had a brief conversation with the chat. It offered some options, and I refined my requirements in response. Specifically, after checking what it recommende
415.
▲
by
Const-me
3y ago
> Looks like 5% in the 50s The data I have linked above shows infant mortality rate. I believe infant mortality is defined as “deaths during the first year of life”. I was unable to find data for child mortality in Japan. Still, I would
416.
▲
by
Const-me
3y ago
> Would the labor value of a 10 year old be greater than their rearing costs though? Modern 10 year olds are only useless due to culture and laws. Technically they’re rather capable already, both physically and mentally. > fertility
417.
▲
by
Const-me
3y ago
> why did people want to have lots of kids back then? One reason is child labor. Kids started to work as soon as they could, from ages 7-10. Modern kids are useless until adulthood. Another reason is lack of social security, childfree pe
418.
▲
by
Const-me
3y ago
I think the #1 reason for these regulations wasn’t compatibility, it was safety. People die in fires, railway accidents, aviation disasters, and from waterborne infections.
419.
▲
by
Const-me
3y ago
How would you fix the fundamental problem? It’s technically possible to force these two companies to implement a shared API, but hard to do, and “Vulkan API Support Act of 2024” sounds a bit weird, IMO.
420.
▲
by
Const-me
3y ago
Neither Apple nor Microsoft want any usable multiplatform graphics API. For this reason, none of them delivers such a thing. If you want a multiplatform graphics API, you should use a library which implements such API on top of these native
More ›