Suggestion: math formatting on the OGF

I think it could be great if we could enable the Discourse Math plugin for this forum so we could have MathJax and ASCIIMath support and type things like

% lfloor (n + 2*7) / 5 rfloor % to get image
or
$ \lceil\, \lg(n) \cdot C \,\rceil $ to get image .

11 Likes

Only if we have a new math category at the same time.

(Joking)

2 Likes

I guess the downside is potentially slower discourse page load speed (as mentioned in that thread).

Are there any other reasons why this isn’t just turned on by default?

MathJax shouldn’t slow down loading speed of pages that don’t use mathematics notation, as it is only triggered after the page has loaded and replaces formulas at that point. At least, that’s how it’s supposed to be implemented, afaik.

3 Likes

It would be nice to have the option, but I think in these cases the math notation loses more in readability than it gains. Especially the ceiling and floor symbols are more arcane in it, obscuring the fact that it’s just a function you’re applying to some result, nothing more complicated than that

It also loses a lot because it doesn’t show in dark mode and the typeface is different and the font size is different and the space between glyphs is huge compared to the containing text

2 Likes

My screenshots won’t do dark mode of course, but the actual MathJax renders real characters that follow the theme.

One very slight risk is that someone might trigger it unexpectedly by typing a few $ or % signs. It is smart enough to filter out the cases where it’s just like $5.95 or 95%.

5 Likes

I poked around following the links, I think it is non-trivial to add this, so only anoek can do it.

I’m not convinced it’s even worth distracting someone for a non-trivial effort to achieve this TBH. How often do we talk about math, really? (So I didn’t @ anoek :wink: )

2 Likes

I feel like this forum definitely talks about math significantly more per capita than the population

5 Likes

Hah that’s for sure :slight_smile: I think we talk about any rational topic more per capita than the population :wink: I’m still not convinced we’d want to interrupt any other thing that anoek is doing to achieve this, but you could always @ him yourself if you disagree :slight_smile:

2 Likes

I mean, I’ve already gone on record here as saying that I think the code formatting is already sufficient, so I’ll pass

2 Likes

Judging by what I’ve seen so far as a professional lurker, OGF is 49% linguistics, 49% math, 2% miscellaneous. Probably best to drop all Go content and immediately implement full LaTeX and IPA support.

10 Likes

I’d say 25% linguistics, 25% maths, 49% linguistic or mathematical pedantry and 1% miscellaneous…

6 Likes

I just have to say that I really dislike omitting the “o” in “log”.

Here are my general preferences regarding typesetting logarithms:

  • When the base is clear from context, or if it doesn’t matter, I prefer writing just log.
  • When the natural logarithm is specifically intended, I prefer writing ln.
  • When some other base needs to be specified, I prefer writing logb, where b is the base.
3 Likes

Why use 2 characters when one will suffice? :wood:

6 Likes

I agree with this, except that I add lg(n) to the list for log base two. This is a convention used in The Art of Computer Programming by Donald Knuth, and I think it is far too useful to not use

1 Like

Of course a plugin for entering go diagrams would be a lot more useful!

But who knows, maybe he’ll be updating the server at some point and and searching the forum for things the community is interested in. So I thought it would be fun to at least open the topic for discussion.

Plus now we have a natural place to debate things like lg vs log vs ln. Personally I like plain old log for base e.

4 Likes

Well, I’m all for reducing implicit decimal bias, though personally I like the look of ln too much to give it up

1 Like

There have been at least a handful of times where I would have liked to be able to typeset mathematics.

I think the exact opposite.

I guess it depends on whether one works more with mathematics or with programming which reads more easily.

5 Likes

On the topic of forum plug-ins, I would like to take this moment to plug the Reaction plug-in :heart::laughing::open_mouth::cry::angry::thumbsup::thumbsdown:

8 Likes

lg is ambiguous notation that requires further clarification, since it has been used inconsistently across the boarder literature. lg as the binary logarithm seems to be popular across computer science literature, but lg as the base-10 logarithm is quite common in mathematics literature (particularly German and Russian literature, where this is the standard meaning). In fact, there are international standards (ISO 31-11 and ISO 80000-2) and a German national standard (DIN 1302) that define the abbreviation lg to mean the base-10 logarithm. Of course, NIST also recommends following the ISO standards (see https://physics.nist.gov/cuu/pdf/sp811.pdf).

Sources:

It’s especially satisfying when it is both linguistic and mathematical pedantry at the same.

I just have to do my part to help keep these ratios up…

3 Likes