I$\heartsuit$LA: Compilable Markdown for Linear Algebra

Yong Li, Shoaib Kamil, Alec Jacobson, Yotam Gingold
9/24/2021
cs.PLcs.GR

Official code: iheartla/iheartla (230 stars, Python, MIT, last commit 2026-11-18).

Abstract

Communicating linear algebra in written form is challenging: mathematicians must choose between writing in languages that produce well-formatted but semantically-underdefined representations such as LaTeX; or languages with well-defined semantics but notation unlike conventional math, such as C++/Eigen. In both cases, the underlying linear algebra is obfuscated by the requirements of esoteric language syntax (as in LaTeX) or awkward APIs due to language semantics (as in C++).

Show full abstract

The gap between representations results in communication challenges, including underspecified and irreproducible research results, difficulty teaching math concepts underlying complex numerical code, as well as repeated, redundant, and error-prone translations from communicated linear algebra to executable code. We introduce I$\heartsuit$LA, a language with syntax designed to closely mimic conventionally-written linear algebra, while still ensuring an unambiguous, compilable interpretation. Inspired by Markdown, a language for writing naturally-structured plain text files that translate into valid HTML, I$\heartsuit$LA allows users to write linear algebra in text form and compile the same source into LaTeX, C++/Eigen, Python/NumPy/SciPy, and MATLAB, with easy extension to further math programming environments. We outline the principles of our language design and highlight design decisions that balance between readability and precise semantics, and demonstrate through case studies the ability for I$\heartsuit$LA to bridge the semantic gap between conventionally-written linear algebra and unambiguous interpretation in math programming environments.

View on arXivView PDF

Code Implementations(1)

iheartla/iheartlaOfficial100%
MIT

compilable markdown for linear algebra

23021Python, C++Feb 4, 20201 weeks agoMIT
compilercppdsllatexmatlab+3 more

Similar Papers

Cite this paper

@article{li2021iheartsuitla,
  title  = {I$\heartsuit$LA: Compilable Markdown for Linear Algebra},
  author = {Yong Li and Shoaib Kamil and Alec Jacobson and Yotam Gingold},
  year   = {2021},
  eprint = {2109.13001},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2109.13001}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2109.13001.svg)](https://codeofpaper.com/paper/2109.13001)

Discussion