Live data from Hacker News

Rewriting LaTeX in Pure Rust

github.com

111–120 of 148 posts

Re: Rewriting LaTeX in Pure Rust

#111
post #97

Earlier quoted context omitted.

I don’t like Word but it does accept Latex math and is easy to use.

Word does not use plain text input, and its output looks objectively terrible compared to LaTeX. These two things make it completely inadequate as a competitor.

You've been able to use plain text input for equations since Word 2007 at least: https://www.wikihow.com/Insert-Equations-in-Microsoft-Word

Re: Rewriting LaTeX in Pure Rust

#112
post #48

Personally, I think this approach -- which as far as the engine is concerned looks like a largely-automated "translation" of xetex from C/C++ to Rust -- is misguided. The xetex code is a byzantine tangle of disparate pieces that evolved over the course of a number of years and several changes of direction; it originally started as a personal tool to address one individual's use case for a "Unicode-capable TeX", and g…

I absolutely agree, but would go even further. When you say Xetex "not a solid piece of engineering on which to build the future", I think the same thing also applies to the original Tex engine written by Knuth. By modern software engineering standards, the original Tex implementation is a nightmare . It's enormously difficult to extend or add new features, and this has resulted in (1) comparatively few extensions be…

Oddly, I disagree with this take. TeX stands as a ridiculously stable codebase. Something that is not valued by near anyone in industry today. Such that the things we think make good engineering are standing on empirically weak arguments.

Now, aesthetically I absolutely agree. It is an ugly language by most standards. But, if folks tried more extension and less porting to a new language, I'd wager they could get far. Instead, we seem to mainly get attempts at trying an extension by first establishing a new base language. Every time.

Re: Rewriting LaTeX in Pure Rust

#114
post #97

Earlier quoted context omitted.

Word does not use plain text input, and its output looks objectively terrible compared to LaTeX. These two things make it completely inadequate as a competitor.

You've been able to use plain text input for equations since Word 2007 at least: https://www.wikihow.com/Insert-Equations-in-Microsoft-Word

That's kinda like saying that anything typed on a keyboard is plain text. I'm referring to the document source code.

Re: Rewriting LaTeX in Pure Rust

#115

Earlier quoted context omitted.

The reason is that the main project is written in C whereas this fork uses Rust instead as explained in https://github.com/tectonic-typesetting/tectonic/issues/459

How much of that is auto-generated and pre-existing C code though? My dusty recollection from a while ago is that most of Tectonic's development is in Rust. It looks like the fork is trying to get rid of all the remaining C code?

Here is the percentages of different languages in the original tectonic repo: C: 80.5%, TeX: 7.8%, Rust 7.5%, C++ 4.0%, Other 0.2%

And here is the forked version: Rust 85.2%, TeX 7.3%, C 6.2%, C++ 1.2%, Shell 0.1%

So, looks like %80 more rust in this one (auto-generated and refactored)

Re: Rewriting LaTeX in Pure Rust

#116

This “x implemented in y” is a curious thing we are seeing with growing frequency nowadays (imo). On the one hand, good for these folks, to be rewriting something old in a new way (be it language, library, or framework). On the other hand, could this be an indicator that we’ve reached a certain level where it is easier to rehash the ideas of the past than create new work or invent new ideas or applications? Maybe som…

What’s next is obviously JS or even WASM to typeset on the client side! /s

That should be fairly easy in Rust.

Re: Rewriting LaTeX in Pure Rust

#117
post #24

Previous discussion: 1 year ago: https://news.ycombinator.com/item?id=21172964 3.5 years ago: https://news.ycombinator.com/item?id=14450448 The project seems pretty active, though, so some of that may now be irrelevant.

Why it may be irrelevant that the project is active? Not sure I understood the point behind your last sentence. Can you explain please?

Please do not downvote questions like this (the comment is faded out as I'm writing this). It's a genuine question from a new user, possibly a non-native English speaker, trying to understand someone's comment.

Re: Rewriting LaTeX in Pure Rust

#118
post #112

Earlier quoted context omitted.

I absolutely agree, but would go even further. When you say Xetex "not a solid piece of engineering on which to build the future", I think the same thing also applies to the original Tex engine written by Knuth. By modern software engineering standards, the original Tex implementation is a nightmare . It's enormously difficult to extend or add new features, and this has resulted in (1) comparatively few extensions be…

Oddly, I disagree with this take. TeX stands as a ridiculously stable codebase. Something that is not valued by near anyone in industry today. Such that the things we think make good engineering are standing on empirically weak arguments. Now, aesthetically I absolutely agree. It is an ugly language by most standards. But, if folks tried more extension and less porting to a new language, I'd wager they could get far.…

> But, if folks tried more extension and less porting to a new language, I'd wager they could get far.

This is what happens - pdfTex, Xetex, Luatex: these are all extensions of the core Tex implementation. The problem is that making these extensions is extraordinarily difficult given the software architecture of Tex. And, notoriously, sharing improvements between extensions is also very very difficult. The end result is that we have compatibility few improvements and complete stagnation is some aspects in the typesetting space (for example, no alternative/improvement to Tex's pagination algorithm).

The problem is that Tex is architected as a monolithic application which you can't easily plug extra stuff into. All of the extensions to Tex have worked by forking the source code entirely, which I think is not a great model.

Re: Rewriting LaTeX in Pure Rust

#119

I'm not sure rewriting Latex in XYZ is a good idea. The whole thing is a mess and a pain to use (and I use it multiple times a week). Sure the documents often look good, but when they don't or there is an error, fixing it just becomes a nightmare. I wish somebody would design a modern typesetting system that would accept say latex equations but without 50 years of cruft and levels of macroses upon macroses.

People have tried. I knew someone who did a term paper on typesetting systems - wish I could find it - and the conclusion was basically "TeX sucks in a lot of ways, but the attempted replacements have always been worse." Knuth actually got a lot of things right and hence TeX's staying power.

So it's the academic scholar's equivalent of CMake?

Re: Rewriting LaTeX in Pure Rust

#120

This “x implemented in y” is a curious thing we are seeing with growing frequency nowadays (imo). On the one hand, good for these folks, to be rewriting something old in a new way (be it language, library, or framework). On the other hand, could this be an indicator that we’ve reached a certain level where it is easier to rehash the ideas of the past than create new work or invent new ideas or applications? Maybe som…

The best way to learn a language is to port an existing tool to that language. Whether the rewrite is better depends on how you measure 'better', but what's certain is that someone gets to put 'I know Rust' on their CV.
Post reply on HN