In Australia we recently had a telecom outage with Optus; there were untold amount of damage
- card payments at shops/cafes were out.
- rural towns completely cut off (a few in particular are only serviced by Optus)
- emergency services unavailable; for example a snake wrangler was unable to receive his call-outs
- hospitals infrastructure came to a halt
And I'm only going off of examples I have heard. These outages are very damaging.
Based on your comment below I think you figured out the difference - but if you're looking to execute untrusted Javascript from Javascript in Node or the browser, you can pick between ShadowRealm (where available, or using a polyfill) or my library quickjs-emscripten.
- In ShadowRealm eval, untrusted code can consume arbitrary CPU cycles. With QuickJS, you can control the CPU time used during an `eval` using an [interrupt handler] that's called periodically during the eval.
- In ShadowRealm eval, untrusted code can allocate arbitrary amounts of memory. With QuickJS, you can control both the [stack size] and the [heap size] available inside the runtime.
- quickjs-emscripten can do interesting things with custom module loaders and facades that allow synchronous code inside the runtime to call async code on the host.
Pros of ShadowRealm over QuickJS:
- ShadowRealm will (presumably?) execute code using your native runtime, probably v8, JavaScriptCore, or SpiderMonkey. Quickjs is orders of magnitude slower than JIT'd javascript performance of v8 etc. It's also slower than v8/JSC's interpreters, although not by a huge amount. See [benchmarks] from 2019.
- You can easily call and pass values to ShadowRealm imported functions. Talking to quickjs-emscripten guest code requires a lot of fiddly and manual object building.
- Overall the quickjs(-emscripten) API is verbose, and requires manual memory management of references to values inside the quickjs runtime.
There are no silver bullets for things like these, you really need change - but you are in a position where you are in a very demanding period of your life and you don't really have the resources to ease the burden. I am very sorry that you are going through that.
In terms of refreshing myself, sometimes I find when I am in stressful situations that I just need a bit of grounding, I remind myself of my situation, my objectives, and my direction. But also pay attention to that if something needs to be cut, then work on cutting it. There is also no shame in finishing things later, if you need to defer for a bit - do so
Sometimes you may need to bite the bullet and accept that this is a temporarily hard situation, and it's OK to feel like crap. You know your working towards a goal, but whether you think it's worth it or not that's up to your judgment. It's tough being ambitious unfortunately
And I'm only going off of examples I have heard. These outages are very damaging.