This is not how Bluetooth wireless audio works. PCM audio is re-encoded on-device into any one of a few Bluetooth-capable codecs that is then streamed to the client device. This is a primary cause of latency.
5,063 karma · joined July 15, 2021
This is not how Bluetooth wireless audio works. PCM audio is re-encoded on-device into any one of a few Bluetooth-capable codecs that is then streamed to the client device. This is a primary cause of latency.
I want to charge and listen to music at the same time.
What's wrong with analogue audio?
Some people might have given it up. I personally own a Sony Xperia phone, and intend to buy another Xperia next year, which will almost certainly still have both. In fact Sony is the one manufacturer that returned to a headphone jack after having removed it for a while. It might be more expensive than the competition, but this is my voting with my wallet.
GPUs expose a completely different programming memory model, and the issue I would say is conflating computer graphics with GPU programming. The two are obviously related, don't get me wrong, but they can and do diverge quite significantly at times. This is more true recently with the push towards GPGPU, where GPUs now combine several different coprocessors beyond just the shader cores, and can be programmed with something like a dozen different APIs.
I would instead suggest:
1) Implement a CPU rasteriser, with just two stages: a primitive assembler, and a rasteriser.
2) Implement a CPU ray tracer.
Web links for tutorials respectively: https://haqr.eu/tinyrenderer/
https://raytracing.github.io/books/RayTracingInOneWeekend.html
These can be extended in many, many ways that will keep you sufficiently occupied trying to maximise performance and features. In fact to even achieve some basic correctness will require quite a degree of complexity: the primitive assembler will of course need frustum- and back-face culling (and these will mean re-triangulating some primitives). The rasteriser will need z-buffering. The ray-tracer will need lighting, shadow, and camera intersection algorithms for different primitives, accounting for floating-point divergence; spheres, planes, and triangles can all be individually optimised.Try adding various anti-aliasing algorithms to the rasteriser. Add shading; begin with flat, then extend to per-vertex to per-fragment. Try adding a tessellator where the level of detail is controlled by camera distance. Add in early discard instead of the usual z-buffering.
To the basic Whitted CPU ray tracer, add BRDFs; add microfacet theory, add subsurface scattering, caustics, photon mapping/light transport, and work towards a general global illumination implementation. Add denoising algorithms. And of course, implement and use acceleration data structures for faster intersection lookups; there are many.
Working on all of these will frankly give you a more detailed and intimate understanding of how GPUs work and why they have been developed a certain way, rather than programming with something like Vulkan, spending time filling in struct after struct.
After this, feel free to explore any one of the two more 'basic' graphics APIs: OpenGL 4.6, or D3D11. shadertoy.com and shaderacademy.com are great resources to understand fragment shaders. There are again several widespread shader languages, though most of industry uses HLSL. GLSL can be simpler, but HLSL is definitely more flexible.
At this point, explore more complicated scenarios: deferred rendering, pre- and post-processing for things like ambient occlusion, mirrors, temporal anti-aliasing, render-to-texture for lighting and shadows, etc. This is video-game focused; you could go another direction by exploring 2D UIs, text rendering, compositing, and more.
As for why I recommend starting with CPUs, only to end up back with GPUs again, and one may ask: 'hey, who uses CPUs any more for graphics?' Let me answer: WARP[1] and LLVMpipe[2] are both production-quality software rasterisers; frequently loaded during remote desktop sessions. In fact 'rasteriser' is an understatement: they expose full-fledged software implementations of D3D10/11 and OpenGL/Vulkan devices respectively. And naturally, most film renderers still run on the CPU, due to their improved floating-point precision; films can't really get away with the ephemeral smudging of video games. Also, CPU cores are quite cheap nowadays, so it's not unusual to see a render farm of a million+ cores chewing away at a complex Pixar or Dreamworks frame.
[1]: https://learn.microsoft.com/en-gb/windows/win32/direct3darti...
I have thoroughly forgotten which header std::ranges::iota comes from. I don't care either.
To be honest, I don't mind the Windows games. In fact I believe the ones shipped with XP, Vista, and 7 were top-notch. What I mind is games with annoying advertisements in them. I mind when my Weather program is not native and is a glorified web app, also ridden with advertisements.
Full time work: GPU driver development and integration for a smartphone series. It's fun to see how the sauce is made.
Eventually: hope to pick up Rust.
Windows simply offers a cleaner, more well put-together experience when it comes to these edge cases. I have many tiny nitpicks about how Linux behaves, and every time I go back to my Windows Enterprise install it is a breath of fresh air that my 170% scaling and HDR just work. No finagling with a million different environment variables or CLI options. If a program hasn't opted into resolution independent scaling then I just disable it, and somehow the vector elements are still scaled correctly, leaving only the raster elements blurry. Nowadays laptop touch pads feel like they are Macs, which is high praise and a sea change from where Windows touch pads were about a decade ago.
If you strip away all the AI nonsense, Windows is a genuinely decent platform for getting anything done. Seriously, MS Office blows everything else out of the water. I still go back to Word, Excel, and PowerPoint when I want to do productivity. Adobe suite, pro audio tools, Da Vinci Resolve, etc, they just... work. If you haven't programmed in Visual Studio or used WinDbg then you have not used a serious, high-end debugger. GDB and perf are not even in the same league.
As a Windows power user, I want to go back to the Windows 2000 GUI shell, but with all the modernity of Windows 11's kernel and user-space libraries and drivers. I wish Enterprise was the default release, not the annoying Home versions. And I really, really wish Windows was open-sourced. Not just the kernel, but the user mode as well, because the user mode is where a lot of the juice is, and is what makes Windows Windows.
irm script.ps1 | iex
Famously used in the Windows Activation Scripts.You've misrepresented the situation. Turn up the optimiser to `/O2` and MSVC returns 5 directly, too.
> This function returns 1 if s is "hello". 0 otherwise. I've added a pointless strlen(). It seems like no compiler is clever enough to remove it.
It's funny how sometimes operating at a higher level of abstraction allows the compiler to optimise the code better: https://godbolt.org/z/EYP5764Mv
In this, the string literal "hello" is lowered not merely into a static string, but a handful of integral immediates that are directly inline in the assembly, no label-dereferencing required, and the 'is equal to "hello"' test is cast as the result of some sign extends and a bitwise-xor.
Of course, one could argue that std::string_view::size() is statically available, but then my counter-argument is that C's zero-terminated strings are a massive pessimisation (which is why the compiler couldn't 'see' what we humans can), and should always be avoided.
Yesterday we saw how compilers zero out registers efficiently.
Or better still: Yesterday we saw how compilers set the values in registers to zero efficiently.You absolutely need to pass through a GPU so that DWM.exe is properly accelerated; otherwise, it falls back to the software-accelerated WARP and the performance tanks to ~15 FPS.
It doesn't need to be anything powerful; if you have an idle integrated card that you aren't using on the Linux host because you only interact with it through a Web server or SSH (for instance, Proxmox), then pass that through. It's what I do on my home lab which runs a 9950X.
Before people raise pitchforks against Linux, this applies there, too, for the record: at work I have a Linux instance just to myself that by any other metric is ridiculously powerful: 64-core Epyc, 96 GB memory, but no iGPU, so remote desktop works very poorly.
Although the cost calculation for this would be totally different—hundreds of billions up-front for world-crossing tunnels and infrastructure and rolling stock, but then nearly no running cost.
The Chuō Shinkansen will be an interesting small-scale experiment in proper high-speed maglev in regular, long-distance passenger service.
I wonder what people would think if I said that about London, if I only visited central London and said 'it feels like a tourist trap'. London is huge, as is Singapore (for a city, it's pretty big— it has a larger population than all of the Baltics and the Nordic except Sweden).
Singapore is not North Korea, the PRC, or any of the Gulf countries, where people just get disappeared (or sawn into pieces and stuffed into a suitcase) for 'criticising the government' or 'criticising the country'.
I am Singaporean.
I can absolutely call the ruling People's Action Party a bunch of ivory tower-dwelling bureaucrats who have lost touch with the issues of the populace, and are mostly far cry from Lee Kuan Yew's days. I can say that Ms Josephine Teo really needs to keep her mouth shut, and that Mr Ng Chee Meng, MP for Jalan Kayu, didn't deserve to win his constituency one jot. I can say the ruling party regularly gerrymander the districts so they keep winning, even though they deny it. I can say they stifle the development of creative pursuits and the arts with their heavy-handed censorship. I can say they have their vices backwards by being extremely light on drink-driving, but simultaneously extremely harsh on cannabis, which smells horrible but isn't a big problem in terms of addiction or withdrawal.
I can say they are strongly influenced by Anglospheric right-wing Christian evangelism, and they need to root it out before it settles too deep into the country's psyche. I can say they are trying to build a cult of personality of Lee Kuan Yew, who has been dead for 10 years; it's time the country, the government, and the ruling party built on his legacy and moved forward instead of circling around him and his memory.
If you want more criticism, how about actually watching the Singapore Parliament, and deciding for yourself?
Oh, and if you ever decide to drop by, leave the hard drugs at home (including weed), if you want to leave with your head on its neck.
As for metrics: Singapore is both on paper and in reality a pretty good place to live, if you can stand the humidity and heat (frankly, that's the only truly oppressive thing about the place, how ruddy hot it gets). Why do you think people still emigrate to it, from lower-income countries, and from the West?
And finally, 'bald JD Vance', I don't understand how US politics is related to Singapore. They are countries hemispheres apart. One occupies a full third of a continent and has a population of 350 million. The other is a tiny island city-state of 6 million.
The politics of the US have also degraded to something worse than sports rivalries and the discourse is generally of extremely poor quality; it is only a reflection of the competence (or lack thereof) of its leadership and the majority of its people.
After a while, a city's 'character', 'charm', and 'charisma' all become annoyances. People live, work, go to school, file taxes, use transport, not just visit tourist attractions. Singapore's quality and efficiency of administration is light-years beyond any other country, perhaps bar Switzerland. 6.1 million people live in Singapore; they're not all multimillionaires.
Of a bog-standard 1080p 60 Hz monitor, perhaps.
I have a 4K 144 Hz 27-inch monitor I bought in December 2021, and paid nearly $850 for. These monitors still aren't a commodity good, and still end up being pretty expensive.
I would argue that given a certain ISA, it's probably easier to write an autocomplete extension for assembly targeting that ISA, rather than autocomplete for C, or goodness forbid, C++.
Likewise for structs, functions, jump targets, etc. One could probably set up snippets corresponding to different sorts of conditional execution—loops, if/else/while, switch, etc.
Like I always say, the user-mode of Windows is easiest to change, that's why it has been done almost every version.
Sounds like a Nikon mirrorless. I have a Z6iii, and I am constantly confused with the networking setup. There are something like three duplicated menus, all with very similar functionality.
OpenGL still works. You can set up an old-school glBegin()-glEnd() pipeline in as few as 10 lines of code, set up a camera and vertex transform, link in GLUT for some windowing, and you have the basic triangle/strip of triangles.
OpenGL is a fantastic way to introduce people to basic graphics programming. The really annoying part is textures, which can be gently abstracted over. However, at some point the abstractions will start to be either insufficient in terms of descriptive power, or inefficient, or leaky, and that's when advanced courses can go into Vulkan, CPU and then GPU-accelerated ray tracing, and more.
Heh; with mesh shaders and Nanite, we sort of can now. Whether older GPUs can render them is a different matter altogether though.
This is a pretty ignorant take.
As someone who moved from Singapore to the UK, this assessment is really quite funny. The Online Safety Act says hello.