mockery
* since cos(x+y) ~ cos(x) - sin(x)*y
* ~ cos(x) - x*y,
For the first, maybe it's an approximate identity I'd never heard of?For the second, it seems like it relies on X being small, but in this code... Y might be small enough for sin==identity approximation, but X isn't, is it?
For example AOT compilation often has to account for the possibility that the target machine might not have certain instructions - like SSE/AVX vector ops, and emit both SSE and non-SSE versions of a codepath with, say, a branch to pick the appropriate one dynamically.
Whereas a JIT knows what hardware it's running on - it doesn't have to worry about any other CPUs.
In my experience in a large+mature enough codebase (particularly one that is already multi-platform, like Postgres appears to be) many of those requirements are wrapped in an abstraction layer to allow targeting new platforms, but some requirements (like memory mapping) could definitely be dealbreakers if the target platform doesn't naturally support them.
This solution still seems awfully complex (and probably not very efficient) but I certainly see why it's probably the "easiest" option.
Crunchy's HN post provided some hints about the approach they took, which was to virtualize a machine in the browser. We pursued this strategy too, settling on v86 which emulates an x86-compatible CPU and hardware in the browser.
I’m out-of-domain but very curious about this part - it seems like a pretty extreme solution with a lot of possible downsides. Does this mean the “just compile native code to WASM” goal is still far off?
Making the full game playable would probably be less OK.
The post also explains why they started from scratch vs. existing approaches - I'm not qualified to evaluate the claims, but I think they deserve some credit for explicitly talking through their reasons.
I'd claim there are actions that may be "morally justifiable" yet not raise to a level that creates a "moral obligation." The word "obligation" implies (to me at least) some sort of guilt or culpability if you don't undertake the action.
In fact my instinct is that most morally justifiable actions aren't weighty enough to be obligations. Consider any "morally neutral" action (for example, eating an apple instead of an orange for a snack) - I would label such an action "morally justifiable" (since applying the rules of morality does not argue against it) but it's certainly not a "moral obligation" (even ignoring the fact that the alternative is also morally justifiable!)
You could perhaps argue there is no such thing as a "truly neutral" action to an omniscient observer, who can measure and predict the impact on total human happiness of any action with certainty. Such an individual would indeed have a much more restrictive set of "morally justifiable" actions available to them - fortunately we mortals aren't burdened with that level of insight or certainty!
To my eye, the code is fundamentally broken in a way that's surprising for an article trying to teach threading, and it's likely confuse someone unfamiliar with these concepts.
It suggests a particular implementation, but in practice most nontrivial "immediate mode" GUI libraries (including egui [1] and the famous Dear-IMGUI [2] [3] ) retain some "shadow state" between frames. The existence or scope of that state is a (sometimes-leaky) implementation detail that shouldn't distract from the fact that the API presented is still "immediate mode."
[1] https://github.com/emilk/egui#ids
[2] https://github.com/ocornut/imgui/blob/master/docs/FAQ.md#q-a...
[3] https://github.com/ocornut/imgui/wiki/About-the-IMGUI-paradi...
(Although I'm not an active git/github user, so maybe there's an even more more obvious place a naive user having issues would go to figure out what their problem is. Hopefully there's a helpful commandline error explaining the situation.)
Can you cite a source for that claim? Genuinely curious, because I don't know if I've ever heard someone suggest it. (Conversely, the idea that education is substantially underfunded is generally assumed - at least in my bubble.)
Google that term for many examples, but [3] looks like a good starting point.
[1] https://www.sidefx.com/docs/houdini/nodes/vop/curlnoise.html
[2] https://docs.unity3d.com/Packages/com.unity.visualeffectgrap...
[3] http://petewerner.blogspot.com/2015/02/intro-to-curl-noise.h...
Depending on what your layers look like (how many, how much they cover, etc.) it's not too surprising that the preview image could take a substantial fraction of the total file size (sounds like ~20% in this case!)
* I believe this behavior can be toggled off with an option.
That said, tere are a decent set of AAA games that license Unreal (PUBG, State of Decay, Borderlands series, Arkham series, XCom series) but it's rare among the absolute biggest titles ("AAAA" if you will.)
The template executes like a script (with conditionals and looping) and a line like "int32 myNum;" is actually just syntactic sugar for "read 4 bytes from the current file pointer and label it myNum." Their example probably does a better job explaining it than I can:
struct FILE {
struct HEADER {
char type[4];
int version;
ushort numRecords;
} header <bgcolor=cLtGray>;
struct RECORD {
int employeeId;
char name[40];
float salary;
if( file.header.version > 1 )
int numChildren;
if( file.header.version > 2 )
time_t birthDate;
} record[ file.header.numRecords ];
} file;
( From: https://www.sweetscape.com/010editor/templates.html )Some people seem to think "beyond a reasonable doubt" means the same as "beyond any shadow of a doubt" - but they are very different standards!
[1] https://en.wikipedia.org/wiki/Spanish_flu#Around_the_globe
I don't think I actually agree, however. Things like hashing and cryptography make me inclined to believe a digital 'chain of custody' is easier to prove and validate than a physical one.
( *I'd never heard this before, but it's an interesting claim )
Makes it very hard to evaluate claims of codec quality, which seems like the primary purpose of the blog post. :(
Does this mean they already had an AWS "Top Secret" Region?
If so, that seems like it would be insufficient since a thrown object doesn't move linearly, let alone its projection.
If not, then I'm curious what you're describing, and how it's much simpler than integrating an ODE?