Rustograv 0 ▲ bkataru 2 hours ago · Tech · hide · 0 comments Turns out all you really need for automatic differentiation at compile time is to encode your tensor shenanigans, differential geometry as algebraic data types with the resulting type theory. The derivatives aren't magically evaluated before the program runs. The point is that the structure of the mathematics can live in the types, and the compiler can then specialize the whole thing down into ordinary numerical code. I've just finished the first working Rust version of autograv. The project started as a Python library using JAX for numerical relativity. It computes Christoffel symbols, curvature tensors, Ricci and Einstein tensors, stress-energy tensors, and the Kretschmann invariant from a metric function. The Python version worked. But it was still very much an array-programming project: JAX arrays, jacfwd, einsum, and numerical tensor operations. Then I came across u/minerscale's post about diffable 0.5.0 in r/rust. diffable attacks the problem in two ways. The first was… No comments yet. Log in to reply on the Fediverse. Comments will appear here.