> i am holding an apple in my hand. if i open my hand, what will happen? why?
> If you open your hand while holding an apple, the apple will likely fall to the ground due to the force of gravity. This is because gravity is a force that pulls objects towards the center of the Earth, and the apple, being a physical object, is subject to this force.
> When you hold the apple in your hand, you are exerting a force on it in the opposite direction of gravity. This force is what keeps the apple in your hand. When you release the apple by opening your hand, the force you were exerting on it is removed, and gravity takes over, causing the apple to fall to the ground.
> The speed at which the apple falls depends on a number of factors, including the mass of the apple and the strength of the gravitational force. In most cases, however, the apple will fall relatively quickly due to the strong gravitational force exerted by the Earth.
The other example is easily refuted as well:
> explain the meaning of this sentence: “John is too stubborn to talk to”
> The sentence "John is too stubborn to talk to" means that John is very resistant to changing his opinions or beliefs and as a result, it is difficult to have a conversation or communicate with him effectively. This implies that talking to John might not be a productive or helpful experience as he is not open to listening or considering alternative viewpoints. The use of "too" in the sentence emphasizes the level of stubbornness and implies that it is extreme, making communication with him nearly impossible.
The apple explanation is trivially wrong. The speed doesn’t depend on the mass of the apple to any reasonable approximation, while it does depend somewhat on air resistance.
Drag force depends on the density of the air, the air's viscosity and compressibility, the velocity of the apple, the size and shape of the apple and the angle between the apple and the air flow.
Funny enough, since Newton's law is m z̈ = ∑ F, the actual velocity of the apple (ż) depends on the mass of the apple after all.
For the approximate force due to gravity, you have m g where g is the acceleration due to the Earth's gravity on objects close to the surface of the Earth.
In total, m z̈ = C ρ A ż^2/2 - m g where C is the drag coefficient, A is the reference area of the apple and ρ is the density of the (assumed spherical) apple.
The general idea being to abstract away the difference between client and server code, so that you can write code that handles both, in a single file.
> There has got to be a better way
What's offensive about the OP to you? Is it just that you don't like functional programming / Clojure (fair, that's ultimately a matter of taste / aesthetics at some level)? Or is there something about the technical implementation you think is suboptimal?
Thank you for posting those two, I wanted to post them but I don't comment often. Wanted to chip in another contemporary: edelvalle/reactor, which is inspired by LiveView[0].
I am using Hotwire for a project, and I'm learning Elixir and Phoenix on the side. Finding edelvalle/reactor was immediately helpful to me though, because I cut my teeth on Python/Django, so reading a Python reference implementation helps me learn nuts and bolts of libraries, faster. (so, I figure that this might help someone else grok how these approaches work.)
I mean sure but you can’t get over the need to have a two way pipe of some kind to pass events server <-> client. Like no matter what you’ve got two balls of state with bidirectional relationships between them.
`get` will destroy type inference, there's no workaround. Your output types are always `any`. The new optional chaining fixes that problem, giving you the same terseness as `get`
In lodash's defense, there is a @types package for it, which has a typed _.get. However, in my experience, the lodash typings are really difficult to use correctly.
Definitely will be replacing usage of _.get with optional chaining soon.
> i am holding an apple in my hand. if i open my hand, what will happen? why?
> If you open your hand while holding an apple, the apple will likely fall to the ground due to the force of gravity. This is because gravity is a force that pulls objects towards the center of the Earth, and the apple, being a physical object, is subject to this force.
> When you hold the apple in your hand, you are exerting a force on it in the opposite direction of gravity. This force is what keeps the apple in your hand. When you release the apple by opening your hand, the force you were exerting on it is removed, and gravity takes over, causing the apple to fall to the ground.
> The speed at which the apple falls depends on a number of factors, including the mass of the apple and the strength of the gravitational force. In most cases, however, the apple will fall relatively quickly due to the strong gravitational force exerted by the Earth.
The other example is easily refuted as well:
> explain the meaning of this sentence: “John is too stubborn to talk to”
> The sentence "John is too stubborn to talk to" means that John is very resistant to changing his opinions or beliefs and as a result, it is difficult to have a conversation or communicate with him effectively. This implies that talking to John might not be a productive or helpful experience as he is not open to listening or considering alternative viewpoints. The use of "too" in the sentence emphasizes the level of stubbornness and implies that it is extreme, making communication with him nearly impossible.