gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ✘example


From: Gary E. Miller
Subject: Re: ✘example
Date: Sun, 7 Mar 2021 11:09:12 -0800

Yo Greg!

On Sun, 07 Mar 2021 07:58:27 -0500
Greg Troxel <gdt@lexort.com> wrote:

> I will read the example and actually try it, but a meta comment:
> 
>   how about put the example in the sources as a C file, and install it
>   $prefix/share/examples/gpsd/use-libgps.c?   (or to the value of
>   --exampledir if that's a thing, so packaging systems can put it
> where they want it).

gpsd already has a ton of good "examle" files, in clients/ and contrib/,
and the coders ignore them.  They seem to want Stackoverflow style
commentary about snippeets.  Then get angry the snippets are not complete
programs.

>   then, say in the man page to look at use-libgps.c that is in the
>   source at examples/use-libgps.c and installed in the examples
>   directory

Sadly distros have not been installing the client/ code, or contrib/
code, why would they install examples/ ?

IMHO the only only hope is to install a $PREFIX/share/gpsd directory with
the suplementary materials.  The www stuff should also go there, in text
form.  For some reason people are not finding the www/*html online.

> As for a larger paper, I think there's a difference between a
> reasonable example of using the lib, and a tutorial on how to write
> programs. Peasonally, I'd have an example, and explain enough in
> comments.  If there are multiple reasonable styles of using the lib,
> perhaps an example each.

That mirrors my thoughts.  When I added all the commntes I wanted, the
code got lost.  Coders can't seem to understand code blocks that do not
fit on one screen.  So I took them out.  I'm thinking more of putting
line numbers on the code, then adding separaate, but nearby commentary.

To start two C exmples: gpw_wait() loop, and gps_mainloop().  Then
at least one python example.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpj1XX4IjvRR.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]