- 4 Posts
- 87 Comments
it’s
while (true) { let t = Date.now(); if (timeoutMap.has(t)) timeoutMap[t](); }of course. Clearly O(n).
disclaimer
Feel free to use it. I guarantee it is bug free. Comes with express warranty. This notice is legally binding.
sus@programming.devto
Technology@lemmy.world•Microsoft seemingly just revealed that OpenAI lost $11.5B last quarterEnglish
2·3 months agoProbably
sus@programming.devto
Technology@lemmy.world•Microsoft seemingly just revealed that OpenAI lost $11.5B last quarterEnglish
14·3 months agoSo I wondered a bit how much it actually affects the economy.
“S&P 500” companies’ market cap is about 57 trillion dollars with a P/E ratio of about 30. So openai by itself is dragging down the total s&p 500 earnings by only about 0.5%. The bigger problem is that there are multiple companies like openAI, and a large chunk of the entire economy’s valuation is tied to the promise that all the AI companies will somehow become profitable sometime soon.
sus@programming.devto
Games@lemmy.world•Minecraft is removing code obfuscation in Java EditionEnglish
19·3 months agoNah, it was found sometime before november 24 2021, publicly disclosed in december 9 2021, and only used by 2b2t players on december 10 2021.
sus@programming.devto
Games@lemmy.world•Minecraft is removing code obfuscation in Java EditionEnglish
142·3 months agoThe small amount of sales of doom 2 today is not at all comparable to the massive amount of minecraft sales and minecraft-related microtransactions that microsoft is raking in. Doom has many modern sequels that are far more popular today than doom 2, while minecraft does not have any official sequel.
“You want to use teams a bit? We have a session here” “I’d be happy to, actually. Not really, but it wouldn’t be bad” “Not really? If you say so, I have a teams session ready right here” “No. No. I’m not stupid” “People use it every day.” “Tell the truth” “It’s a good user experience.” “So are you ready to use it? For 5 minutes?” “No, I’m not an idiot.”
sus@programming.devto
Programmer Humor@programming.dev•i love ai in my offline foss softwares that are still in beta
3·4 months agoThey already have almost all of the discrete gpu market, they’d have to expand to new markets (although they are kind of exploring that already)
sus@programming.devto
Programmer Humor@programming.dev•I got to avoid memory management for quite some time
7·5 months agoand with a good enough leak, the amount of unused memory will become negative!
Nim is more “high level, automatic memory management by default, but you can go 100% manual if you need to”, though the reality of doing that is basically the opposite of rust’s “everything you need to do is well-documented and solid”
Nim is a compiled language by default, and supposedly cross-compilation is usually as simple as
apt install mingw-w64 nim c -d:mingw myproject.nimthough I haven’t really tried doing it (and my general impression of nim is anything “slightly obscure” like cross-compilation still has a non-zero risk of running into unexpected thorny bugs)
The oxford that says this?
Acronym
- A group of initial letters used as an abbreviation for a name or expression, each letter or part being pronounced separately; an initialism
or the merriam webster that says this?
Some people feel strongly that acronym should only be used for terms like NATO, which is pronounced as a single word, and that initialism should be used if the individual letters are all pronounced distinctly, as with FBI. Our research shows that acronym is commonly used to refer to both types of abbreviations.
sus@programming.devto
Technology@lemmy.world•Mozilla under fire for Firefox AI "bloat" that blows up CPU and drains batteryEnglish
4·5 months agoI remember tab groups showing up one day by themselves maybe a week ago, and then I quickly clicked about two buttons and now they’re totally gone and I almost forgot they were a thing. But likely if I had summarily clicked 2 different buttons it might have been turned on without me realizing it, and that would cause the model to be downloaded and the CPU cycles to be spent (at least if I kept the tab groups on)
sus@programming.devto
Programmer Humor@programming.dev•Coincidentally, FFM peg is also something you can find on the hub
6·6 months agoWell eh, the binary seems to be about 130MB while the ffmpeg source repository is only 80MB (and the version with separate .so files (all part of the project as far as I can see) is even larger)
sus@programming.devto
Programmer Humor@programming.dev•Something something history is a flat circle
4·6 months agobuffer overflows are critical for memory safety since they can cause silent data corruption (bad) and remote code execution (very bad). Compared to those a “clean” unhandled runtime error is far preferable in most cases.
We can avoid expensive branches (gasp) by using some bitwise arithmetic to achieve the so-called “absolute value”, an advanced hacker technique I learnt at Blizzard. Also unlike c, c# is not enlightened enough to understand that my code is perfect so it complains about “not all code paths returning a value”.
private bool IsEven(int number) { number *= 1 - 2*(int)(((uint)number & 2147483648) >> 31); if (number > 1) return IsEven(number - 2); if (number == 0) return true; if (number == 1) return false; throw new Exception(); }
After working at blizzard for 51 years, I finally found an elegant solution by using the power of recursion
private bool IsEven(int number){ if (number > 1) return IsEven(number - 2); if (number == 0) return true; if (number == 1) return false; }
funny how well this fits for both meanings
Yeah, it’s in my edit I realized the same thing. I’m thinking it doesn’t actually really make sense and the real reason is more “the specific way C does it causes a lot of problems so we’re not poking syntax like that with a 10 foot pole” + “it makes writing the parser easier” + maybe a bit of “it makes grepping easier”


maybe they were looking for extra special characters like 🁄 or ⶸ. Who am I kidding, RFC 1738 tells us that literally everything is unsafe and you know, we need to prepare for the inevitable occasion when the password somehow ends up inside an URL.
It ends up with