printf(3) wording

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

printf(3) wording

Jan Stary
I am not a native speaker, but the conversion specifiers
are "interpreted" by printf, not "interpolated", right?

        Jan

Index: printf.3
===================================================================
RCS file: /cvs/src/lib/libc/stdio/printf.3,v
retrieving revision 1.74
diff -u -p -r1.74 printf.3
--- printf.3 13 Oct 2015 12:25:04 -0000 1.74
+++ printf.3 17 Nov 2015 09:36:19 -0000
@@ -852,7 +852,7 @@ This holds true even if the string has b
 using a function like
 .Fn snprintf ,
 as the resulting string may still contain user-supplied conversion specifiers
-for later interpolation by
+for later interpretation by
 .Fn printf .
 .Pp
 Be sure to use the proper secure idiom:

Reply | Threaded
Open this post in threaded view
|

Re: printf(3) wording

Jason McIntyre-2
On Tue, Nov 17, 2015 at 10:38:41AM +0100, Jan Stary wrote:
> I am not a native speaker, but the conversion specifiers
> are "interpreted" by printf, not "interpolated", right?
>
> Jan
>

i don;t know how these implementations work, so it's hard to say.
perhaps they are interpolated. maybe use cvs to track down the author
and ask them?

whatever the outcome, if you want to change this text you probably want
to adjust a few more:

/usr/src/lib/libc/gen/err.3:for later interpolation by the
/usr/src/lib/libc/gen/setproctitle.3:for later interpolation by
/usr/src/lib/libc/gen/syslog.3:for later interpolation by
/usr/src/lib/libc/stdio/printf.3:for later interpolation by

jmc

> Index: printf.3
> ===================================================================
> RCS file: /cvs/src/lib/libc/stdio/printf.3,v
> retrieving revision 1.74
> diff -u -p -r1.74 printf.3
> --- printf.3 13 Oct 2015 12:25:04 -0000 1.74
> +++ printf.3 17 Nov 2015 09:36:19 -0000
> @@ -852,7 +852,7 @@ This holds true even if the string has b
>  using a function like
>  .Fn snprintf ,
>  as the resulting string may still contain user-supplied conversion specifiers
> -for later interpolation by
> +for later interpretation by
>  .Fn printf .
>  .Pp
>  Be sure to use the proper secure idiom:
>

Reply | Threaded
Open this post in threaded view
|

Re: printf(3) wording

Jan Stary
On Nov 17 17:06:11, [hidden email] wrote:

> On Tue, Nov 17, 2015 at 10:38:41AM +0100, Jan Stary wrote:
> > I am not a native speaker, but the conversion specifiers
> > are "interpreted" by printf, not "interpolated", right?
> >
> > Jan
> >
>
> i don;t know how these implementations work, so it's hard to say.
> perhaps they are interpolated. maybe use cvs to track down the author
> and ask them?
>
> whatever the outcome, if you want to change this text you probably want
> to adjust a few more:
>
> /usr/src/lib/libc/gen/err.3:for later interpolation by the
> /usr/src/lib/libc/gen/setproctitle.3:for later interpolation by
> /usr/src/lib/libc/gen/syslog.3:for later interpolation by
> /usr/src/lib/libc/stdio/printf.3:for later interpolation by

Hm, probably just my English;
sorry for the noise.

        Jan

> jmc
>
> > Index: printf.3
> > ===================================================================
> > RCS file: /cvs/src/lib/libc/stdio/printf.3,v
> > retrieving revision 1.74
> > diff -u -p -r1.74 printf.3
> > --- printf.3 13 Oct 2015 12:25:04 -0000 1.74
> > +++ printf.3 17 Nov 2015 09:36:19 -0000
> > @@ -852,7 +852,7 @@ This holds true even if the string has b
> >  using a function like
> >  .Fn snprintf ,
> >  as the resulting string may still contain user-supplied conversion specifiers
> > -for later interpolation by
> > +for later interpretation by
> >  .Fn printf .
> >  .Pp
> >  Be sure to use the proper secure idiom:
> >

