xymostech

Joined 15 years ago

Karma
677
Submissions
151
Member since
Nov 12
Genentech dev, former Academia.edu, Spring Discovery, Cricket Health, and Khan Academy. Co-creator of KaTeX https://khan.github.io/KaTeX/ and Aphrodite https://github.com/khan/aphrodite

https://github.com/xymostech

[ my public key: https://keybase.io/xymostech; my proof: https://keybase.io/xymostech/sigs/X4gWdG2AX9mYlklCEZ3Ox4wIwt_NHwxru4b1py5pwrw ]

View on Hacker News

Recent submissions

Comment · 6 months ago
Are you viewing on a HiDPI monitor? I imagine this is mostly because RaTeX renders to an image whereas KaTeX is rendering HTML, so can scale to arbitrary dpi. I imagine the RaTeX people could have rendered to a higher resolution and it would look better.
Comment · 6 months ago
What are you struggling with? If you want an image output, there a reason you want to use KaTeX for this, and can't just use actual LaTeX?

KaTeX depends on the browser engine to do most of the layout, so generating an image would require a tool which converts the HTML nodes back into an image. There are some tools that can do that (like html2canvas), but using LaTeX to generate a PDF and then converting that to an image is probably going to be easier.

Comment · 2 years ago
Oh yes, thank you for the link to that! Looks like that is an instruction set for representing the font glyphs themselves? I was talking about the instruction set in TFM which is for representing meta information, like ligatures and kerning between glyphs, and not for the actual glyphs. The glpyhs for the original TeX fonts are described using Metafont which is an interpreted language.
Comment · 2 years ago
Comment · 2 years ago
My source was also the Lawful Masses stream, but it sounded like the original excuse was made in April, but it took until November for him to actually produce the death certificate to prove that he had lied about when his grandfather had died.
Comment · 2 years ago
2 days ago (12/27), "Web Hosting Service" was the most common page visited, with <0.1% mobile (compared to >70% for the rest of the top 10). Did something happen that would cause this? Or is this a bot farm that's visiting wikipedia? Odd.

Edit: Looks like there were also around 3m "automated" views to the page based on user agent. Maybe some bot script went awry but used non-bot user agents half the time?

Comment · 5 years ago
I think by "each system call" she meant it like "every time it calls read()", since it would be read() that was using the AVX registers. Since the example program just calls read() over and over, this could add a significant amount of overhead.
Comment · 7 years ago
Comment · 7 years ago
This was such a wonderful read! I've been getting into Rust recently, and the sections on dealing with challenges that are specific to Rust were particularly useful. The way they created a new trait to turn `Fn(&str) -> Result<(&str, T), &str>` into `Parser<T>` was insightful, and the discussion of how they dealt with the growing sizes of types was something that I can imagine myself running into in the future.

Most importantly though, when they started writing `and_then`, my eyes lit up and I said "It's a Monad!" I think this is the first time I've really identified a Monad out in the wild, so I enjoyed that immensely.

Comment · 9 years ago
Comment · 9 years ago
Comment · 10 years ago
Comment · 12 years ago
Woah, awesome. I've used the http://dnstunnel.de/ tunneling scripts before, and they're a bit of a pain to setup (mostly because of the perl library requirements).
Comment · 12 years ago
There's no real "secret sauce", it's mostly just "do things smart". For example, while MathJax tends to do a bunch of calculations about exact positions of where different characters should go, KaTeX manages to get away with offloading most of that into the CSS, so the native CSS renderer can handle it.

MathJax also does strange things involving inserting elements into the DOM to look at metrics that it uses in its calculations, then removing them, which takes a lot of time. We make sure that the same input is rendered the same every time, and try to make sure it looks good everywhere (there are a couple cases where we aren't the best at this, mostly because browser font rendering isn't great).

We also support less environments than MathJax, for example we only support HTML+CSS output (for now, though MathML is in the works for accessibility reasons), whereas MathJax supports HTML+CSS, SVG, MathML, and older browsers like IE 6. This means it can't rely on things like good CSS rendering like we do. It's a worthwhile tradeoff for us, because we can make ours so much faster, but it is a tradeoff.

Comment · 12 years ago
Hey! We're planning on adding environments (everything that uses \begin and \end) sometime soon. There's a couple github issues touching on this point; if you want to know how development's going, you can follow one of the issues.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton