3 ms·
The use case is right there in the text: > enabling unmodified programs expecting a Unix-like environment to run directly in the browser The latex example is
by jjguy 10y ago
The use case is right there in the text:
> enabling unmodified programs expecting a Unix-like environment to run directly in the browser
The latex example is probably the best example. There are a handful of latex typesetter web pages, but the "quick and dirty" implementation for all of them are something like:
(1) take the input
(2) shell out to run the latex app on a unix box
(3) return the output to the user via the browser
Step (2) requires a complete unix environment. As usage scales, so too does the processing power required. Imagine if that app got 10k requests/second: suddenly you have a farm of "rendering servers" and middleware managing availability, request routing, etc.
This allows you to offload step (2) to the user's browser for a broader range of applications, with easier/faster/less rewriting. While the upfront cost is still more complex if you have to port the app to this js platform, there may be long term savings in simplicity/efficiency from the reduced server requirements. e.g., you could reduce the latex typesetting webapp to static files served from S3.
- jonathanpoulter 10y agoThis is exactly what I was thinking, the most advanced LaTeX typesetter is probably mathjax, but it can't and probably won't [1] handle full LaTeX. Just consider this pretty simple LaTeX, \begin{align} x &= 2^2 \intertext{so we can simplify} &= 4 \end{align} With a little bit of fanciness (sourcing the .sty sheets) behind the scenes, this could faithfully reproduce LaTeX. [1] https://github.com/mathjax/MathJax/issues/736 https://github.com/mathjax/MathJax/issues/736 Edit: formatting