News for hackers. Stuff that matters.
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!