News for hackers. Stuff that matters.
Re:Editing the C Standard by raister on Friday November 13, 2020 @03:14PM (#25086914)
LaTeX is a perfect software, zero defects for YEARS now. Which tool could claim that?
Re:Editing the C Standard by mhh__ on Friday November 13, 2020 @03:20PM (#25086974)
It's also decades old and positively crap if you try and treat it like you would a modern programming language. It's way too difficult a problem to do on a whim but quite a lot of time in academia is just thrown down the pit of LaTeX (be that due to incompetence or the design being older than various principles e.g. DRY)

LaTeX is certainly the best LaTeX, but it doesn't really have that many competitors.

Re:Editing the C Standard by brundolf on Friday November 13, 2020 @04:26PM (#25087710)
What's the reason it doesn't have many competitors? Is it intrinsically too hard of a problem, or is it a matter of network effects (extensions, existing knowledge, existing bodies of work, etc)? Or is there just a lack of motivation?
Re:Editing the C Standard by jcranmer on Friday November 13, 2020 @04:53PM (#25087966)
There's kind of two steps to the process: the composition of text, and then the fine-tuning to make the composed text look neat. These two steps are not so easily divorced from one another, though, especially when you're dealing with multiple rounds of edits, so it doesn't work too well to force these to be separate tools to deal with the task.

There's a lot of competitors to the first step, in the vein of having multiple tools that are plain-text files but convert to rich-text output. However, most of these tools lack good, or even any, support for the fine-tuning capabilities. Where there is competition in the fine-tuning space, the relevant tools are largely based on WYSIWYG editors--which makes sense when you consider that it's easier to fine-tune properties when you get immediate visual feedback on what the fine-tuning you're doing does to the result. But these editors don't provide an easy way to integrate in the workflows of the other tools, since the underlying formats don't really support the fine-tuning capabilities.

Re:Editing the C Standard by mhh__ on Friday November 13, 2020 @04:34PM (#25087764)
Typesetting is hard
Re:Editing the C Standard by brundolf on Friday November 13, 2020 @04:44PM (#25087866)
It's something I'm (probably foolishly) tempted to take a swing at. I have a lot of experience with doing layout in HTML/CSS (of which printable typesetting feels like a subset, superficially at least), and I've been getting into writing parsers/doing language design recently. The only problem is I don't know a ton about LaTeX or how people use it other than "it lets you very precisely format documents via special markup, including things like mathematical formulas and diagrams (?), and it's used by lots of academics".
Re:Editing the C Standard by zzless on Friday November 13, 2020 @05:43PM (#25088450)
I respect your courage but I have to disagree with your assessment of CSS vs real typography. Layout capabilities of CSS are orders of magnitude less extensive compared to those of TeX. For example it is nearly impossible to say, put a box 2/3 of the width of a container of unknown width. Just the simple task of centering an element has pages dedicated to it and to my knowledge, only CSS3 has a reasonably workable solution. As far as LaTeX's abilities as a programming language go, I have an interpreter for a reasonable subset of C written in TeX (it was an academic exercise but this is just to show what is possible). So it is much more than a mere markup language.
Re:Editing the C Standard by brundolf on Saturday November 14, 2020 @11:26AM (#25093250)
> For example it is nearly impossible to say, put a box 2/3 of the width of a container of unknown width. Just the simple task of centering an element has pages dedicated to it and to my knowledge, only CSS3 has a reasonably workable solution.

It's been a few years since you used CSS :) Both of these things are trivial to do now

But to be clear: while I think my CSS experience would give me a grasp of what needs to be expressed and some ideas for how to express it, there is a whole other layer of actually applying that, and reconciling it with the content, which would be a challenge (and is done for you by the browser in CSS' case)

> As far as LaTeX's abilities as a programming language go, I have an interpreter for a reasonable subset of C written in TeX (it was an academic exercise but this is just to show what is possible). So it is much more than a mere markup language.

I believe you, but I also question whether that level of power is actually being used by people making documents with it, or whether it just adds complexity. I genuinely don't know. But those are the kinds of places one might find improvements to be made.

Re:Editing the C Standard by disgruntledphd2 on Saturday November 14, 2020 @05:39AM (#25091426)
If you actually want to do this, then start by reading the TeXBook, by Knuth.

I would love to work on this, but definitely can't commit the time.

Re:Editing the C Standard by zzless on Saturday November 14, 2020 @09:04AM (#25092340)
I would like to second this great advice. A somewhat shorter piece of reading is 'Mathematical typography' by Knuth (published in the Bulletin of the AMS but I believe is freely available online). This article outlines the (enormous) scope of the problem (even before multilanguage typography is considered, or any graphics for that matter).
Re:Editing the C Standard by syntheticnature on Friday November 13, 2020 @03:18PM (#25086953)
You might be thinking of TeX (and even there it requires special definition), LaTeX's issue list is a bit more active: https://github.com/latex3/latex2e/issues
Re:Editing the C Standard by CJefferson on Friday November 13, 2020 @03:30PM (#25087094)
It's full of defects, they'll just never be fixed. Most languges would define the error messages of LaTeX as defects, and once you start including packages, many don't work together.

I never realised how awful LaTeX was until I started working with a co-author who is blind, if you just "write LaTeX" you end up with equations, algorithms and tables constantly half-off the page.

Re:Editing the C Standard by johnday on Friday November 13, 2020 @03:36PM (#25087157)
LaTeX does report this as a problem, of course - the refrain of "overfull hbox" is near universal (and ignoring the warning is just as universal).

Where it fails is in reporting the problem in a meaningful way. This is, of course, very difficult to accomplish, since there is no nice mapping from line-of-TeX to visual error. What's more, any tool which could provide such an error would be so constrained as to be useless for typesetting.

Re:Editing the C Standard by Tomte on Friday November 13, 2020 @03:17PM (#25086944)
That's obviously wrong. You're probably thinking of TeX which is bug-free, due to a combination of (a) Donald Knuth being a genius, (b) extreme scrutiny of the code base (in part because of the reward cheques) and (c) Knuth having defined it as bug-free years ago.
Re:Editing the C Standard by jcranmer on Friday November 13, 2020 @04:12PM (#25087554)
> (c) Knuth having defined it as bug-free years ago.

IIRC, TeX only becomes defined bug-free on Knuth's death. However, it is feature-complete, in the sense that there are no more features to be added, even if such functionality is desperately needed. (Most notably, TeX does have issues with i18n and especially right-to-left text support)

Re:Editing the C Standard by hzhou321 on Friday November 13, 2020 @03:59PM (#25087423)
I agree and I think (c) plays the bigger part for its perfection.