News for hackers. Stuff that matters.
Re:Falsehoods programmers believe about build systems (2012) by amelius on Saturday July 18, 2020 @04:11PM (#23884438)
> A LaTeX document with a table of contents and an index has a cyclic dependency

One of the uglier problems of LaTeX, which people of the likes of Leslie Lamport and Donald Knuth should have been able to solve, one might think.

Re:Falsehoods programmers believe about build systems (2012) by CJefferson on Saturday July 18, 2020 @04:19PM (#23884503)
I think this is an impossible problem to fix -- inserting page numbers into a document can change formatting enough to cause things to move to a different page.

There are LaTeX documents which never reach a fixed point (I've made one by accident exactly once), and need slight adjustment.

Re:Falsehoods programmers believe about build systems (2012) by amelius on Saturday July 18, 2020 @05:10PM (#23884886)
Then "iteratively computing a fixed point by simply rerunning the formatter from scratch" is not a solution to the problem.

Actually I think you can do it iteratively by never decreasing the space occupied by an element between iterations. Of course this might yield ugly results but at least it halts with a solution.

Re:Falsehoods programmers believe about build systems (2012) by yongjik on Saturday July 18, 2020 @04:57PM (#23884792)
When Knuth was writing TeX, computer systems had really small memories - I'm sure it strongly affected TeX's architecture, because TeX reads the source document and generates output pages one by one, like some kind of online streaming processor. It never holds the entire document in memory, because old computers couldn't do it.
Re:Falsehoods programmers believe about build systems (2012) by pantaloony on Saturday July 18, 2020 @05:34PM (#23885041)
Seems reasonable to me. One of the first things I’d reach for if I wanted to build a flexible tool that’d perform well, last, and be broadly useful is the ability to chop up the workload, ideally into a fixed size, but into some practically-by-convention-probably-not-too-big size as a (riskier) fallback if fixed size wasn’t practical.

IME any time you need performance & stability with unknown input, it’s gonna end up looking like streaming.