Readit News logoReadit News
mckravchyk commented on Undefined Behavior in C and C++ (2024)   russellw.github.io/undefi... · Posted by u/imadr
VivaTechnics · 4 months ago
We switched to Rust. Generally, are there specific domains or applications where C/C++ remain preferable? Many exist—but are there tasks Rust fundamentally cannot handle or is a weak choice?
mckravchyk · 4 months ago
If you wanted to develop a cross-platform native desktop / mobile app in one framework without bundling / using a web browser, only QT comes to mind, which is C++. I think there are some bindings though.
mckravchyk commented on Carbon Language: An experimental successor to C++   docs.carbon-lang.dev/... · Posted by u/samuell
mihaic · 5 months ago
It's become a pet peeve of mine, but for the love of God, if anyone with input in Carbon is scanning this, what can be done to use "func" instead of "fn" as a keyword?

That all-consonant keyword always makes it seem like I'm reading Hungarian notation when reading Rust for instance. An other options I've seen for instance in Pony, "fun", is already an English word with a completely different meaning.

Even the "function" from Javascript seems fine to me.

mckravchyk · 5 months ago
C++ does not have a function keyword at all, I wonder why did they add it in the first place.
mckravchyk commented on Use Your Type System   dzombak.com/blog/2025/07/... · Posted by u/ingve
mckravchyk · 5 months ago
I'm using typed IDs in TypeScript with template literal types. I.e. `type UserId = `user_${string}` I've written a blog post about it a while ago [1] One can argue that this pollutes runtime, however, it is a feature to me. When the ID pops up in the logs, it is instantly obvious what the object is, error messages are more meaningful. You can notice that Stripe uses such approach in their API.

[1] https://www.velopen.com/blog/adding-type-safety-to-object-id...

mckravchyk commented on Let me pay for Firefox   discourse.mozilla.org/t/l... · Posted by u/csmantle
rft · 5 months ago
Not trying to single you out here, I want to argue against how standard it has become to require a license server. A license server puts an expiry date on the software at an unknown point in the future. At some point the binary you downloaded after you paid for the software will stop working because the server got turned off, changed API, your internet connection is down, your local CA store got corrupted or any other kind of problem in the huge list of dependencies that goes into making a secure API call over the internet. Sure, you can put in safeguards against all kinds of issues, but that also comes at a development cost and you can never reach a point where the software will just continue to work, no matter what.

Even if you, as the company selling the software, can accept all of the above, a license server still is a liability. You sold someone a product and now you need to keep a public API running "forever" (as defined in your legalese). If something goes wrong on your end you are now denying the product you already sold to your customers who already paid for it. I know this is in the end all mitigated by some legalese, which is a whole different can of worms. You also need to make sure your license API is secure and can not leak user data or be twisted into exploiting your software during license checking. There is an ongoing cost to keep the infrastructure running.

As a sibling comment pointed out you can use local only license management like license keys or just nothing like WinRAR or FUTO Keyboard[1]. Yes, you will get users not paying for your software, there will be keygens out there. But even if you use a remote license check, there will be cracks on day 1, if your software is popular enough. I know this is an old and flawed argument, but if someone is willing to navigate a website full of malware infested, blinking ads to avoid paying for your software, they probably would not pay for it anyway.

As an example of what the end stage of hooking up every software to a remote API looks like, Stop Killing Games [2] has done a great job of highlighting just how bad it has gotten in the gaming market. I know there have been some heated discussions around the movement, but the core idea of being able to keep using the software you paid for, is something I absolutely support.

[1] https://keyboard.futo.org/

[2] https://www.stopkillinggames.com/ https://hn.algolia.com/?dateRange=pastYear&query=stop%20kill...

mckravchyk · 5 months ago
I think the bigger problem would be license key sharing. If there's no server involved, there's no way (?) to prevent the same license key from being shared freely on the Internet and being used an unlimited amount of times, is it? This allows pirates to use a clean version with 0 risk of installing some malware.
mckravchyk commented on 'Europe must ban American Big Tech and create a European Silicon Valley'   tilburguniversity.edu/mag... · Posted by u/taubek
mckravchyk · 5 months ago
The same Europe that introduces Cyber Resilience Act? Good luck. Imagine how many businesses will not be created because no one wants to risk burdening themselves with obligatory by law, 5 years of security maintenance of the product. It does not just suffice that you risk failing, you risk having to maintain it for years after the potential business failure.
mckravchyk commented on Bypassing Google's big anti-adblock update   0x44.xyz/blog/web-request... · Posted by u/deryilz
amluto · 5 months ago
No, MV3 really isn’t more secure. MV3 still allows extensions to inspect your requests — it just doesn’t allow extensions to block them.

