unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
To: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
Cc: guile-user@gnu.org
Subject: Re: Some issues with guile
Date: Sat, 27 Apr 2024 03:46:35 -0400	[thread overview]
Message-ID: <CAAQmekcn-MvnYyF8nMYUcsFtPB+L8MN-T8xTOKyV_=93+=jMGQ@mail.gmail.com> (raw)
In-Reply-To: <ZiwQ_axMBXP-8jVg@ws>

On Fri, Apr 26, 2024 at 4:39 PM Tomas Volf <~@wolfsden.cz> wrote:
>
> On 2024-04-26 03:05:51 -0400, Nikolaos Chatzikonstantinou wrote:
> > <snip complaints about Guile's documentation extraction>
> >   - `object-documentation` from `(ice-9 documentation)` only seems to
> >     work with docstrings of functions, although it claims to work with
> >     macros too, suggesting that the `documentation` property should be
> >     set. But how? It's not explained. The info page on "Object
> >     Properties" makes it seem like this suffices: (set! (documentation
> >     my-function) "the docstring.")  but I can't get it to work like
> >     that. Docstrings cannot document files. Maybe they can document
> >     macros, variables, and modules at least?
>
> What you want is:
>
>     (set-object-property! foo 'documentation "Contains a @code{'bar}.")

Okay, so this can document objects. I propose that a good-enough
solution is to document symbols. This can document functions,
variables, macros, modules (although it seems that modules live in a
different namespace?) I am not sure how to document GOOP-specific
stuff, but AT LEAST we have something.

> > But the docstring format is raw, there is no markup!
>
> You can write them in whatever markup you want, I personally use texinfo format
> (next version of geiser will be able to process and display it nicely).

I can use any format but will there be compatibility with the tooling?
Texinfo -- fine, but there's no examples in the guile manual of such
things. It's impossible to think that the user should pick up such
ideas on their own.

You can see for example what happens under
guile/module/ice-9/streams.scm, a random file I picked from the Guile
package. Not a single procedure is docstring-documented. There's some
documentation in a giant block containing things such as
    ;; (stream-null? stream)
    ;;  - yes.
(who knows what that means?) Other procedures are more fortunate,
    ;; (stream-map proc stream0 ...)
    ;;  - like `map', except returns a stream of results, and not a list.
Note here the use of `' when writing `map'. I am not sure if this is
texinfo related; I don't think it is. I know it works in elisp to link
to other items. The entire block starts with
    ;; Use:
Is this markup? who knows. But let's look at another file, threads.scm
in the same directory. Every procedure is documented with docstrings
in texinfo format! Well, let's look at regex.scm. It uses triple
semicolons for
    ;;; Code:
as opposed to streams.scm's double semicolons. Why? Why not!

I don't mean to just complain. There needs to be some documentation
consistency and once established it needs to be championed, and that's
what I'm trying to accomplish...

Regards,
Nikolaos Chatzikonstantinou



  reply	other threads:[~2024-04-27  7:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26  7:05 Some issues with guile Nikolaos Chatzikonstantinou
2024-04-26 15:21 ` Luis Felipe
2024-04-27  7:28   ` Nikolaos Chatzikonstantinou
2024-04-27 20:32     ` Luis Felipe
2024-04-26 16:23 ` Dr. Arne Babenhauserheide
2024-04-26 20:39 ` Tomas Volf
2024-04-27  7:46   ` Nikolaos Chatzikonstantinou [this message]
2024-04-27 14:09     ` Dr. Arne Babenhauserheide
2024-04-27 17:35     ` Linas Vepstas
2024-04-27 20:24       ` Luis Felipe
2024-04-28  5:06       ` Nikolaos Chatzikonstantinou

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://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to='CAAQmekcn-MvnYyF8nMYUcsFtPB+L8MN-T8xTOKyV_=93+=jMGQ@mail.gmail.com' \
    --to=nchatz314@gmail.com \
    --cc=guile-user@gnu.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.
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).