All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <colomar.6.4.3@gmail.com>
To: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Cc: linux-man@vger.kernel.org, libc-alpha@sourceware.org
Subject: Re: [PATCH] queue.3: Replace incomplete example by a complete example
Date: Sun, 11 Oct 2020 11:03:57 +0200	[thread overview]
Message-ID: <9bc990f9-1605-b1c3-09d0-0a2dd68bd8f2@gmail.com> (raw)
In-Reply-To: <899bb60e-368b-e7dd-9a87-715d094a8a10@gmail.com>



On 2020-10-11 08:00, Michael Kerrisk (man-pages) wrote:
> Hello Alex:
> 
> On 10/10/20 9:02 PM, Alejandro Colomar wrote:
>> I added the EXAMPLES section.
>> The examples in this page are incomplete
>> (you can't copy&paste&compile&run).
>> I fixed the one about TAILQ first,
>> and the rest should follow.
>>
>> Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
> 
> I have not (yet) applied this patch, because...


Hi Michael,

I thought that we could do it in the following steps:

1) Fix the current page:
	- Complete examples
	- Use standard sections (such as EXAMPLES)
2) Move the code from this page to new separate pages
3) Fix the code in all of those pages to use "man" macros

This way, the history can be easily followed in git,
instead of having a few commits breaking everything.

Also, I think this way it might be easier,
and the improvements (such as better examples)
can be seen from the beginning.
Part 1 could be applied directly,
while parts 2 & 3 should be applied at once.

If the change was done abruptly, you couldn't apply any commits
until all of the work is finished
(otherwise, you would have broken pages).

So I think this patch can be applied as part of this change.

Cheers,

Alex

> 
>> ---
>>
>> Hi Michael,
>>
>> I think this page needs a big overhaul.
> 
> ... you are probably right. (And thank you for thinking
> about the big picture.)
> 
> As you are probably aware, the page was essentially
> lifted from BSD, and lightly edited, and this accounts
> for many oddities by comparison with other pages.
> 
>> First of all, it's a very big page,
>> where it's a bit difficult to go to the subsection you want.
> 
> Agreed.
> 
>> Then, the examples are incomplete.
>> And also, the language of the page is weird.
> 
> Yes, there are some rather strange pieces in the page.
> Just now, I noticed statements about % code size increase, etc,
> which I'm sure were not measured on Linux (and in any case, such
> numbers are prone to change, and don't belong in a manual page).


Agreed.

> 
>> I thought about having queue.h with an overview of all the different
>> data structures, and the differences about them.
>>
>> And then separate pages for each data structure:
>> slist.3, list.3,
>> stailq.3, tailq.3,
>> simpleq.3 (which right now isn't documented),
>> and circleq.3
>> with details about each macro and a complete example program.
>>
>> Your thoughts?
> 
> The above sounds about right to me. I'd happily accept patches
> to do that, if you want to work on this.


:-)

> 
> One thing I'd ask though. Unlike almost every page in
> man-pages, this page uses mandoc mark-up (rather than "man").
> This was a matter of the history, where at some point I
> refreshed the page from BSD, and decided to retain the
> mandoc markup,so that if a refresh was ever again done,
> the diff would be easy to comprehend. If you do decide
> to do this work, I think it would be desirable
> to switch to "man" markup. Sound okay?


Yes.

> 
> Replying to your other mail:
> 
> On 10/10/20 9:08 PM, Alejandro Colomar wrote:
>>
>>
>> On 2020-10-10 21:02, Alejandro Colomar wrote:
>>> I thought about having queue.h with an overview of all the different
>> I meant queue.3 (instead of queue.h).
> 
> Okay.
> 
>> However, thinking about it,
>> if we strip if from the details about all of the macros,
>> it might be better as queue.7.
> 
> Let's leave it as queue.3 for the moment. If it makes
> sense, we can easily switch it later, as the final step.


Agree.

> 
> Thanks,
> 
> Michael
> 

  reply	other threads:[~2020-10-11  9:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-10 19:02 [PATCH] queue.3: Replace incomplete example by a complete example Alejandro Colomar
2020-10-10 19:08 ` Alejandro Colomar
2020-10-11  6:00 ` Michael Kerrisk (man-pages)
2020-10-11  9:03   ` Alejandro Colomar [this message]
2020-10-11 12:24     ` Michael Kerrisk (man-pages)
2020-10-12 12:53 ` Zack Weinberg
2020-10-12 18:47   ` Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9bc990f9-1605-b1c3-09d0-0a2dd68bd8f2@gmail.com \
    --to=colomar.6.4.3@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.