It’s almost comical how weak the security/privacy argument for MV3 is. Chrome could have developed a sandboxed web request inspection framework to prevent data exfiltration, but they didn’t even try. Instead they nerfed ad blockers without adding any security.

mckravchyk · 5 months ago
I remember that another comical argument was performance. Supposedly, having extensions run in the background all the time is bad. So it's better to constantly, completely re-initialize them whenever an event wakes them up.
mckravchyk commented on Writing toy software is a joy   blog.jsbarretto.com/post/... · Posted by u/bundie
mckravchyk · 6 months ago
If I ever have time for it, I would love to program a rotating LED display [0] Looks like magic.

[0] https://www.youtube.com/watch?v=LIvihYPq_mQ

mckravchyk commented on A case of humidifier lung; the key diagnosis is detailed medical history taking   pmc.ncbi.nlm.nih.gov/arti... · Posted by u/thunderbong
rainsford · 8 months ago
I don't know if anyone has done a study of the prevalence of humidifier lung with different types of humidifiers, but I'd bet that the common ultrasonic ones are the worst and it wasn't surprising to me that the model in the linked case was ultrasonic.

I've used ultrasonic humidifiers in the past and clean them well enough to avoid humidifier lung, but stopped when I noticed the air quality sensor on my air filter would go nuts when using the humidifier with anything other than distilled water. Which makes sense in hindsight, since any ultrasonic humidifier is essentially blasting everything in the water all over your house. Any contamination in the humidifier or the water is going straight into your lungs.

Steam and evaporative humidifiers have their own downsides, but their respective processes of producing water vapor seem to carry less non-water things with it. Which again makes sense given the physical processes involved.

mckravchyk · 8 months ago
Is it possible for steam from boiling water to contain any impurities?
mckravchyk commented on How to gain code execution on hundreds of millions of people and popular apps   kibty.town/blog/todesktop... · Posted by u/xyzeva
felixrieseberg · 10 months ago
As an Electron maintainer, I'll re-iterate a warning I've told many people before: Your auto-updater and the underlying code-signing and notarization mechanisms are sacred. The recovery mechanisms for the entire system are extremely painful and often require embarrassing emails to customers. A compromised code-sign certificate is close to the top of my personal nightmares.

Dave and toDesktop have build a product that serves many people really well, but I'd encourage everyone building desktop software (no matter how, with or without toDesktop!) to really understand everything involved in compiling, signing, and releasing your builds. In my projects, I often make an argument against too much abstraction and long dependency chain in those processes.

If you're an Electron developer (like the apps mentioned), I recommend:

* Build with Electron Forge, which is maintained by Electron and uses @electron/windows-sign and @electron/osx-sign directly. No magic.

* For Windows signing, use Azure Trusted Signing, which signs just-in-time. That's relatively new and offers some additional recovery mechanisms in the worst case.

* You probably want to rotate your certificates if you ever gave anyone else access.

* Lastly, you should probably be the only one with the keys to your update server.

mckravchyk · 10 months ago
> No magic.

There's plenty of magic. I think that Electron Forge does too many things, like trying to be the bundler. Is it possible to set up a custom build system / bundling with it or are you forced to use Vite? I guess that even if you can, you pull all those dependencies when you install it and naturally you can't opt out from that. Those dev dependencies involved in the build process are higher impact than some production dependencies that run in a sandboxed tab process (because a tiny malicious dependency could insert any code into the app's fully privileged process). I have not shipped my app yet, but I am betting on ESBuild (because it's just one Go binary) and Electron Builder (electron.build)

mckravchyk commented on PHP 8.4.4 Released   php.net/releases/8_4_4.ph... · Posted by u/ms7892
someothherguyy · 10 months ago
One wonders, why is a minor release announcement for PHP on the front page?
mckravchyk · 10 months ago
This is a sabotage so the next major release doesn't get any attention ;)

u/mckravchyk

KarmaCake day119June 10, 2022
About
Front-end developer, part-time contractor and working on my own product in the remaining time.

GitHub: https://www.github.com/mckravchyk

View Original