←back to thread

137 points steventhedev | 6 comments | | HN request time: 0.658s | source | bottom
1. frumplestlatz ◴[] No.43747564[source]
Using a “core dump” (dumping the webassembly heap) is an interesting optimization approach with historical precedent both in TeX itself and projects like Emacs (dump/unexec) — https://www.gnu.org/software/emacs/manual/html_node/elisp/Bu...

It’s also notoriously fragile and non-portable on native targets; I’m curious how one implements it under webassembly, and how it compares.

replies(2): >>43747964 #>>43750785 #
2. drfuchs ◴[] No.43747964[source]
Being able to start a process, have it run for a bit to, say, read in initialization data, populating dynamic data structures along the way, and then interrupt the process and save the whole state as a new executable, was a feature built into DEC’s Tops10 and Tops20 operating systems / standard runtimes, along with related custom systems like Waits, under which TeX was developed. It took just two lines of code for TeX to implement its side of this feature on those first platforms.

It came as a bit of a shock at the time that all the Unix-y systems had no such native concept, and that fragile, non-portable user-space schemes were required to mimic this functionality.

replies(2): >>43750424 #>>43750746 #
3. vdm ◴[] No.43750424[source]
Checkpoint/Restore In Userspace https://criu.org/
4. kisonecat ◴[] No.43750746[source]
Resurrecting this workflow was one of the funniest things in implementing TikZJax.
5. kisonecat ◴[] No.43750785[source]
Author of TikZJax here...

I'm endlessly distracted by other things at work, but I believe this same idea could also be used to provide real-time compilation of TeX'd documents as they're typed. Simon Rubinstein-Salzedo had suggested wanting something like a real-time Overleaf to teach his classes at https://eulercircle.com/ Interrupting and resurrecting the TeX-in-the-browser would let you render a document as it is typed.

replies(1): >>43800152 #
6. svat ◴[] No.43800152[source]
See also (if you haven't already) SwiftLaTeX ( https://www.swiftlatex.com/ https://github.com/SwiftLaTeX ) and their paper (DOI: 10.1145/3209280.3209522 ).