-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Roff support / Add RUNOFF to recognised languages #3126
Conversation
Good stuff! Suggestion: Also add a new Roff langauge, and make Groff group under that. This would ease a possible future rename as mentioned in #2382. |
Well... no. See, Groff IS Roff, it's just misnamed. "Groff" is an abbreviation of "GNU Troff", referring to the GPL-licensed implementation of the proprietary AT&T Troff. The name "Troff" is often used interchangeably with "roff" too, which does nothing to ameliorate confusion. "Troff" means "Typesetter Roff". It's the program used at Bell Labs to produce high-quality printed output for manuals and documents. There was a dumbed down version of the interpreter called "Nroff", which was designed to display a limited subset of roff commands suitable for terminal display. Groff tackles both tasks simultaneously, so most users don't even know about the distinction. |
Sorry about the history lesson, but you don't spend four months researching an ancient typesetting language without feeling like a nerd... heh. The only "correct" approach would be to rename |
Groff being Roff was exactly my point. Since we can't rename Groff to Roff (yet), the next best thing may be to add Roff and make Groff group under it. This would have the effect that the language bar displays "Roff" instead of "Groff" |
Yes, me too! I'm not sure if it's a good idea. I don't think there's any precedent. |
I did some forensics to find the origin of those dummy file extension. It seems Parrot only exists to group its two brethren languages together. On the other hand, MiniD was added some time in the stone age without a file extension, supposedly for some legacy reason. Some time later, a requirement was added that all languages must have a primary extension, thus a dummy extension was introduced. It has also been suggested that languages could be added for the sole purpose of being used in a |
Uses better troff formatting. Removes v8 options from the man page. Also edits `node -h` in node.cc slightly. PR-URL: #5497 Reviewed-By: James Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
tm_scope: text.groff | ||
- .tmac | ||
filenames: | ||
- mmn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can it also be .mmn
? In your search results for that filename there seem to be quite a few .mmn
files...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here for instance, but they do not seem to be Roff :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hah! Nope, definitely not. ;)
They all just seem to be dates for some reason. :|
Regarding grouping, if this is to do with a selection presented in a UI then I suspect "troff" is the most common description of the file format, e.g. file(1) uses that. They're all ROFFs in a sense, named after the RUNOFF program, and then Multics' Runoff, but widespread use came with Unix and that had the troff program for typesetting run-off. nroff, new roff, came first on Unix, and then it was modified to support a typesetter when they got the CAT, giving troff. The two programs share a lot of the same source. Folks don't write nroff source, they write troff source, and nroff is just a formatter for limited output devices that can read the same source. Using roff suggests you're talking historical pre-Unix RUNOFF descendants. |
Well, I settled on I'd like to have a better understanding of the exact transition of name. |
Its' a bit of a tangle. RUNOFF came first on CTSS. runoff was the Multics version. roff on Unix by Joe Ossanna existed fairly briefly before he did nroff, new roff, and then that program grew to cope with a typesetter, troff, rather than the TTY-style devices up to then. RUNOFF input looked similar, but definitely different, e.g. https://github.com/bwarken/RUNOFF_historical/blob/master/RUNOFF-files/Kermit/k10mit-136/k10133.rno Calling it roff is fine. I don't know the system you're talking about to really be commenting, just pointing out that someone looking for this in a list would probably check for troff too. There's no need for groff to be mentioned, other than I gather it already is, just as Heirloom troff, and its extensions, don't need to be named either. |
Ah, right. Well, this does affect what name is displayed in the site's advanced search page. If for any reason than being technically correct, I'd stick to |
I ran a few counts on these new filenames and extensions:
|
Well yes, but I did mention the results weren't huge. =) Recall the antiquity of the language we're dealing with, heh. Are you saying the numbers aren't enough? |
@pchaigno I should also mention RUNOFF is still used in OpenVMS systems for their documentation, although they use a mutated variant of it (DIGITAL Standard Runoff). I know nothing of it other than it's developed too far from the original RUNOFF to really be considered the same language (Ralph will probably attest to that). @RalphCorderoy Just wanna say thanks (again) for all your hard work getting this knowledge together, mate. :-) Your repos have been an invaluable source of information, and it's like having a time capsule into the 70s on my computer. I really appreciate having history at my fingertips, especially after all the endless running around I spent prior trying to find concrete info on (Yes, I'm slipping regular expressions into conversation now... I need psychiatric help...) EDIT: |
I tend to think that languages with a long, proven history should have a bit of leeway. But then I have a soft spot for retrocomputing. |
Preserving history, one grammar at a time. <3 |
This PR's doing quite a few things, so I'll try to keep my explanations terse for readability.
Roff
Improved syntax highlighting
Currently, the site uses an absurdly-limited grammar to highlight roff files:
You can probably see what I mean.
Extra extensions
I've added a few extra file extensions for Roff:
.tmac
: Troff macros. Refers to the standard macro bundles distributed with Groff and Troff.mmn
,mmt
: Nroff and Troff macros, respectively.Mostly distributed with the Plan 9 OS, but possibly in other distros too.
Sample licenses
The
.tmac
sample is from GNU Groff, but it's not GPL-licensed.To quote groff_man(7):
I'm not sure about the license of Plan 9, but I'm assuming that is copylefted. Hence the reason I didn't include sample files for
mmn
andmmt
(unless their contents don't count?)RUNOFF
The grandfather of roff, and indeed of all modern typesetting. I've added it primarily to help disambiguate the
.rno
extension, which is also used by some manpages.Considering the antiquity of RUNOFF, it's not surprising the language doesn't command a widespread presence on GitHub. You're looking at something developed in the early 1960s... that's even older than the moon landing. However, at least two extensions see modest (albeit limited) distribution:
.rno
(980 results).rnh
(574 results)RUNOFF used several other file extensions too, especially
.run
. I've left those out, for obvious reasons. My main motivation is to separate RUNOFF's classification from Roff's. The two languages are only superficially similar.Colour choice
I chose a rusty brown to represent the language, the colour of a bronze typewriter.
Sample licenses / Highlighting preview