4 ms·
Wow this is beautiful! The "main" equation for the physics of projectile motion is less than 10 lines of code: https://github.com/walck/learn-physics/blob/maste
by ivan_ah 9y ago
Wow this is beautiful! The "main" equation for the physics of projectile motion is less than 10 lines of code: https://github.com/walck/learn-physics/blob/master/examples/src/Projectile.hs#L25 https://github.com/walck/learn-physics/blob/master/examples/...
The "state" of the system St is defined here https://github.com/walck/learn-physics/blob/f6ce9bbaece24f481f170bb72b8c6b10500ee383/src/Physics/Learn/Mechanics.hs#L110 https://github.com/walck/learn-physics/blob/f6ce9bbaece24f48...
It's amazing to see code and implementation details that match the physics language.
I wonder if this codebase is ELM-able? i.e. does it use any specific features from Haskell that are not in ELM? I'd love to see this in the browser. Weekend project anyone?