Domain-Specific Tensor Languages

in

Now, if you’re not already familiar with tensors (and let’s be real, who is?), they’re basically mathematical objects that can represent arrays or matrices in higher dimensions. And while there are plenty of array-oriented languages out there for dealing with these things, the problem is that they don’t really take advantage of tensor properties and algebraic structure.

On the other hand, you have categorical tensor languages which require programmers to manipulate tensors in an unwieldy point-free notation. This can be a real headache for anyone who isn’t already fluent in category theory (which is basically math speak for “a bunch of abstract concepts that don’t really mean anything”).

But let’s not get too bogged down in the technical details here because at the end of the day, what we really care about is practicality. And unfortunately, tensor calculus has a dominant pedagogical paradigm that assumes an audience comfortable with notational liberties which programmers cannot afford.

In other words, if you’re trying to learn how to use tensors in your programming language of choice (which let’s be real, is probably Python), you might find yourself struggling to figure out the linguistic aspects like variable binding and syntax and semantics on your own. And that can be a major roadblock for anyone who wants to get started with this stuff.

So what’s the solution? Well, we could always just create our own domain-specific tensor language specifically designed for programmers! That way, we wouldn’t have to worry about all these ***** notational liberties and abstract concepts getting in the way of practicality. And who knows maybe it would even be fun to learn!

But until that day comes (and let’s face it, it probably won’t), we’re stuck with array-oriented languages or categorical tensor languages. So if you want to get started with tensors in your programming language of choice, just remember keep it simple and don’t worry too much about the math speak!

SICORPS