Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Const-me
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
57 ms
·
691.
▲
by
Const-me
4y ago
Yeah, it’s possible to change case while loading, but I’m not sure that’s gonna be much faster. But I’m sure it gonna be much harder. For non-ASCII strings, converting case may change their length in bytes. You don’t even know in advance ho
692.
▲
by
Const-me
4y ago
> how fast the CI hash and equality operate compared to the CS ones. If the string is ASCII like in the OP’s use case, I think the difference is not huge. CS comparison looks more optimized, they have an inner loop which compares 12 byte
693.
▲
by
Const-me
4y ago
The C# standard library will not run many case-insensitive comparisons. That comparison object doesn’t just compare two objects for equality, it also has another interface method which computes a hash of a single object. Here’s implementa
694.
▲
by
Const-me
4y ago
> I don't think any language is going to offer that out of the box. C# offers that out of the box, and the solution is much simpler there. Pass StringComparer.OrdinalIgnoreCase or similar (InvariantCultureIgnoreCase, CurrentCultureI
695.
▲
by
Const-me
4y ago
In 2000, the performance overhead was too large. PowerShell, and most of PS applets are written in C#. PowerShell is a lightweight scripting layer on top of the same .NET runtime. BTW, last couple times I dealt with Linux, I remember essent
696.
▲
by
Const-me
4y ago
The definition of DSL is vague, but at least in some sense, some operating systems do implement such a DSL. For Windows between 2000 and 7, that would be VBScript. The language itself is primitive, but through various COM APIs (WMI, ADSI, A
697.
▲
by
Const-me
4y ago
> but also Windows users I’m a Windows user, and I can confirm. My HP ProBook 445 G8 laptop doesn’t support any of the proper S1-S3 sleep states. Luckily, I discovered that before any hardware has failed due to overheating, by reading th
698.
▲
by
Const-me
4y ago
Nice article, but strange fix. What they did: Klass* field1; uint8_t padding[ 64 ]; Klass** field2; What I usually do: alignas(64) Klass* field1; alignas(64) Klass** field2;
699.
▲
by
Const-me
4y ago
For example, an std::mutex is uncopyable, and even immovable.
700.
▲
by
Const-me
4y ago
It's an awesome installer, I used it in the past. If a person knows any scripting language at all, I think they will create an installer with NSIS in less than a day of work. Still, for commercial-quality software I prefer my installer
701.
▲
by
Const-me
4y ago
I like the new <bit> header. In C++/20 they added support for BSR and BSF instructions from 1985, introduced in Intel i386. In C++/23 they even added BSWAP instruction, much newer one, introduced in 1989, in Intel i486. Most
702.
▲
by
Const-me
4y ago
> How would one enforce that an app is allowed to access health data but doesn't forward it to the internet? User-mode code can’t do any IO or networking by itself. Instead, apps call OS kernels asking to open files or sockets for t
703.
▲
by
Const-me
4y ago
Some programs need gigabytes of memory, and all CPU cores, for legitimate reasons. I believe the actual problem here is the UX. Modern operating systems aren’t doing a great job communicating per-app resource consumption to end users. I thi
704.
▲
by
Const-me
4y ago
I don't like another app store. Not as a user, nor as a developer. I would prefer first-class support for self publishing. Want to install some app, open some-app.com in a browser, and click "download" button. The security is
705.
▲
by
Const-me
4y ago
> non-compute pipelines can optimize keeping data in registers/cache between different shader steps that can't really be done with compute shaders That’s exactly the problem addressed by mesh shaders. Each thread group of the m
706.
▲
by
Const-me
4y ago
They do similar job in the sense they both generate data for hardware rasterizer, but I think the differences are rather large. That PS2 coprocessor is similar to a single ARMv7 core with NEON. Mesh shaders don't run loops for elements
707.
▲
by
Const-me
4y ago
Yeah, that's more or less correct. > The new combined shader will be named "Mesh" shader It's only new for Vulkan. On Windows and XBox, mesh shaders were implemented couple years ago: https://devblogs.micro
708.
▲
by
Const-me
4y ago
In 1922 Russians have won the war against Ukrainian People's Republic. After 20 years, vast majority of Ukrainians who opposed the occupation were dead, scared to death, refugees in other countries, or in forced labor camps in Siberia
709.
▲
by
Const-me
4y ago
> why can't we have an optional modern garbage collector built into a systems language? It's possible in C#. Some language and runtime features like lambdas insist on using the GC, but with some care they can be avoided. The us
710.
▲
by
Const-me
4y ago
Sometimes data incompatibility is a soft failure as well. I was using a USB3 hard drive for couple of years. Then one day I needed to write about 60 megabytes/second to that disk, continuously for a few hours. It didn’t work, my progra
711.
▲
by
Const-me
4y ago
Mpeg-4 can do that just fine. Here’s what MediaInfo tool shows about the video stream of some *.mp4 file on my computer. The content was first released in 1997, before modern digital stuff. Frame rate mode: Constant Frame rate: 23.976
712.
▲
by
Const-me
4y ago
Many multimedia formats, frameworks and libraries actually store them that way. In Mpeg 4, each track header has a “time scale” integer field. For a video track of 23.976 FPS the value can be 23976, or half of that, 11988. Audio tracks typi
713.
▲
by
Const-me
4y ago
Another possible outcome, not present on the OP's state chart, is "USSR": Russia collapses for internal reasons.
714.
▲
by
Const-me
4y ago
If the target device is based on a microcontroller, I think C is the only reasonable choice, due to the ecosystem. If the target device is an embedded Linux computer, you can choose pretty much any language you’re comfortable with. The gola
715.
▲
by
Const-me
4y ago
The pressure in these pipes is rather high. Wikipedia [1] writes the nominal for these underwater pipes is 3200 psi. To compare, peak cylinder pressure in a gasoline car at full load is about 1000 psi, large heavy duty diesel engines peak a
716.
▲
by
Const-me
4y ago
> it would have to be extremely substandard to have failed this quickly Yes, but that’s assuming proper maintenance. Russia doesn’t have domestic technology to build or maintain complicated infrastructure like these undersea pipelines. I
717.
▲
by
Const-me
4y ago
BTW, since you apparently working on the stuff like that, check out that repository: https://github.com/Const-me/AvxMath/blob/master/AvxMath/AvxM... The license is MIT, copy-paste friendly. It doesn
718.
▲
by
Const-me
4y ago
Loading data from random memory locations became too expensive compared to computations. For log, exp, trigonometry, and similar, I think people rarely use any lookup tables. Instead, they use some high-poly approximations, and for log/
719.
▲
by
Const-me
4y ago
You can use any phone carrier you want, one of these two real ones, or one of the hundreds of VoIP providers. Regardless on your choice, you can still call the people you want, regardless on their carrier. The only difference is cost per
720.
▲
by
Const-me
4y ago
> I'm not sure what's your point. Over time, it became less important for C++ to be a good general-purpose language. When performance of idiomatic C++ is good enough, using C++ is often a bad idea: it delivers comparable perfor
More ›