News for hackers. Stuff that matters.
Re:Um – Create your own man pages so you can remember how to... by dvh on Monday August 20, 2018 @02:09AM (#17798028)
One thing I hate about man pages is that there are not enough examples. Sometimes feature is explained on five pages while simple one line example would explained it instantly. And at the end there should be 2-3 pages of examples at least, maybe even more.
Re:Um – Create your own man pages so you can remember how to... by sjmulder on Monday August 20, 2018 @02:25AM (#17798070)
If you’re using a GNU system now you might be surprised by the quality of the BSD man pages, and documentation in general. Concise but still comprehensive, and plenty of examples. The tools (like man) aren’t really the problem here, the documentation itself is. (But it helps that the BSD folks show a bit more restraint wrt adding command line options.)
Re:Um – Create your own man pages so you can remember how to... by tralarpa on Monday August 20, 2018 @08:02AM (#17799242)
I have just compared the man pages for Linux and FreeBSD, but the result is not really clear:

Example provided on the FreeBSD man page of cut.

Examples provided on the Linux man page of xargs.

More examples provided on the Linux man page of find.

Re:Um – Create your own man pages so you can remember how to... by sjmulder on Monday August 20, 2018 @12:01PM (#17801030)
I find the cut man page (looking at the OpenBSD one) very clear. It's just 62 lines (fits on a screen), has only 5 flags and the 2 examples clearly show how the tool is used.

The xargs man page is ought to have some examples, I agree.

The find manual is lengthy (as it has a bunch of options) but not excessively so and it also has a good bunch of examples.

Edit: it also helps to be familiar with the pager, like using the search feature (hit / , n, n, Shift+n, ...) and the jump keys (G and g).

Re:Um – Create your own man pages so you can remember how to... by Annatar on Monday August 20, 2018 @03:22AM (#17798243)
Not enough examples is only in GNU/Linux; the BSD’s and illumos-based operating systems have plenty of examples. Especially illumos, since they enforce a rule that no component may be integrated without a comprehensive manual page and since they come from Solaris, most of the documentation was written by a dedicated department of professional technical writers working with the engineers to document their work in a systematic fashion.
Re:Um – Create your own man pages so you can remember how to... by philbarr on Monday August 20, 2018 @07:48AM (#17799184)
Those who can, do

Those who can't, teach

Those who can't teach, write

Those who can't write, write man pages

Re:Um – Create your own man pages so you can remember how to... by simplify on Monday August 20, 2018 @10:43AM (#17800296)
This is a pet peeve of mine. Teachers are not somehow inferior to those who do. It's a completely different skill set that actually helps you "do" better.
Re:Um – Create your own man pages so you can remember how to... by JoeAltmaier on Monday August 20, 2018 @10:46AM (#17800328)
Exactly. In sport we respect coaches for their particular skills. But somehow teachers get joked about.
Re:Um – Create your own man pages so you can remember how to... by dcole2929 on Monday August 20, 2018 @12:15PM (#17801179)
Sure we respect coaches, but we also still in every sport pay them significantly less than the pros they ostensibly lead. I personally value both coaches and teachers but it's very clear that we as a people have decided that ability to do is more valuable than the ability to teach others.
Re:Um – Create your own man pages so you can remember how to... by dredmorbius on Tuesday August 21, 2018 @03:24PM (#17812854)
H.L. Mencken had a strong antipathy to teachers, and maths specifically.

Rather a disappointment.

Re:Um – Create your own man pages so you can remember how to... by tpfour on Monday August 20, 2018 @09:43AM (#17799794)
And those who believe in this aphorism have never did, taught or written :)
Re:Um – Create your own man pages so you can remember how to... by TremendousJudge on Monday August 20, 2018 @09:58AM (#17799891)
honestly, not having a man page would be better than half of the man pages out there
Re:Um – Create your own man pages so you can remember how to... by jgtrosh on Monday August 20, 2018 @11:05AM (#17800542)
Having benefited tremendously from manpages I believe they're absolutely worth existing, whatever manpage seemed insufficient to you.
Re:Um – Create your own man pages so you can remember how to... by deviationblue on Monday August 20, 2018 @10:42AM (#17800290)
Those who can, do. Those who can't, become product managers.
Re:Um – Create your own man pages so you can remember how to... by dijit on Monday August 20, 2018 @02:25AM (#17798065)
I find that this is something openBSD gets /really/ right. In general the man pages in BSD are phenomenal.

What happened to ‘info’ pages. I hated it, but wasn’t that supposed to address these kinds of issues with examples?

Re:Um – Create your own man pages so you can remember how to... by JoshMnem on Monday August 20, 2018 @08:30AM (#17799371)
Info pages are still there.

    $ info grep
Re:Um – Create your own man pages so you can remember how to... by arminiusreturns on Monday August 20, 2018 @10:37AM (#17800234)
Info is much better than man, but keep in mind it's only covering gnu coreutils (which isn't a bad thing!)
Re:Um – Create your own man pages so you can remember how to... by dijit on Monday August 20, 2018 @01:58PM (#17802167)
Why is info better than man?
Re:Um – Create your own man pages so you can remember how to... by wrycoder on Saturday August 25, 2018 @06:27PM (#17842919)
The man page for gcc goes on and on. Try it.

The info for gcc is a printed book, which is also accessible in the shell as hypertext (which predates html).

Re:Um – Create your own man pages so you can remember how to... by kaushalmodi on Monday August 20, 2018 @10:00PM (#17806227)
Better search and better organization of the document (TOC, index search, etc.). And reading/searching Info manuals is a lot more convenient in Emacs Info-mode.
Re:Um – Create your own man pages so you can remember how to... by jwilk on Monday August 20, 2018 @10:58AM (#17800464)
Huh? grep is not part of coreutils.
Re:Um – Create your own man pages so you can remember how to... by arminiusreturns on Wednesday August 22, 2018 @12:25PM (#17819861)
I know this is late but you are right. For some reason I thought info was only fore coreutils, but it seems I was wrong. I only ever used it for coreutils, but hey, thats good news to me!
Re:Um – Create your own man pages so you can remember how to... by ptman on Monday August 20, 2018 @04:42AM (#17798480)
perldoc begins with examples by convention. No need to /EXA

See e.g. https://metacpan.org/pod/release/PHRED/Archive-Zip-1.62/lib/...

Re:Um – Create your own man pages so you can remember how to... by swebs on Monday August 20, 2018 @11:22AM (#17800693)
Sounds like you want bro pages

http://bropages.org/

Re:Um – Create your own man pages so you can remember how to... by banku_brougham on Monday August 20, 2018 @02:04PM (#17802245)
I don't think the use case is the same. um is for saving and viewing personal notes about usage, bropages is a common set of examples submitted by the wider community.

This other response says it better: https://news.ycombinator.com/item?id=17801788

Re:Um – Create your own man pages so you can remember how to... by appleflaxen on Wednesday August 22, 2018 @11:38AM (#17819441)
that's what bro does by default; you only push an example to the community explicitly.
Re:Um – Create your own man pages so you can remember how to... by ddevault on Monday August 20, 2018 @07:54AM (#17799205)
Man pages are a community project. Send patches!
Re:Um – Create your own man pages so you can remember how to... by oblio on Monday August 20, 2018 @10:07AM (#17799967)
While this is laudable, how many GNU projects, especially, don't use an archaic development/contribution process? I don't want to have to register on a mailing list and prepare patches.

This is an honest question. Friction and barriers to entry reduce contributions.

Re:Um – Create your own man pages so you can remember how to... by jwilk on Monday August 20, 2018 @10:57AM (#17800446)
More importantly, many (most?) GNU projects don't care about man pages:

https://www.gnu.org/prep/standards/html_node/Man-Pages.html

Re:Um – Create your own man pages so you can remember how to... by jplayer01 on Monday August 20, 2018 @12:19PM (#17801226)
This encapsulates one of my biggest gripes with Linux. A lack of appreciation for adequate/good documentation.

> The time you spend on the man page is time taken away from more useful work.

Making sure your users know how your program works, how to use it and what it's capable of seems incredibly important and useful to me.

If it weren't for Arch Linux's fantastic focus on documenting everything to do with Linux, I wouldn't be using Linux at all.

Re:Um – Create your own man pages so you can remember how to... by KC8ZKF on Monday August 20, 2018 @01:03PM (#17801634)
GNU deprecates man pages in favor of texinfo, not no documentation at all.

https://www.gnu.org/prep/standards/html_node/Documentation.h...

Re:Um – Create your own man pages so you can remember how to... by owaty on Monday August 20, 2018 @12:52PM (#17801517)
That page is specific to man pages, not to documentation in general.

See https://www.gnu.org/prep/standards/html_node/GNU-Manuals.htm...

Re:Um – Create your own man pages so you can remember how to... by S-E-P on Monday August 20, 2018 @10:26AM (#17800144)
I second this, there's so much wasted work, and because that old contribution process there's no guarantee that even an absolutely fantastic patch, like a better man page for example. Will ever see the light of day.

I've tried in the past, it doesn't work out (not man pages, but I was fixing a bug and yeah, three, four submissions was enough for me to quit trying)

Re:Um – Create your own man pages so you can remember how to... by Sir_Cmpwn on Monday August 20, 2018 @12:06PM (#17801080)
It's not hard, just suck it up and register for the ML, and prepare the patches. People are irrationally scared of this process. There are plentiful guides.
Re:Um – Create your own man pages so you can remember how to... by kitsunesoba on Monday August 20, 2018 @12:58PM (#17801580)
I don’t think being afraid of the process is the problem. It’s more about how unnecessarily manual the process is paired with the possibility of your patch’s email thread getting buried never to be seen again or worse, its reviewer abandoning it halfway through the review process with no easy way for someone else to pick it up.

That’s not to say that Github pull requests and the like are perfect (far from it) but it’s undeniable that they smooth the process quite considerably and make contribution far more accessible.

Re:Um – Create your own man pages so you can remember how to... by Sir_Cmpwn on Monday August 20, 2018 @01:01PM (#17801615)
People are busy. If you want your patch considered, you should be bumping it and reaching out to people who can merge it. Man page improvements are generally a shoe-in, just get someone to pay attention to it for a few minutes and it'll get in.
Re:Um – Create your own man pages so you can remember how to... by mikebenfield on Monday August 20, 2018 @01:37PM (#17801966)
The process you're describing in this comment is exactly the outdated approach people are saying they don't want to do.
Re:Um – Create your own man pages so you can remember how to... by Sir_Cmpwn on Monday August 20, 2018 @02:32PM (#17802530)
It's not like this isn't a problem for GitHub, either. Pull requests go ignored, too.
Re:Um – Create your own man pages so you can remember how to... by mdaniel on Monday August 20, 2018 @12:58PM (#17801578)
It's not always that it's hard, rather it can be demoralizing to have the same experience that @S-E-P did [a sibling comment to yours] where you _do_ expend the energy and then patches sit unactioned for months or years
Re:Um – Create your own man pages so you can remember how to... by Sir_Cmpwn on Monday August 20, 2018 @01:02PM (#17801622)
Your patches are your responsibility. Bump them, reach out to maintainers directly, etc. Manual improvements are easy to review once you can get someone to.
Re:Um – Create your own man pages so you can remember how to... by oblio on Monday August 20, 2018 @02:28PM (#17802474)
Or I could just do what 99% of devs do, not give a crap and try StackOverflow/blogs to find an answer... That was my whole point, higher friction => much fewer contributions.
Re:Um – Create your own man pages so you can remember how to... by Sir_Cmpwn on Monday August 20, 2018 @02:33PM (#17802533)
Higher friction => higher quality contributions.
Re:Um – Create your own man pages so you can remember how to... by aktau on Monday August 20, 2018 @04:22PM (#17803588)
But also fewer contributions, I reckon. If someone wants to contribute something big, they'll jump through all the hoops. But if all one wants is to contribute another example to a man page, I'd wager they're more easily discouraged by an arcane setup process. GitHub solves a lot of this friction by having:

  1. One account for manifesting your chosen identity, which you likely already have.
  2. One common way of getting the source code and sending diffs/patches (read: PRs).
The workflow is quite similar, in the abstract. But GitHub and friends solve important pain points.
Re:Um – Create your own man pages so you can remember how to... by Sir_Cmpwn on Monday August 20, 2018 @05:18PM (#17804060)
1. One account for manifesting your chosen identity, which you likely already have.

You also have an email address, so. You need an email address to get a GitHub account, so technically it's harder to set up GitHub.

2. One common way of getting the source code and sending diffs/patches (read: PRs).

This is built into git. Don't need GitHub for either.

Re:Um – Create your own man pages so you can remember how to... by aktau on Monday August 20, 2018 @06:18PM (#17804538)
It looks like you think that older approaches to open-source collaboration (like many of the GNU projects are using) are more or less as user-friendly as GitHub. I don't have the data to prove that they aren't, just an intuition.

Perhaps the last argument I have is that I've heard a number of times about moving a project to GitHub (for example: the Go language or Vim the editor), but decidedly less often one hears of projects moving away from GitHub towards older forms (such as the wonderfully documented https://gcc.gnu.org/contribute.html). Despite the great documentation, I'm somehow not drawn to hacking on it to fix a small glitch, due to the overhead that entails. Mind, some of that overhead would be incurred just once, as it is general to the mailing list approach to collaboration. That, I believe, is another advantage of a project being on GitHub: for almost all projects there's a standard way of sending your patch: make a pull request.

About your counterpoints:

1. True. I was thinking of the bug trackers many mailing-list oriented projects have, which often require creating accounts just to file a bug. 2. I was more referring to things like (1) where to find the clone URL and (2) how to send a patch (the make a PR button is always the same).

Removing friction (even small frictions) will enable fishing for the long tail of small fixes. On the other side, I do not believe large contributions are greatly affected by the differences between these systems.

Re:Um – Create your own man pages so you can remember how to... by overcast on Monday August 20, 2018 @12:01PM (#17801033)
Attempting to read nix man pages, always felt like I was alone in learning best from examples. Documentation in any form without examples is always difficult for me to sort through.
Re:Um – Create your own man pages so you can remember how to... by zuppy on Monday August 20, 2018 @03:05AM (#17798185)
tldr tries to fix that: https://tldr.sh
Re:Um – Create your own man pages so you can remember how to... by yoz-y on Monday August 20, 2018 @04:01AM (#17798348)
Ever since I have discovered tldr i've been using man pages less and less.
Re:Um – Create your own man pages so you can remember how to... by dotancohen on Monday August 20, 2018 @10:27AM (#17800152)
When viewing man pages, you are using less by default.

lrf, guvf vf n cha

Re:Um – Create your own man pages so you can remember how to... by erisds on Monday August 20, 2018 @02:01PM (#17802209)
Also a big fan of tldr :) But love the idea of writing my own.