To save people time: this has absolutely nothing to do with Markdown. The parallels drawn to Markdown are utter nonsense, specious and disingenuous.
What it is is a language for executable mathematics, using Unicode characters heavily so that the source form looks generally much more similar to customary writing styles than the likes of TeX’s ASCII-based $…$ syntax, but which for most people is completely impossible to type in a general-purpose text editor—thereby pairing something mildly similar in concept to Markdown (though not novel to Markdown) with the absolute antithesis of Markdown (which is firmly designed for ease of entry). (Yes, it has ASCII alternatives, see https://github.com/iheartla/iheartla/wiki/Keywords-And-Speci..., but is clearly aiming for you to use the Unicode.)
(I make no comment about I Heart LA beyond this. I am only criticising the mention of Markdown, nothing else.)
It is fairly easy to type if you have configured a Compose key. Usually this can be done system-wide, but Vim for example also supports digraphs, which work similarly. For example Ctrl+K (- gives you ∈, Ctrl+K +Z gives you ∑, Ctrl+K In gives you ∫, Ctrl+K 00 gives you ∞, and so on. You can freely redefine the digraphs to suit your choice of mnemonics. I’m sure Emacs has something similar.
Learning the Compose or digraph key sequences is not much different from learning LaTeX commands. The trade-off is that you can’t infer from the result how it was typed, but in return it is more readable and more compact.
As I said: which for most people is completely impossible to type in a general-purpose text editor. You and I may have a Compose key configured (I use mine liberally, thrice in my parent comment), and Vim may have digraphs available out of the box, but neither of these affects my statement.
I believe everyone in the target audience of the language won’t have much trouble setting this up, and as I demonstrated there are general-purpose text editors that have this built in. Yes, you have to show people how to do it, but then it is completely possible for anyone.
In my opinion, use of such Unicode characters should become more common, because the general method of how to type them is not difficult to learn. It would be nice if operating systems had it preconfigured — maybe we’ll get to that state someday. We have to start somehow.
In any case, I applaud the language for taking that approach.
One of them on macOS is dragging-and-dropping a Text Substitutions.plist (in the extras/ folder on GitHub) into the substitutions panel in System Preferences.
Perhaps in a sense any format that isn't a markup is a markdown. So John Gruber partly created a language which grew into a family of languages and partly coined a phrase.
I also found it confusing, just trying to see why they would internally say markdown and it would make it out to a post.
A longer and more accurate title would be "Compilable Lightweight Markup Language for Mathematics" [0]. Using Markdown instead is like saying "Uber for X".
Our follow-up project HeartDown (linked) explores embedding I Heart LA in markdown documents.
This project is a good initiative. But I was also expecting Markdown to make a cameo appearance somewhere. "Compilable Markup for Linear Algebra" would be pretty clear to me.
> thereby pairing something mildly similar in concept to Markdown (though not novel to Markdown) with the absolute antithesis of Markdown (which is firmly designed for ease of entry).
I would say that this is false.
> The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible.[1]
E.g. indented code blocks are nice to read (and you don’t have to think about escaping) but fenced code blocks are easier to type.
Symbols that map directly to the domain seems like a readability win to me.
Julia syntax is pretty nice! No multiplication by juxtaposition, element access uses [], and then your code is specific to Julia rather than convertible to lots of environments. I would love to see a Julia backend for I Heart LA.
I forgot that Julia can do juxtaposition multiplication with literal prefixes. (My guess is symbols that can't begin an identifier.) Otherwise, the types of the terms must be known at parse-time to correctly interpret, for example, f(x)².
Another thing I find confusing are the braces around ℤ × ℤ. They seem to be unnecessary (it wouldn’t make much sense for ∈ to have higher precedence than ×), and/or would imply a singleton set containing the set ℤ × ℤ as its only element.
Unicode actually has semantic symbols that could be used for a nicer 2D monospaced layout here, such as ⎧ ⎪ ⎨ ⎩ ( (LEFT CURLY BRACKET UPPER HOOK, MIDDLE PIECE, LOWER HOOK, and CURLY BRACKET EXTENSION). With more conditional rows, you could use these. One downside is that you would have to do a 2D parse, since the = wouldn't be on the first line. We've been loath to go there. It also seems painful as a user to have to type all the right bracket symbols in all the right places.
We do support the Unicode ⎡|⎦ symbols for matrices. The grammar is that a matrix starts with either [ or ⎡ and ends with either ] or ⎦. Rows can be optionally surrounded by |. I find this too cumbersome to use myself.
The docs [1] include a table of symbols you can copy/pate from, and lists shortcuts that will be expanded by the IDE/online editor [2] - these mostly look like the LaTeX commands for the symbols (some are more concise, like \R and \Z as shortucts for \mathbb{R} and \mathbb{Z}).
It would be useful if there was something like a help button in the IDE that opened this table in a modal, rather than just a link.
When I bring up the context menu for the compiled result on <https://iheartla.github.io/iheartla/>, my preferred renderer MathML is missing.
I noticed right away that something is wrong because the result objectively looks bad, the bracket parts are of differing width, various surrounding elements do not align with the contained content, and also the text has terrible kerning. <https://files.catbox.moe/wp2r0t.webp>
Compare with e.g. <https://codimd.web.cern.ch/features#MathJax> which has much more options to choose from as renderer and its output as MathML is exceedingly pleasing to look at.
We're using MathJax 3.x, which dropped support for inserting MathML into the DOM due to uneven browser support [0]. The example you linked uses MathJax 2.x.
Thanks for taking the time to investigate and explain the problem. I understand you're not at fault but the maintainers upstream, yet I can't help but be disappointed. Removing MathML doesn't help anyone, the user just has a worse experience; it's caused by the same brainrot as with Gnome.
For instance, Mathematica is great, we can actually use and see the domain language (which is symbols, subscripts, Greek letters) while coding mathematical formulas instead of weirdly translating everything into English.
I for one would love to see us evolving past ASCII
Would also be good to have a dedicated emacs mode for faster editing; you could use it with polymode and latex/python/cc/matlab-mode with some function for converting regions of iheartla to the appropriate language inline.
AsciiMath is a lightweight markup language for mathematical notation. Most mathematical notation isn't compilable. I Heart LA is focused on a compilable subset of mathematics. We chose to write our own grammar for various reasons.
45 comments
[ 0.26 ms ] story [ 108 ms ] threadWhat it is is a language for executable mathematics, using Unicode characters heavily so that the source form looks generally much more similar to customary writing styles than the likes of TeX’s ASCII-based $…$ syntax, but which for most people is completely impossible to type in a general-purpose text editor—thereby pairing something mildly similar in concept to Markdown (though not novel to Markdown) with the absolute antithesis of Markdown (which is firmly designed for ease of entry). (Yes, it has ASCII alternatives, see https://github.com/iheartla/iheartla/wiki/Keywords-And-Speci..., but is clearly aiming for you to use the Unicode.)
(I make no comment about I Heart LA beyond this. I am only criticising the mention of Markdown, nothing else.)
It is fairly easy to type if you have configured a Compose key. Usually this can be done system-wide, but Vim for example also supports digraphs, which work similarly. For example Ctrl+K (- gives you ∈, Ctrl+K +Z gives you ∑, Ctrl+K In gives you ∫, Ctrl+K 00 gives you ∞, and so on. You can freely redefine the digraphs to suit your choice of mnemonics. I’m sure Emacs has something similar.
Learning the Compose or digraph key sequences is not much different from learning LaTeX commands. The trade-off is that you can’t infer from the result how it was typed, but in return it is more readable and more compact.
In my opinion, use of such Unicode characters should become more common, because the general method of how to type them is not difficult to learn. It would be nice if operating systems had it preconfigured — maybe we’ll get to that state someday. We have to start somehow.
In any case, I applaud the language for taking that approach.
One of them on macOS is dragging-and-dropping a Text Substitutions.plist (in the extras/ folder on GitHub) into the substitutions panel in System Preferences.
I also found it confusing, just trying to see why they would internally say markdown and it would make it out to a post.
Our follow-up project HeartDown (linked) explores embedding I Heart LA in markdown documents.
[0] https://en.wikipedia.org/wiki/Lightweight_markup_language
(Submitted title was "Compilable Markdown for Linear Algebra")
I would say that this is false.
> The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible.[1]
E.g. indented code blocks are nice to read (and you don’t have to think about escaping) but fenced code blocks are easier to type.
Symbols that map directly to the domain seems like a readability win to me.
[1] https://daringfireball.net/projects/markdown/
That's possible albeit limited.
but, as mentioned, due to element access the inverse (x[1,2]) cannot work. Neither can multiply variables that way.Another thing I find confusing are the braces around ℤ × ℤ. They seem to be unnecessary (it wouldn’t make much sense for ∈ to have higher precedence than ×), and/or would imply a singleton set containing the set ℤ × ℤ as its only element.
We do support the Unicode ⎡|⎦ symbols for matrices. The grammar is that a matrix starts with either [ or ⎡ and ends with either ] or ⎦. Rows can be optionally surrounded by |. I find this too cumbersome to use myself.
It would be useful if there was something like a help button in the IDE that opened this table in a modal, rather than just a link.
[1]: https://github.com/iheartla/iheartla/wiki/Keywords-And-Speci...
[2]: https://iheartla.github.io/iheartla/
When I bring up the context menu for the compiled result on <https://iheartla.github.io/iheartla/>, my preferred renderer MathML is missing. I noticed right away that something is wrong because the result objectively looks bad, the bracket parts are of differing width, various surrounding elements do not align with the contained content, and also the text has terrible kerning. <https://files.catbox.moe/wp2r0t.webp>
Compare with e.g. <https://codimd.web.cern.ch/features#MathJax> which has much more options to choose from as renderer and its output as MathML is exceedingly pleasing to look at.
[0]: https://docs.mathjax.org/en/latest/output/mathml.html
For normal text my new hope is Djot, a lighweight markup language by the creator of Pandoc.
I for one would love to see us evolving past ASCII