4 ms·
Fast Typesetting with Incremental Compilation [pdf]
- bmc7505 4y agohttps://typst.app/ https://typst.app/
- ivansavz 4y ago^ This is the software described in the thesis Very impressive. Both the markup language and the performance.
- PaulHoule 4y agoNot kidding about fast... If I read it right it is less than 2 ms to parse and layout a 20 page document!
- jahewson 4y agoI think you’re reading it wrong. Figure 17 says it’s 2.9 seconds, not milliseconds. Slower than pdfTeX which was 2.2 sec. But their incremental mode is faster at 0.6 sec.
- a9h74j 4y ago> (p.7) This thesis was written in Typst. Looks good. > The Typst language is Turing-complete, dynamically typed, and not macro-based. It provides capabilities for user-defined, possibly variadic functions, variables, arrays, dictionaries (hash maps), and a module system. A Typst file specifies a document that the compiler should set. Typst combines typical markup and scripting/programming elements into a single context-sensitive grammar.
- JadeNB 4y ago> The Typst language is Turing-complete, dynamically typed, and not macro-based. Knuth did a lot right, and some things wrong, when designing with TeX, but I think he has said that he regrets allowing Guy Steele to convince him to make TeX Turing complete, and that makes sense to me. Sometimes I want lots of computing power when typesetting a document, but more often I want to know that I can TeX a document sent to me without worrying that I will be opening myself up to unforeseen exploits. There's a reason that good security involves turning off VBA macros in Office documents from an external source!
- a9h74j 4y agoVery good point. From the website it appears their editing/live-view environment will be browser-based, so that might help.
- tiagod 4y agoSomething being Turing complete doesn't mean much. VBA isn't dangerous because it's Turing complete, it's dangerous because it has APIs that allow it direct access to the host system. You could perfectly well design a system that is not turing complete that would still expose the same kind of vulnerabilities.
- JadeNB 4y ago> Something being Turing complete doesn't mean much. VBA isn't dangerous because it's Turing complete, it's dangerous because it has APIs that allow it direct access to the host system. You could perfectly well design a system that is not turing complete that would still expose the same kind of vulnerabilities. You are right that I was emphasising the wrong part of it, in the sense that Turing completeness and security are partially orthogonal: you can be highly non-Turing complete and totally insecure. But you can not be Turing complete and totally secure (essentially Rice's theorem), and that's the point that I meant to make. My post also may have misrepresented Knuth's concern (sadly, he didn't explain it to me personally, so I don't know). A more practical concern with a Turing-complete markup language, even on an airgapped machine whose security is of less significance, is that you can't guarantee halting, and it doesn't matter how fast your markup language compiles if you feed it a document on which it doesn't halt ….
- zokier 4y ago> But you can not be Turing complete and totally secure (essentially Rice's theorem), and that's the point that I meant to make. What do you mean by "secure" here? > A more practical concern with a Turing-complete markup language, even on an airgapped machine whose security is of less significance, is that you can't guarantee halting, and it doesn't matter how fast your markup language compiles if you feed it a document on which it doesn't halt …. In practice that is less of a problem; you just run the program with some resource limits and timeout, which admittedly turns the system into state machine from pure theoretical viewpoint.
- rustEU 4y agoSounds like a good alternative to Overleaf. I think the future is jupyter style notebooks with formatting and rich text mode. However the developer should look for python interop, at least for the computed expressions part. It would be awesome to generate rich text documents programmatically!
- bradrn 4y agoI find it interesting that, for every page in this PDF which includes an image, that page is rendered as a raster image itself, including the text, which then becomes unselectable (e.g. pages 12, 14, 15). This seems like a pretty severe bug in Typst to me.
- orangepanda 4y agoInteresting. Page 5 also includes an image but text is selectable there.
- bradrn 4y agoI think the diagram on Page 5 is created within Typst itself, rather than being included from elsewhere — note that it’s a vector rather than raster image.
- rustEU 4y agoWorks for me
- bradrn 4y agoWeird… I tried it in Firefox, SumatraPDF and Acrobat Reader, and it worked in none of them for me. (In case you didn’t notice, it’s only specific pages which have the bug, namely those with raster images.)
- codetrotter 4y agoKeep in mind that some PDF readers are able to OCR text in images and thus make even bitmapped text select and copyable. It’s possible that this is why the parent to your comment was able to do so.
- tln 4y agoAgreed, that's not a feature! It's not every page with an image, eg pages 1, 5, 11 are set with text. Interestingly the rasterized text seems to use Windows-style subpixel aliasing with the red and blue fringes on the text.
- kibwen 4y agoThe source code for Typst: https://github.com/typst https://github.com/typst
- chrismorgan 4y agoExcept that Typst itself is not public yet—that’s only a few library pieces so far.
- teleforce 4y agoYeay, a typesetting system that uses familiar programming constructs instead of hard-to-understand macros [1]. [1]Commentary on "Sile: A Modern Rewrite of TeX" https://news.ycombinator.com/item?id=33461930 https://news.ycombinator.com/item?id=33461930