Reply | Threaded
Open this post in threaded view
|

Re: printf(3) wording

Jason McIntyre-2
On Tue, Nov 17, 2015 at 06:14:33PM +0100, Jan Stary wrote:

> On Nov 17 17:06:11, [hidden email] wrote:
> > On Tue, Nov 17, 2015 at 10:38:41AM +0100, Jan Stary wrote:
> > > I am not a native speaker, but the conversion specifiers
> > > are "interpreted" by printf, not "interpolated", right?
> > >
> > > Jan
> > >
> >
> > i don;t know how these implementations work, so it's hard to say.
> > perhaps they are interpolated. maybe use cvs to track down the author
> > and ask them?
> >
> > whatever the outcome, if you want to change this text you probably want
> > to adjust a few more:
> >
> > /usr/src/lib/libc/gen/err.3:for later interpolation by the
> > /usr/src/lib/libc/gen/setproctitle.3:for later interpolation by
> > /usr/src/lib/libc/gen/syslog.3:for later interpolation by
> > /usr/src/lib/libc/stdio/printf.3:for later interpolation by
>
> Hm, probably just my English;
> sorry for the noise.
>
> Jan
>

not neccessarily. the author may have been confused too. who knows. i
had to look up "interpolation" myself. it's a word i'd prefer to avoid
in man pages if we can ;)

jmc

Reply | Threaded
Open this post in threaded view
|

Re: printf(3) wording

Ted Unangst-6
Jason McIntyre wrote:

> On Tue, Nov 17, 2015 at 06:14:33PM +0100, Jan Stary wrote:
> > On Nov 17 17:06:11, [hidden email] wrote:
> > > On Tue, Nov 17, 2015 at 10:38:41AM +0100, Jan Stary wrote:
> > > > I am not a native speaker, but the conversion specifiers
> > > > are "interpreted" by printf, not "interpolated", right?
> > > >
> > > > Jan
> > > >
> > >
> > > i don;t know how these implementations work, so it's hard to say.
> > > perhaps they are interpolated. maybe use cvs to track down the author
> > > and ask them?
> > >
> > > whatever the outcome, if you want to change this text you probably want
> > > to adjust a few more:
> > >
> > > /usr/src/lib/libc/gen/err.3:for later interpolation by the
> > > /usr/src/lib/libc/gen/setproctitle.3:for later interpolation by
> > > /usr/src/lib/libc/gen/syslog.3:for later interpolation by
> > > /usr/src/lib/libc/stdio/printf.3:for later interpolation by
> >
> > Hm, probably just my English;
> > sorry for the noise.
> >
> > Jan
> >
>
> not neccessarily. the author may have been confused too. who knows. i
> had to look up "interpolation" myself. it's a word i'd prefer to avoid
> in man pages if we can ;)

interpretation is the correct word to use.

Reply | Threaded
Open this post in threaded view
|

Re: printf(3) wording

Amit Kulkarni-5
In reply to this post by Jason McIntyre-2
On Tue, Nov 17, 2015 at 11:22 AM, Jason McIntyre <[hidden email]> wrote:

> On Tue, Nov 17, 2015 at 06:14:33PM +0100, Jan Stary wrote:
> > On Nov 17 17:06:11, [hidden email] wrote:
> > > On Tue, Nov 17, 2015 at 10:38:41AM +0100, Jan Stary wrote:
> > > > I am not a native speaker, but the conversion specifiers
> > > > are "interpreted" by printf, not "interpolated", right?
> > > >
> > > >   Jan
> > > >
> > >
> > > i don;t know how these implementations work, so it's hard to say.
> > > perhaps they are interpolated. maybe use cvs to track down the author
> > > and ask them?
> > >
> > > whatever the outcome, if you want to change this text you probably want
> > > to adjust a few more:
> > >
> > > /usr/src/lib/libc/gen/err.3:for later interpolation by the
> > > /usr/src/lib/libc/gen/setproctitle.3:for later interpolation by
> > > /usr/src/lib/libc/gen/syslog.3:for later interpolation by
> > > /usr/src/lib/libc/stdio/printf.3:for later interpolation by
> >
> > Hm, probably just my English;
> > sorry for the noise.
> >
> >       Jan
> >
>
> not neccessarily. the author may have been confused too. who knows. i
> had to look up "interpolation" myself. it's a word i'd prefer to avoid
> in man pages if we can ;)
>
>
jan is right, interpretation is the correct word. Interpolate is using
something to do mathematically. the program is going to work on, so
interpret...
Reply | Threaded
Open this post in threaded view
|

