unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Nikita Karetnikov <nikita@karetnikov.org>
Cc: bug-guix@gnu.org
Subject: Re: Literate programming
Date: Sat, 06 Apr 2013 15:50:45 +0200	[thread overview]
Message-ID: <87d2u76a4q.fsf@gnu.org> (raw)
In-Reply-To: <87y5cwxxmg.fsf@karetnikov.org> (Nikita Karetnikov's message of "Sat, 06 Apr 2013 05:21:11 +0400")

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> Here is what I found yesterday: [1,2].  Those (texinfo ...) modules
> provide various functions to generate html, pdf, and info from a single
> source file.

[...]

> [1] http://wingolog.org/archives/2004/07/25/literate-programming-with-guile-lib
> [2] http://wingolog.org/archives/2006/11/17/high-on-sodium-vapor

Guile-Lib’s method was eventually integrated in Guile 2.0, to generate
the documentation of modules that were imported from Guile-Lib, such as
the texinfo and sxml modules.  The result, as can be seen in Guile’s
manual up to 2.0.7, was of poor quality compared to the rest of the
manual.

That’s why the upcoming 2.0.8 (due in a couple of days) got rid of
that.  NEWS reads this (written by Andy):

  ** An end to the generated-documentation experiment.

  When Guile 2.0 imported some modules from Guile-Lib, they came with a
  system that generated documentation from docstrings and module
  commentaries.  This produced terrible documentation.  We finally bit the
  bullet and incorporated these modules into the main text, and will be
  improving them manually over time, as is the case with SXML.  Help is
  appreciated.

So yes, you’re right that synchronizing code (and docstrings) with a
separate Texinfo manual can lead to discrepancies.  Yet, “good” manuals
can hardly be automatically generated.

For Guix, perhaps a middle ground approach could be used.  For instance,
we would keep the manual in its current form, but extract docstrings for
internal modules in separate .texi files, which would be @included in
the right places of the manual.  (It would be an improvement over the
current situation where almost none of the API documentation appears in
the manual.)  We would still write appropriate text to provide context
and cross-references above the raw function @deffn lists.

WDYT?

Thanks,
Ludo’.

  reply	other threads:[~2013-04-06 13:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04 20:30 Literate programming Nikita Karetnikov
2013-02-04 21:52 ` Ludovic Courtès
2013-04-06  1:21   ` Nikita Karetnikov
2013-04-06 13:50     ` Ludovic Courtès [this message]
2013-04-06 15:26       ` Nikita Karetnikov
2013-04-06 17:53         ` Ludovic Courtès
2013-05-09 22:21           ` Nikita Karetnikov
2013-05-11 16:14             ` Ludovic Courtès

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87d2u76a4q.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=bug-guix@gnu.org \
    --cc=nikita@karetnikov.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).