"Hurray, I'd love to hear more about every single software written in the past 70 years compiled to LLVM bytecode and then translated with Emscripten to JavaScript!" I would hardly call this porting something. EDIT: I just remembered I ported Microsoft Word to Linux by running it inside a Windows VM.
I ported LaTeX to Javascript
31–40 of 73 posts
Re: I ported LaTeX to Javascript
#32"Hurray, I'd love to hear more about every single software written in the past 70 years compiled to LLVM bytecode and then translated with Emscripten to JavaScript!" I would hardly call this porting something. EDIT: I just remembered I ported Microsoft Word to Linux by running it inside a Windows VM.
That seems excessively cynical to give someone who is sharing something they're obviously quite proud of.
Re: I ported LaTeX to Javascript
#33Nice, but this constantly crashes Safari when the content goes below the fold. The whole page goes white and then the browser dies.
Sad to hear that. I don't use Safari, but maybe it cannot compete with the JS engines of Firefox and Chrome's version of the Webkit engine. This script reqiures a lot of computation in JS and communication between the website and the webworker (~300kb). Maybe Safari is unable to cope with this in a decent amount of time.
Re: I ported LaTeX to Javascript
#34Earlier quoted context omitted.
Sad to hear that. I don't use Safari, but maybe it cannot compete with the JS engines of Firefox and Chrome's version of the Webkit engine. This script reqiures a lot of computation in JS and communication between the website and the webworker (~300kb). Maybe Safari is unable to cope with this in a decent amount of time.
I've seen emscripten-generated JS crash Safari before. It's not a performance issue; jsc is plenty fast and beats SpiderMonkey in most benchmarks. However, emscripten seems to exercise certain corners of JS that pose stability problems for jsc.
Or even just a bug report at bugs.webkit.org
Thanks :)
Re: I ported LaTeX to Javascript
#35Earlier quoted context omitted.
That seems excessively cynical to give someone who is sharing something they're obviously quite proud of.
I don't mean to offend, but I still fail to understand the excitement around this.
Re: I ported LaTeX to Javascript
#36"Hurray, I'd love to hear more about every single software written in the past 70 years compiled to LLVM bytecode and then translated with Emscripten to JavaScript!" I would hardly call this porting something. EDIT: I just remembered I ported Microsoft Word to Linux by running it inside a Windows VM.
That analogy is not correct. He isn't running existing binaries in an emulator. He cross-compiled code to a new platform, using a new compiler and toolchain, and made sure everything worked in the entirely new environment. And as he mentions in a comment, he found, reported and fixed some bugs in the compiler and toolchain while doing so.
And remember that the web platform is different than a normal desktop environment. You can't just compile code and expect it to run perfectly (it often does for small apps, but larger ones generally no), for example, the main loop has special requirements, threading as well, etc. It's the same as porting a Windows game to the iPhone, for example - there are different APIs, different expectations of how the OS works and what it allows you to do, etc. Such ports take work.
So your dismissal of his work is very unfair.
Re: I ported LaTeX to Javascript
#37Re: I ported LaTeX to Javascript
#38The first package supported is geometry. If you want to add another, append the required files to the supported_packages array.
This is what it looks like for the geometry package: https://github.com/manuels/texlive.js/blob/master/website/ma...
Re: I ported LaTeX to Javascript
#39The projects fill somewhat different niches, however. MathJax's ideal use case is adding math support to a CMS like a blog or wiki. This project looks like it's better for offering a Web-based LaTeX-to-PDF compilation service for articles with 100% compatibility with the original implementation.
Also, this project is a great resume-builder if the author is looking for a job that involves wrangling build systems or cross-compiling to JavaScript!
Re: I ported LaTeX to Javascript
#40Earlier quoted context omitted.
I've seen emscripten-generated JS crash Safari before. It's not a performance issue; jsc is plenty fast and beats SpiderMonkey in most benchmarks. However, emscripten seems to exercise certain corners of JS that pose stability problems for jsc.
Anyone want to test a webkit nightly? I don't have a desktop machine handy tight now to test on :( Or even just a bug report at bugs.webkit.org Thanks :)
1. Hitting "Compile" does whatever it should do successfully. 2. Then hitting "Open PDF" opens a new tab which stalls out and crashes
I would almost say its actually a PDF thing that is crashing Safari vs a JS thing.
At least, that's what has happened consistently on my machine with latest Safari and WebKit nightly.
Edit: However, taking the generated PDF from Chrome and dropping it into Safari loads it fine, so maybe it is a JS thing.
Edit 2: Upon further inspection it appears the new tab is being opened with just a data URL representing the entire PDF. It wouldn't surprise me if that's the problem (Safari not being able to handle huge data as a URL). I recall running into a similar crash in MobileSafari because of that a while ago.