Re: printf(3) wording

Theo de Raadt
In reply to this post by Ted Unangst-6
> > > > i don;t know how these implementations work, so it's hard to say.
> > > > perhaps they are interpolated. maybe use cvs to track down the author
> > > > and ask them?
> > > >
> > > > whatever the outcome, if you want to change this text you probably want
> > > > to adjust a few more:
> > > >
> > > > /usr/src/lib/libc/gen/err.3:for later interpolation by the
> > > > /usr/src/lib/libc/gen/setproctitle.3:for later interpolation by
> > > > /usr/src/lib/libc/gen/syslog.3:for later interpolation by
> > > > /usr/src/lib/libc/stdio/printf.3:for later interpolation by
> > >
> > > Hm, probably just my English;
> > > sorry for the noise.
> > >
> > > Jan
> > >
> >
> > not neccessarily. the author may have been confused too. who knows. i
> > had to look up "interpolation" myself. it's a word i'd prefer to avoid
> > in man pages if we can ;)
>
> interpretation is the correct word to use.

another option is "expansion"

Reply | Threaded
Open this post in threaded view
|

Re: printf(3) wording

Richard Toohey
In reply to this post by Amit Kulkarni-5
On 11/18/15 07:16, Amit Kulkarni wrote:
>
> jan is right, interpretation is the correct word. Interpolate is using
> something to do mathematically. the program is going to work on, so
> interpret...
>
Interpolate is a word I picked up when learning Perl and to do with
strings, not just mathematically:

https://en.wikipedia.org/wiki/String_interpolation

I'm not arguing for either word being better, I'll leave that to others.

Reply | Threaded
Open this post in threaded view
|

Re: printf(3) wording

Christian Weisgerber
In reply to this post by Jan Stary
On 2015-11-17, Jan Stary <[hidden email]> wrote:

> I am not a native speaker, but the conversion specifiers
> are "interpreted" by printf, not "interpolated", right?

I think "interpolated" as a technical term is correct here.
(The Perl documentation is very fond of it.)

>  using a function like
>  .Fn snprintf ,
>  as the resulting string may still contain user-supplied conversion specifiers
> -for later interpolation by
> +for later interpretation by
>  .Fn printf .
>  .Pp
>  Be sure to use the proper secure idiom:

--
Christian "naddy" Weisgerber                          [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: printf(3) wording

Philip Guenther-2
On Tue, Nov 17, 2015 at 11:48 AM, Christian Weisgerber
<[hidden email]> wrote:
> On 2015-11-17, Jan Stary <[hidden email]> wrote:
>
>> I am not a native speaker, but the conversion specifiers
>> are "interpreted" by printf, not "interpolated", right?
>
> I think "interpolated" as a technical term is correct here.
> (The Perl documentation is very fond of it.)

Well, in perl that's in the context of expansion of variable
references inside quote operators, where the evaluated result has the
references inserted in theirs positions in the quote context.

In the context of printf(3), what will be interp*ed here is not the
conversion specifiers themselves but the strings that will result from
their processing.  I would therefore say that the conversion
specifiers are interpreted.

Note that the perlfunc(1) section on perl's sprintf() built-in talks
of the interpretation of the format letters, what printf(3) calls
conversions.


Put me firmly in the "interpreted" camp for this.


Philip Guenther