HNHacker News
TopNewBestAskShowJobs

mk12

490 karma · joined March 1, 2019

submissionscomments
mk12··on The fastest math typesetting library for the web
Oh interesting, I didn't realize that. I will try to look into that sometime (or would accept a patch if anyone else wants to).
mk12··on The fastest math typesetting library for the web
It says it in Section 9 of the default example loaded in the playground: https://latex.js.org/playground.html
mk12··on The fastest math typesetting library for the web
Thanks. I hadn't heard of latex.js before, but I just looked it up now, and it says "Math is type­set us­ing Ka­TeX."
mk12··on The fastest math typesetting library for the web
You can compare MathJax, KaTeX, and your browser's MathML support with this website I made: https://mk12.github.io/web-math-demo/
mk12··on Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?
Shameless plug for my plugin https://github.com/mk12/fish-fzf:

> Unlike the others, this plugin tries to pack as much as possible into a single "do what I mean" shortcut. Edit a file? cd to a directory? Just insert it into the command line? Many things like this can be determined from context.

mk12··on Show HN: Xq – command-line XML and HTML beautifier and content extractor
htmlq does that.
mk12··on Layoffs at Canadian tech startups
You're talking to Tobi.
mk12··on Show HN: I made a web-based notepad with a built in unit calculator
I've never used Soulver, but there is a free web app https://numbr.dev that seems very similar to it.
mk12··on Fish Shell 3.5.0
Have you tried it recently? It's gotten a lot better. The following commands used to not work, but now they all do:

    true && echo hi
    false || echo hi
    export VAR=1
    VAR=1 somecommand
    echo "$(echo substitution)"
mk12··on You need to know what right-half-plane zeros are
That's with no rider on the bike. Earlier in the video when he attempts to turn with the device that prevents countersteering, he falls off every time. It seems unlikely that 50M cyclists could easily do this but he could not.
mk12··on You need to know what right-half-plane zeros are
I'm curious how you're so confident about this. I think if you ask most people (even most cyclists) what happens when you turn the handlebars to the right, they'd say you turn to the right. I cycle almost every day and I thought this for a long time. Have you actually tried it? When I tried it, I found that it forces me into a left turn.
mk12··on Happy 10th Birthday Compiler Explorer
Congratulations! Compiler Explorer has been immensely useful to me over the years. I often use it to reassure myself that simple code optimizes as expected (so manual optimization would not just be premature, but pointless). It inspired me to build a similar tool at work for FIDL: https://fuchsia.googlesource.com/fidlbolt/+/refs/heads/main. I believe your last name has become a noun too — I sometimes forget it’s called Compiler Explorer since everyone I know just calls it Godbolt.
mk12··on Render mathematical expressions in Markdown On GitHub
I wouldn’t recommend relying on Safari MathML rendering today for anything but very basic equations. Firefox is a lot better, but still not quite at MathJax quality. I made a demo here https://mk12.github.io/web-math-demo/ that lets you compare them. Also if you edit the MathML markup box, it will render directly from that, just like the poly fill (sometimes the layout shifts slightly when switching from TeX -> MathJax HTML+CSS to TeX -> MathML -> MathJax HTML+CSS).
mk12··on Render mathematical expressions in Markdown On GitHub
Sorry I posted the wrong issue, it’s actually a duplicate of https://github.com/KaTeX/KaTeX/issues/3168 which was filed last August. I guess it’s not that long, but it was annoying for my use of KaTeX on https://mitchellkember.com/notes4u where I see it frequently. For example it affects \left\lvert\vec{b}\right\rvert which is a pretty simple piece of TeX I’d expect to render fine.
mk12··on Render mathematical expressions in Markdown On GitHub
I used to think KaTeX was far superior to MathJax but now I'm not so sure. I made https://mk12.github.io/web-math-demo/ to compare them and other things. They're definitely superior to browser MathML rendering today, which is nonexistent in Chrome (though see https://mathml.igalia.com/), quite bad in Safari, and OK in Firefox. It's true pre-rendering KaTeX produces a lot of markup, but it compresses very well so I don't think it's a big deal. They both have MathML for accessibility, but MathJax is more flexible in letting the user right-click and change the rendering engine, view raw TeX, etc. Rendering KaTeX on the client side is faster than MathJax, but in my experience KaTeX is slightly worse quality, e.g. https://github.com/KaTeX/KaTeX/issues/3400 has gone unfixed for a long time.
mk12··on Current MFA fatigue attack campaign targeting Microsoft Office 365 users
Skip OTP, give us FIDO2/Webauthn for everything. OTP is vulnerable to phishing.

I was pleasantly surprised when both Bank of America and Vanguard leapfrogged from SMS MFA to security keys. I bought 3 and started using them for every service that allows me to. Even better are services (e.g. Bitwarden, GitHub) that don't restrict to security keys, then MacBook Pro and iPhone Touch ID can be registered as well.

mk12··on The case for and against analogies
See also his book on this subject (with Emmanuel Sander), Surfaces and Essences: Analogy as the Fuel and Fire of Thinking. I'm currently reading it and enjoying it. A lot of reviews complain about how padded with examples it is, but this is really the substance of the book and I appreciate it.
mk12··on Theoretical Computer Science Cheat Sheet [pdf]
Some textbooks use set membership notation instead: f(x) ∈ O(g(x)). This makes sense if you think of O(g(x)) as the set of all functions with that upper bound. However, the (abuse of) equality notation is often more convenient. For example, f(x) = x^2 + O(x) reads “f(x) is x^2 plus (something bounded by) a linear term”. Writing f(x) = x^2 + g(x) where g(x) ∈ O(x) is more of a hassle.
mk12··on Svgbob – Create a graphical representation of text diagrams
This tool is great. I used it for diagrams[1][2] in my SICP project after trying lots of alternatives. It was the only one that allowed me to reach my goal of having pristine source that stands on its own, but also renders to a nice web page. I also use svgo and do some custom post-processing[3] to simplify the output.

[1] https://mk12.github.io/sicp/text/2/2.html#2.2.1 (generated from https://github.com/mk12/sicp/blob/master/notes/text.md#221-r...)

[2] https://mk12.github.io/sicp/exercise/2/2.html#ex2.42 (generated from https://github.com/mk12/sicp/blob/master/src/sicp/chapter-2....)

[3] https://github.com/mk12/sicp/blob/master/notes/pandoc/render...

mk12··on Show HN: Westminster Chimes Using Launchd
I was wondering if I could make my Echo Dot chime like a clock. Turns out it can't, so I wrote a script to do it on my Mac instead. In the process I learned about Westminster quarters, MIDI, and launchd.

It's not perfect but it's kind of fun to mark the passage of time. I might spend some more time improving it (override volume/output device, restrict to certain hours, control interaction with other audio, etc.).

← PreviousPage 4 of 4