News for hackers. Stuff that matters.
Re:TLDR pages: Simplified, community-driven man pages by ddevault on Wednesday January 22, 2020 @11:14AM (#22118784)
A heartfelt plea:

The man pages are community driven, too. If you think they can be improved, instead of investing in rapidly decaying third-party documentation, please take your improvements upstream. The maintainers would be thrilled to have them.

Re:TLDR pages: Simplified, community-driven man pages by diebeforei485 on Wednesday January 22, 2020 @01:16PM (#22120288)
No, they serve two different purposes.

Man pages are a reference/spec on all options and parameters, aimed at those who already have use a tool/technology/concept.

This is something different. It's a tutorial of how to do the most common things using that tool.

It's a bit like learning a programming language: would you read the formal spec, or would you learn from code examples?

Unless you've read formal specs for other languages with a similar paradigm before, it's way easier to learn from examples first, which gets you to the level of understanding where the formal specs start to make sense.

Improvements to man pages should be made, but not at the cost of beginner-friendly projects.

Re:TLDR pages: Simplified, community-driven man pages by xorcist on Wednesday January 22, 2020 @02:36PM (#22121165)
There's no reason man pages can't be both.

Many man pages contain examples and common usages. See for example the rsync man page, with complete examples of how to backup common file systems.

Re:TLDR pages: Simplified, community-driven man pages by catalogia on Wednesday January 22, 2020 @07:11PM (#22123489)
One of the nice qualities of man pages is comprehensiveness, while one of the nice qualities of tldr docs is succinctness. Both are mutually exclusive; man pages cannot be both.

An examples section in a manpage is a fine idea which I would certainly encourage, but that wouldn't render tldr obsolete.

Re:TLDR pages: Simplified, community-driven man pages by jcl on Thursday January 23, 2020 @12:00AM (#22124992)
Many man pages have examples, but they consistently bury them at the end, after exhaustively covering every flag, file, or environment variable that could possibly affect execution.

It might not be crazy to move the examples section to the top, since it would more quickly provide what most readers are looking for: a sample command line to tweak. Anyone who is genuinely looking for what a particular flag does is just going to search for it anyway, so it doesn't really matter if that flag appears on the 24th screen instead of the 23rd.

Re:TLDR pages: Simplified, community-driven man pages by catalogia on Thursday January 23, 2020 @12:27AM (#22125088)
Something I like about tldr is that tldr pages are short enough to not necessitate using a pager, so you can print the tldr of a command and read it while typing the command in the same terminal emulator.

I know you can disable the pager for man, but the typical manpage is going to be fairly long anyway so the pager is generally desired. I suppose you could pipe man through head to just print out the first section, but honestly tldr seems to fill this niche better than I see that working.

Re:TLDR pages: Simplified, community-driven man pages by jopsen on Thursday January 23, 2020 @03:37AM (#22125889)
But they are not system specific... I don't need `tldr opkg` on my system.

In fact, having pages I don't need just causes confusion.

Moreover, commands can have system specific names.

Re:TLDR pages: Simplified, community-driven man pages by catalogia on Thursday January 23, 2020 @08:21AM (#22127293)
My tldr client has a --platform flag that takes 'linux, osx, sunos, or common'. So there is some support there for platform-specific tldr pages at least.

Also my tdlr-pages checkout is only 19MB, so I'm not too concerned about bloat. I'm not really sure how having tldr's for irrelevant commands would be a problem, maybe with some shell autocompletions? Maybe there is a way you could prune the tldr-pages checkout?

I guess all I can really say is tldr works really well for me and I like it a lot. Nothing is perfect, but tldr is quite nice despite some warts.

Re:TLDR pages: Simplified, community-driven man pages by neckardt on Wednesday January 22, 2020 @08:23PM (#22123953)
Ideally I would like to see an additional section in man pages devoted to examples. The TLDR pages could then be moved into the man pages.
Re:TLDR pages: Simplified, community-driven man pages by killjoywashere on Wednesday January 22, 2020 @09:26PM (#22124281)
tldr didn't choose tar as their front-page demo by accident. The tar manpage is a classic example of the CLI gods apparently going to some effort to design the Examples section to effectively tell new users to bugger the hell off.
Re:TLDR pages: Simplified, community-driven man pages by voltagex_ on Wednesday January 22, 2020 @11:33PM (#22124897)
Re:TLDR pages: Simplified, community-driven man pages by JdeBP on Friday January 24, 2020 @12:40PM (#22140538)
Only to people who erroneously think that there is such a thing as "the" tar manpage. (-:

* https://news.ycombinator.com/item?id=22122279

Re:TLDR pages: Simplified, community-driven man pages by ori_b on Thursday January 23, 2020 @10:01AM (#22128025)
This reads fine to me: https://man.openbsd.org/tar
Re:TLDR pages: Simplified, community-driven man pages by joshklein on Wednesday January 22, 2020 @01:29PM (#22120455)
> they serve two different purposes

I agree, but I'm also painfully aware of man page incompleteness every time I'm on a non-OpenBSD system. I'd be grateful to anyone who chipped away at proper tagging for any GNU software. One should be able to :t to jump to the reference for any flag.

Re:TLDR pages: Simplified, community-driven man pages by beefhash on Wednesday January 22, 2020 @03:01PM (#22121411)
That's impossible by means of how they're written. GNU still cares about operating systems that don't bundle the mdoc macros with their troff processor and don't use mandoc (which is... exactly only AIX and HP-UX at this point), so they write all their text in man so that they render correctly everywhere.

For tagging, the formatting would need to be redone to be mdoc, which breaks both the OSes mentioned above and would be an immensely arduous task at this point. Probably not going to happen.

Note GNU and and the Linux man-pages project are mostly outliers; everyone else that lives in BSD/illumos land has long since moved on to mdoc since like the 80s. See also https://www.usenix.org/system/files/login/articles/141-dzons...

Re:TLDR pages: Simplified, community-driven man pages by anjbe on Thursday January 23, 2020 @01:18AM (#22125287)
> That's impossible by means of how they're written. GNU still cares about operating systems that don't bundle the mdoc macros with their troff processor

Sudo supports such systems even though its manuals are written in mdoc.

The source tarball contains both the original mdoc manuals and man manuals, autogenerated by mandoc (https://mandoc.bsd.lv) which can convert mdoc to man—easy to do, since mdoc is a semantic format.

Then at build time one format or the other will be installed depending on how capable the system manpage formatter is.

Any project using mdoc pages could do the same thing. Projects using autotools could even copy Sudo’s autoconf macros for this.

Re:TLDR pages: Simplified, community-driven man pages by Scarblac on Wednesday January 22, 2020 @01:44PM (#22120590)
It would be quite nice to have that quick tutorial in a new section at the top of man pages, in addition to what's already there.
Re:TLDR pages: Simplified, community-driven man pages by avodonosov on Wednesday January 22, 2020 @03:42PM (#22121786)
I often have this difficulty with man pages. But man page format allows examples, contributing many examples to original man pages would make them more accessible.

Also, a gentle, human oriented intro can be a part of man page I think.

Re:TLDR pages: Simplified, community-driven man pages by Kalq on Wednesday January 22, 2020 @03:50PM (#22121874)
I disagree. Plenty of man pages have very excellent examples that serve as a beginner tutorial. Ones that are just as good (and easy to understand) if not better than what I've seen from TLDR. There's no reason manpages can't be both.
Re:TLDR pages: Simplified, community-driven man pages by SaulOfTheJungle on Wednesday January 22, 2020 @02:10PM (#22120889)
> No, they serve two different purposes.

I don't see why they could not serve both purposes.

Man pages should start with a tldr section followed by the full reference/spec.

Re:TLDR pages: Simplified, community-driven man pages by fhennig on Wednesday January 22, 2020 @02:16PM (#22120961)
Yes, put both things in the man page!

Looking at some examples of tldrs, it mostly boils down to the most common use cases as examples. So well written man pages already have an "examples" section, and that really helps!

Re:TLDR pages: Simplified, community-driven man pages by overcast on Wednesday January 22, 2020 @11:40AM (#22119061)
It seems like the maintainers of man pages just refuse to bother with something so obvious. It's been decades, and man pages are still archaic and not user friendly.
Re:TLDR pages: Simplified, community-driven man pages by JoshTriplett on Wednesday January 22, 2020 @12:23PM (#22119671)
The maintainer of the manpages project, Michael Kerrisk, is quite responsive and interested in improvements. I've generally found the maintainers of other software to be receptive to documentation patches, as well.
Re:TLDR pages: Simplified, community-driven man pages by overcast on Wednesday January 22, 2020 @12:28PM (#22119747)
I'm not sure what this has to do with Kerrisk. Software maintainers just need to simply add examples of using the software they use. They know best how it works, I don't know why this has to be met with so much friction. Like not posting images of your new game/image library. People want examples of stuff.
Re:TLDR pages: Simplified, community-driven man pages by JoshTriplett on Wednesday January 22, 2020 @01:10PM (#22120226)
> I'm not sure what this has to do with Kerrisk

Because the man-pages project that he maintains provides the largest set of third-party manpages (outside the project trees themselves). The majority of manpages live either in the project they document or in the man-pages project.

> I don't know why this has to be met with so much friction.

The point of this thread is that it will often not be met with friction. Examples should be in a combination of the summary and examples sections of the manpages. (Distinct modes of operation belong in the summary, more fine-grained examples go in the examples section.

Re:TLDR pages: Simplified, community-driven man pages by tylerchilds on Wednesday January 22, 2020 @12:42PM (#22119923)
I think the hardest part is that people don't know what others don't know. When you're so close to a project, things that are obvious to you are impossible to new people, but you don't realize how impossible it is until you get that feedback.
Re:TLDR pages: Simplified, community-driven man pages by overcast on Wednesday January 22, 2020 @12:51PM (#22120024)
Just start with the assumption that no one understands how to read a man page and how to translate that into a full command line operation. A simple example goes A LONG WAY.
Re:TLDR pages: Simplified, community-driven man pages by Darkphibre on Wednesday January 22, 2020 @01:12PM (#22120239)
Back in 2000-2005 I worked on the SQL Server documentation.

If I remember correctly, when we instrumented the docs we found that the VAST majority of users skipped over all the descriptions and parameter definitions, and jumped straight to the examples of usage. Turns out observation is the fastest way to learn/remember. We redoubled our efforts to include examples of more obscure usage patterns, rather than relying on wordy explanations.

Re:TLDR pages: Simplified, community-driven man pages by overcast on Wednesday January 22, 2020 @01:55PM (#22120728)
That's EXACTLY what I do. I imagine there are some that are great at reading white papers, but I am not one of them, and I'm not alone. Experience > Education.
Re:TLDR pages: Simplified, community-driven man pages by Polylactic_acid on Wednesday January 22, 2020 @09:18PM (#22124235)
You don't need to know what other people don't know. Just provide a copy/paste of the most common use cases and a line explaining what they do.
Re:TLDR pages: Simplified, community-driven man pages by usrusr on Wednesday January 22, 2020 @02:02PM (#22120790)
> They know best how it works

But they don't necessarily know best what usage patterns work well for people who are not maintainer-level experts.

I see a strong case for having separate texts for documenting the interface (striving for completeness and low redundancy) and introductory teaching. I don't think that I'd like seeing each man page prepended with a wordy ELIF and two pages of trivial examples. And I'm not saying this because I'd not need the ELIF, quite the opposite, I just don't think that it would be wise to mix them.

Having them maintained in one place, passed through the same distribution channels and available on the command line, now that would great of course. The minimum almost-requirement for a crowdsourcing effort for that content could be a contribution licence that is 100% compatible with the real thing, not 99%, not 99.99. Just in case.

Re:TLDR pages: Simplified, community-driven man pages by jeltz on Wednesday January 22, 2020 @12:36PM (#22119851)
Doesn't each project maintain its own man pages? There is a huge variation in quality between them with some being excellent while others are lacking.

Have you tried talking to any of the projects?

Re:TLDR pages: Simplified, community-driven man pages by b5n on Wednesday January 22, 2020 @01:05PM (#22120185)
I use manpages frequently, seems easier to learn how to read manpages than create a new project dedicated to adding examples to manpages. I find them incredibly user friendly, but I cared enough to learn how to use them.
Re:TLDR pages: Simplified, community-driven man pages by fluidcruft on Wednesday January 22, 2020 @12:18PM (#22119603)
Doesn't GNU still scoff at man pages and foist texinfo? Honestly who wants to waste their time with roff etc?

The focus has been making it easier for the developers to write literally anything. One thing uses sphynx another uses man another uses doxygen or what the hell ever. Users aren't developers. This is why everyone ends up on google and ends up on stackoverflow or random blog or watching youtube.

The barrier to entry is much lower with some simple markdown thing. Hell, I was thinking about how to abuse this thing to make my own notes about commands.

Re:TLDR pages: Simplified, community-driven man pages by aktau on Wednesday January 22, 2020 @02:38PM (#22121179)
I maintain my man pages in markdown format, and convert them to roff at build time. There are plenty of tools that can do that: pandoc(1), ronn(1), ...
Re:TLDR pages: Simplified, community-driven man pages by vmchale on Wednesday January 22, 2020 @11:56AM (#22119290)
On Linux that has been my experience. man pages on Mac are a little better, I've heard the BSDs do better as well.
Re:TLDR pages: Simplified, community-driven man pages by spenczar5 on Wednesday January 22, 2020 @12:06PM (#22119427)
Do you have examples of that refusal? I'm unfamiliar.
Re:TLDR pages: Simplified, community-driven man pages by edw on Wednesday January 22, 2020 @12:28PM (#22119754)
Based on my experience, the problem may be that man pages are often not where one learns how to use a tool. I still remember from long, long ago when I told a greybeard that I was trying to learn sed by reading the man page. He replied, "God help you," and guffawed.

While some man pages have examples, I don't know if man page writers see their job as teaching readers how to use a utility. The goal of man pages more often seems to be _reminding_ a person already familiar with the tool how to use a tool.

I'm, umm, _reminded_ of project READMEs. I've come to assume that when I go to a project on GitHub, I'm going to get everything I need (or pointers to everything I need) to get started with a project, but often there's a project web site that is intended to serve that purpose. I just ran into this yesterday with Falcor.

Not all man pages are like this obviously. Specifically, the section three man pages on C functions do a good job fully documenting functions.

Re:TLDR pages: Simplified, community-driven man pages by kbenson on Wednesday January 22, 2020 @02:52PM (#22121313)
The more complex a tool, the less likely a man page is going to be a good way to distill and impart the information of how to use it. Bash's mane page is so large I can almost never find what I'm looking for.

At the same time, that means a TL;DR type page is also likely to be useless. For the vast majority of software run from a shell, a man page is sufficient, and examples can be (and often are) added to good effect.

I will note that some projects split very large man pages into sub-pages, and that can work well. For example, ip, and much of the man pages on BSDs that explain how different technologies are implemented (for example, follow the references in the man page for ifconfig on OpenBSD).

Re:TLDR pages: Simplified, community-driven man pages by overcast on Wednesday January 22, 2020 @12:29PM (#22119761)
By virtue of the fact that TLDR and bropages exist? People are creating 3rd party solutions, because no one does anything with man pages.
Re:TLDR pages: Simplified, community-driven man pages by munk-a on Wednesday January 22, 2020 @01:27PM (#22120432)
I dunno, the TLDR page highlighted tar which seems a bit odd since tar has always gone out of its way to have a very strong and useful manpage - specifically having several examples[1] at the top of the page before diving into all the intricacies of the arguments.

1. Including tar -cf and tar -xf probably the two you want to run in most cases. See: https://linux.die.net/man/1/tar

Re:TLDR pages: Simplified, community-driven man pages by Jaepa on Wednesday January 22, 2020 @11:44PM (#22124936)
I'd guess this is a xkcd reference.

https://www.xkcd.com/1168/

Re:TLDR pages: Simplified, community-driven man pages by jlg23 on Wednesday January 22, 2020 @12:41PM (#22119910)
Yes. The given example shows exactly what I would expect in the EXAMPLES section of a man page anyways. If not, it's worth a patch.
Re:TLDR pages: Simplified, community-driven man pages by topspin on Wednesday January 22, 2020 @01:12PM (#22120243)
> The maintainers would be thrilled to have them.

Would they?

The tldr.sh site prominently offers a sample of usage examples for a command; tar specifically. If one checks the tar man page there are no examples. This is policy, apparently promulgated by GNU et al. in favor of "info". I haven't the time right now to hunt down the official position, but here[1] is a SO discussion.

Should this TLDR thing correct that long standing mistake I'm all for it. Also, info is one of the most hostile TUI programs I've ever encountered and I resent using it.

[1] https://unix.stackexchange.com/questions/306189/why-dont-man...

Re:TLDR pages: Simplified, community-driven man pages by JdeBP on Wednesday January 22, 2020 @04:32PM (#22122279)
Re:TLDR pages: Simplified, community-driven man pages by topspin on Wednesday January 22, 2020 @06:22PM (#22123167)
I certainly should have qualified with "GNU tar". This raises the question; does TLDR exist simply because of GNU's dysfunction? Would TLDR exist if one could simply 'man tar' on a GNU tar system and pop down to the Examples section as one apparently can in just about every other *nix?

(and one currently can't, given the unmodified man page from the most recent 1.32 release)

Re:TLDR pages: Simplified, community-driven man pages by smhenderson on Wednesday January 22, 2020 @01:58PM (#22120753)
I'm aware of GBU's preference for info but systems vary. Just to use your example, I'm typing this on Slackware and when I pull up man tar there are three examples, right after Synopsis and Description. Examples for extracting, both gzipped and regular archives, and creating a tar file are given.

And when I shell into an OpenBSD server their man page for tar has several examples at the bottom of the page.

Man, IMO, is a lot like Linux distros in that they are not all created equal, pull from a lot of different sources and can be inconsistent if you're not looking at the correct ones for whatever system you are on.

I too think TLDR is a good idea but that's no reason not to encourage that some of their work be ported back to man pages in their examples' sections.

Re:TLDR pages: Simplified, community-driven man pages by topspin on Wednesday January 22, 2020 @02:24PM (#22121034)
A quick survey of GNU tar man pages, by program version and the date that appears in the page itself:

   1.23 March, 2012:    no examples (RHEL 6)
   1.26 March, 2015:    no examples (OpenSUSE 13.1)
   1.26 February, 2016: no examples (CentOS 7)
   1.29 March, 2016:    limited examples (Ubuntu 1804)
The last has no actual "EXAMPLES" section in the man page; only some incidental examples appearing among a discussion of "Option styles." I suspect this is also what you see; it's in the same position in the page. So there is some evidence that examples aren't entirely prohibited in GNU man pages, at least in recent years. Progress, I guess. The latest work on this man page (release 1.32) shows no further progress.

TLDR goes well beyond those incidental examples and is far closer to what I'd hope to see; first class, worked example forms eagerly supplied. Without suffering info.

Re:TLDR pages: Simplified, community-driven man pages by smhenderson on Wednesday January 22, 2020 @02:58PM (#22121372)
Fair enough and as mentioned this was Slackware and the maintainer, Patrick, is known to have a fondness for BSD so maybe his influence can be seen here.

For what it's worth the Slackware page does have an Examples section so it's not exactly what your seeing on Ubuntu but the examples themselves may be the same. As mentioned there are only three but they are probably the three examples needed most by 95% of users.

And, since I wasn't clear in my previous post, I absolutely agree about info. It may have been a nice thought when hypertext based systems were young and new things needed to be tried but it should have quietly died by now IMHO.

Re:TLDR pages: Simplified, community-driven man pages by dylanz on Wednesday January 22, 2020 @02:51PM (#22121302)
+1 ... we should be working on improving "the actual" man pages. There is an "Examples" section in OpenBSD man pages that help out quite a bit. I'd rather have one definitive place for man pages (rather than many), and I'd rather have them be accessible from the OS (and not require an internet connection).
Re:TLDR pages: Simplified, community-driven man pages by Semiapies on Wednesday January 22, 2020 @11:46AM (#22119135)
How is this "rapidly decaying third-party documentation" in any way that man isn't?
Re:TLDR pages: Simplified, community-driven man pages by tyrust on Wednesday January 22, 2020 @12:15PM (#22119572)
man pages are first-party, are they not?
Re:TLDR pages: Simplified, community-driven man pages by Semiapies on Thursday January 23, 2020 @11:11PM (#22135334)
Documentation by the makers of a program would be first-party.

Something definitely can't be both first-party and community.

Re:TLDR pages: Simplified, community-driven man pages by glckr on Wednesday January 22, 2020 @12:08PM (#22119472)
man is universally known in the industry, and supported (to some extent, at least) by project authors/maintainers; this project will be forgotten by almost everyone (and start decaying) as soon as this post is off the front page here.
Re:TLDR pages: Simplified, community-driven man pages by kick on Wednesday January 22, 2020 @08:54PM (#22124109)
This is the second time it's been on the front page, and the last time was years ago. Doesn't seem to be decaying. Actually, it seems to be improving.
Re:TLDR pages: Simplified, community-driven man pages by skybrian on Wednesday January 22, 2020 @01:13PM (#22120252)
They're often used, but I suspect most people who read them don't know how to write or even modify a man page. (What format is it?) Also, Stack Overflow probably gets more traffic.

Whether documentation gets read or not probably depends on its Google ranking more than anything.

Re:TLDR pages: Simplified, community-driven man pages by TheKarateKid on Thursday January 23, 2020 @06:26PM (#22133489)
Given the general attitude of the GNU/Linux community, I could see most examples/edits being rejected with elitists saying "RTFM!"

Remember, these are the same people that claim the Emacs and Vim are better to code in, and that IDEs are for inexperienced/lazy coders.

Re:TLDR pages: Simplified, community-driven man pages by pwrplus1 on Wednesday January 22, 2020 @07:33PM (#22123638)
And many (or most) of the TLDR project pages are wrong because they refer to the GNU-variant reimplementation instead of the actual tool.

With a man page you know you're getting the right info because it came bundled with the tool.

Re:TLDR pages: Simplified, community-driven man pages by mongol on Wednesday January 22, 2020 @02:47PM (#22121259)
It would be interesting to take a step back and consider what man pages actually are. Are they documentation structured in a specific way, dating back to Unix origins, or are they what the user sees if they type "man command" on the command line? Because if we consider the latter, I think it will be much easier to see radical improvement of the "man experience"

If I type "man ps" I see

    Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)
     * ps (1)
       ps (1p)
    Man: What manual page do you want?
What if I instead saw

    Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)
     * ps (1)
       ps (1.tldr)
       ps (1p)
    Man: What manual page do you want?
where the man command retrieved that information from the TLDR-pages site?

In the last years we have seen many innovative Rust re-implementations of classical commands such as cat, find, grep. Maybe the man command is next up?

Re:TLDR pages: Simplified, community-driven man pages by teddyh on Wednesday January 22, 2020 @04:12PM (#22122101)
man apropos
Re:TLDR pages: Simplified, community-driven man pages by jakeogh on Wednesday January 22, 2020 @06:53PM (#22123368)
To really improve them, the man format needs to be changed. For example, those blue underlined words... they arent links. Markdown (or better, a subset) would work.
Re:TLDR pages: Simplified, community-driven man pages by nebulous1 on Wednesday January 22, 2020 @12:38PM (#22119876)
Ideally this information would be controlled by the individual package maintainers, I agree.

However, realistically at the moment I don't see man pages competing with the spirit of tldr/bro/whatever, and I suspect that PRs geared towards making them compete would in fact be rejected by most projects.

Re:TLDR pages: Simplified, community-driven man pages by nathias on Wednesday January 22, 2020 @11:46AM (#22119129)
it's not the same use-case, manpages are detailed instructions, tldr is just the 7 most used commands
Re:TLDR pages: Simplified, community-driven man pages by hellcow on Wednesday January 22, 2020 @11:49AM (#22119177)
manpages often have an examples section on OpenBSD showcasing different ways to use programs. It can be done...
Re:TLDR pages: Simplified, community-driven man pages by bananamerica on Wednesday January 22, 2020 @04:12PM (#22122100)
manpages would be awesome if more pages had examples.

Since they don't, we use bropages, tldr, etc.

Re:TLDR pages: Simplified, community-driven man pages by Brave-Steak on Wednesday January 22, 2020 @01:16PM (#22120293)
Yeah, no. The use cases for man and tldr are completely different, and trying to convince every single project to make their man pages more friendly to people who just want to get their work done is just ... well, an impossible amount of effort. tldr coalesces a community around a common goal, and they can work towards that goal without fighting hundreds of different maintainers on making man pages more accessible.