It's not great, but you can always catch and retry if your belief is that the GC will free enough memory to allow the attempt to continue after the memory pressure subsides.
Let's say you get 1/100 requests that are randomly sent to your process. That 1 takes 100x the average memory usage of the others. You could spin it out to different services to better handle the weird one-off, but that doesn't always make sense. Sometimes you just need to be ok with working the 100x job and let the other 99 get progressive falloff retry. Different solutions are always possible.
> It's not great, but you can always catch and retry if your belief is that the GC will free enough memory to allow the attempt to continue after the memory pressure subsides.
No, you cannot. Catching, for example, StackOverflowError (which inherits from Error) can lead to very strange deadlocks and such (if locking is relying on try-finally discipline, as it should), even if you do "almost nothing" before re-throwing.
It's a huge hornet's nest of weirdness to even attempt to catch anything which derives directly from Error. (Rather than RuntimeException/Exception.)
EDIT: There are some really strange subclasses of Error now that I think about it. E.g. VirtualMachineError ... I don't think I've ever seen that in any logs, thankfully, but what exactly is the program (running on the failing VM) supposed to do if that is thrown? It'd be like trying to carry on or log an error if suddenly 1==2 turned out to be true.
> There are some really strange subclasses of Error now that I think about it. E.g. VirtualMachineError
An OutOfMemoryError is a VirtualMachineError. The Java runtime doesn't technically contain the idea of "finite memory". The language sort of assumes there's an infinite amount of memory. When there isn't and the VM is forced to throw an OutOfMemoryError it's technically a breach of the abstraction of the language and the VM is unable to continue working.
Erm, maybe file based? JSON is the king if you count exchanges worldwide a sec. Maybe no 2 is form-data which is basically email multipart, and if course there's email as a format. Very common =)
JSON tabular data only adds a couple of brackets per line and at the start/end of the file vs CSV. In exchange for these bits (that basically disappear when compressed), you get a guaranteed standard formatting. Seems like a decent tradeoff to me.
The unemployment rate is what, 3%? Where are you going to find the millions of people needed to make the iPhone domestically? Immigration? Hah, that would be an interesting stance. Automation? It would work to fill some gaps, but even apple doesn't want to pay Chinese workers for tasks that machines can do today. Someone in their company decides on when they automate, and when they use elbow grease. They may be able to afford a lot of the capital outlay to greatly improve the productivity of their workers if effectively required to onshore, or they may just stop selling iPhones in the US for a few years if all cell phones become prohibitively expensive to own. If Apple can't make the economics work, I can't see who can.
> The unemployment rate is what, 3%? Where are you going to find the millions of people needed to make the iPhone domestically?
I don't know off the top of my head, but that sounds like a great problem to have and I'd be happy to do whatever it takes to make sure we have that problem.
I'm sure that China will suffer greatly from any trade war, and I'm positive the US will blink first. Chinese consumer and workers are already significantly less likely to revolt, stop working, drag their country down. The second that dollar store becomes $10store in the US, it'll be pandemonium, and they only have a single person to blame for their troubles. China? They may be doing anti-competitive trade practices and haven't been put to task, but if you ask the Chinese citizen who to blame on the trade war, it'll be trump. If you ask a US citizen who to blame for this trade war, it'll be trump.
I actually have made it a personal rule to never sign up for TikTok. Instagram usually gets the stolen reposted content of whatever trends on TikTok a week ago. Browsing Instagram on the phone you are just swiping and taking in whatever the algorithm feeds you and unless you save it, that content might be gone forever. Who knows how much slop has just "drive by" messed up my brain.
Nevertheless I saved a couple pieces I found interesting or amusing:
I made a new TikTok account out of curiosity after Trump "saved" the platform. No exaggeration, half of the "For You" content was from "Team Trump" or Charlie Kirk. They are actively pushing propaganda, but I've seen no signs that it's Chinese propaganda, unless you assume that Bytedance is bowing to Trump, and that Bytedance is controlled by the Chinese Government, which just raises more questions.
Youtube Premium is the only "streaming service" I actually pay money for, and I use it quite a bit. Rarely ever does something off the wall get pushed to me. I do consume politics on YT, and occasionally something right wing shows up, but it's rare. I have no doubt that this stuff would be prioritized on a new account though.
The TikTok bill appeared to have died on the vine until it started to get a lot of Pro-Palestine content then all of a sudden it reappeared and the ban got put into law. I think Trump stopping the ban was actually the first major loss for pro Israel interests(certainly not the last we have seen so far).
I would say its not that extreme on the platform(I still see the week old TikTok posts sometimes reposted on other platforms) but regardless, the damage has been done. As they continue to lose this information war, their tactics become more and more unhinged. See the recent bill banning boycotting Israel products with a punishment of a million dollars fine. It was met with such backlash that politicians quickly withdrew it. Even MAGA jumped on board to block that.
Like it or not this is a competition between two nations. If they are going to push content that sways the populace by exploiting weaknesses why not the other way around?
You are acting like this started as soon as Trump opened his mouth, its been in the shadows for years but it really ramped up after he started this nonsense.
It's a competition between nations, but why support the political party that straight up says they hate you just because China also hates them?
Like, if I hate the idea of eating kittens, and someone I hate also says they hate the idea of eating kittens, I'm not going to say "oh hell no, I can't let them shittalk OUR kitten eaters!"
I'm just going to be like "yeah, they have a point on this one", accept that a broken clock is right twice a day, and move on. Nationalist/jingoist garbage just for the sake of it makes countries worse.
There are many ways you can look at this situation. In my view, I don't think its a matter of hate. You gotta separate the actions of the clown on top with the actions of the government. The government is tasked with protecting the people and ensuring their best future. To them, it does not matter if its competing against China or any other country. Its not personal, its business.
To that end, the US's rivals have long used its weaknesses against it. While there are unconfirmed reports that China and Russia helped to prop up BLM in 2020, we do know for a fact that the USSR fanned the flame of racial tensions during the cold war. The best way to fight this? Get as close as you can to a fix for the problem. In that regard the USSR's attacks could have been used against them as a motivation to improve things and the US has improved.
Likewise its questionable if pushing the lie flat movement would harm regular Chinese people. From the government's POV, it looks bad: Chinese people being worked to death, can't afford a one bedroom apartment and one couple has to take care of possibly four elderly people. Of course some will just decide to 'opt out'. Makes China look bad while also possibly helping regular Chinese people in the long run.
The benefits of education on a country are decades long to fully see the positive outcomes. How do you expect differently by destroying said institutions? Your kids or likely kids kids will be feeling the decision of today as the beginning of the dark ages (at least in the US). Without innovative people able to achieve great progress, where does society, , hell humanity go? At the very least from a here and now position, it's a strong signal to continue pulling money out of the US and into countries that have better long term outlook.
The two OS kernels and API are super close (outsider perspective). I used win2k for like 10 years mostly on the back of applications and games supporting XP for so long. I can't recall the big API differences. Maybe XP has UAC and there were APIs to check for it? Anyways, I still have fond memory of manually patching out API calls hard coded into EXEs to bypass XP only parts which were almost always superfluous.
Yes, I'm aware. Normally they shouldn't behave wildly differently, but the new GUI and userspace features made the system a bit flaky at first. Also, XP became a bit more finicky about drivers over the years, and this broke stuff, too.
2000s kernel was one of its better features, but lack of blingy GUI was also helping in its stability IMHO.
And they don't even bother holding their noses tightly sealed as they let them pass. Source of income (you know what I mean) has no bearing on these places. Enjoy your neighbours, definitely don't piss them off without.. consequences
Why, because 90% of her job is talking to and appeasing shareholders, grand standing with fat whales, and what else.. what do you think a CEO at these companies actually does? They aren't in the trenches of each subdivision nurturing and cracking whips. She likely attends a 2 hour briefing with a line item: CUDA parity project: on schedule release date not set
Make builds in docker by mounting volumes and have your sources, intermediate files, caches, etc. in these volume mounts. Building a bunch of intermediate or incremental data IN the container every time you execute a new partial compile is insanity.
It's very satisfying just compile an application with a super esoteric tool chain in docker vs the nightmares of setting it up locally (and keeping it working over time).
I had a project that had to build for macos, linux and windows on armv7, armv8 and x64 (and there were some talks about mips too). Just setting up all the stuff required to compile for all these target archs was a nightmare.
We used a single huge docker image with all the dependencies we needed to cross compile to all architectures. The image was around 1GB, it did its job but it was super slow on CI to pull it.
Let's say you get 1/100 requests that are randomly sent to your process. That 1 takes 100x the average memory usage of the others. You could spin it out to different services to better handle the weird one-off, but that doesn't always make sense. Sometimes you just need to be ok with working the 100x job and let the other 99 get progressive falloff retry. Different solutions are always possible.
reply