9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Why Plan 9 uses $ifs instead of $IFS?
@ 2017-10-17 14:38 Giacomo Tesio
  2017-10-17 14:39 ` Dan Cross
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Giacomo Tesio @ 2017-10-17 14:38 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

Out of curiosity, do anybody know why Plan9 designers chose lowercase
variables over uppercase ones?

At first, given the different conventions between rc and sh (eg $path is an
array, while $PATH is a string), I supposed Plan 9 designers wanted to
prevent conflict with unix tools relying to the older conventions.

However, I'm not sure this was the main reason, as this also open to subtle
issues: if a unix shell modifies $IFS and then invoke an rc script, such
script will ignore the change and keep using the previous $ifs.


As far as I can see, APE does not attempt any translation between the two
conventions, so maybe I'm just missing something obvious...


Do anyone know what considerations led to such design decision?


Giacomo

[-- Attachment #2: Type: text/html, Size: 877 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 14:38 [9fans] Why Plan 9 uses $ifs instead of $IFS? Giacomo Tesio
@ 2017-10-17 14:39 ` Dan Cross
  2017-10-17 15:05   ` Giacomo Tesio
  2017-10-17 15:46 ` Teodoro Santoni
  2017-10-17 18:28 ` Anthony Martin
  2 siblings, 1 reply; 16+ messages in thread
From: Dan Cross @ 2017-10-17 14:39 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Tue, Oct 17, 2017 at 10:38 AM, Giacomo Tesio <giacomo@tesio.it> wrote:
> Out of curiosity, do anybody know why Plan9 designers chose lowercase
> variables over uppercase ones?
>
> At first, given the different conventions between rc and sh (eg $path is an
> array, while $PATH is a string), I supposed Plan 9 designers wanted to
> prevent conflict with unix tools relying to the older conventions.
>
> However, I'm not sure this was the main reason, as this also open to subtle
> issues: if a unix shell modifies $IFS and then invoke an rc script, such
> script will ignore the change and keep using the previous $ifs.
>
>
> As far as I can see, APE does not attempt any translation between the two
> conventions, so maybe I'm just missing something obvious...
>
>
> Do anyone know what considerations led to such design decision?

Aesthetics.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 14:39 ` Dan Cross
@ 2017-10-17 15:05   ` Giacomo Tesio
  2017-10-17 15:18     ` Charles Forsyth
  2017-10-17 16:00     ` Skip Tavakkolian
  0 siblings, 2 replies; 16+ messages in thread
From: Giacomo Tesio @ 2017-10-17 15:05 UTC (permalink / raw)


Really? Just aesthetics? :-o
I supposed it had some practical goal I was missing, since for example the
original Rc paper still referred to $IFS.

This would flips the question a bit: I wonder why the same designers chose
uppercase variable names while designing Unix... :-)


Giacomo

2017-10-17 16:39 GMT+02:00 Dan Cross <crossd at gmail.com>:

> On Tue, Oct 17, 2017 at 10:38 AM, Giacomo Tesio <giacomo at tesio.it> wrote:
> > Out of curiosity, do anybody know why Plan9 designers chose lowercase
> > variables over uppercase ones?
> >
> > At first, given the different conventions between rc and sh (eg $path is
> an
> > array, while $PATH is a string), I supposed Plan 9 designers wanted to
> > prevent conflict with unix tools relying to the older conventions.
> >
> > However, I'm not sure this was the main reason, as this also open to
> subtle
> > issues: if a unix shell modifies $IFS and then invoke an rc script, such
> > script will ignore the change and keep using the previous $ifs.
> >
> >
> > As far as I can see, APE does not attempt any translation between the two
> > conventions, so maybe I'm just missing something obvious...
> >
> >
> > Do anyone know what considerations led to such design decision?
>
> Aesthetics.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.9fans.net/private/9fans/attachments/20171017/e0421a57/attachment.html>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 15:05   ` Giacomo Tesio
@ 2017-10-17 15:18     ` Charles Forsyth
  2017-10-17 15:45       ` Giacomo Tesio
  2017-10-17 16:00     ` Skip Tavakkolian
  1 sibling, 1 reply; 16+ messages in thread
From: Charles Forsyth @ 2017-10-17 15:18 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1574 bytes --]

>
> since for example the original Rc paper still referred to $IFS.


really? the only references to IFS I can find are in comparisons of $ifs to
the Bourne shell's $IFS

On 17 October 2017 at 16:05, Giacomo Tesio <giacomo@tesio.it> wrote:

> Really? Just aesthetics? :-o
> I supposed it had some practical goal I was missing, since for example the
> original Rc paper still referred to $IFS.
>
> This would flips the question a bit: I wonder why the same designers chose
> uppercase variable names while designing Unix... :-)
>
>
> Giacomo
>
> 2017-10-17 16:39 GMT+02:00 Dan Cross <crossd@gmail.com>:
>
>> On Tue, Oct 17, 2017 at 10:38 AM, Giacomo Tesio <giacomo@tesio.it> wrote:
>> > Out of curiosity, do anybody know why Plan9 designers chose lowercase
>> > variables over uppercase ones?
>> >
>> > At first, given the different conventions between rc and sh (eg $path
>> is an
>> > array, while $PATH is a string), I supposed Plan 9 designers wanted to
>> > prevent conflict with unix tools relying to the older conventions.
>> >
>> > However, I'm not sure this was the main reason, as this also open to
>> subtle
>> > issues: if a unix shell modifies $IFS and then invoke an rc script, such
>> > script will ignore the change and keep using the previous $ifs.
>> >
>> >
>> > As far as I can see, APE does not attempt any translation between the
>> two
>> > conventions, so maybe I'm just missing something obvious...
>> >
>> >
>> > Do anyone know what considerations led to such design decision?
>>
>> Aesthetics.
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 2658 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 15:18     ` Charles Forsyth
@ 2017-10-17 15:45       ` Giacomo Tesio
  2017-10-17 16:04         ` Giacomo Tesio
  0 siblings, 1 reply; 16+ messages in thread
From: Giacomo Tesio @ 2017-10-17 15:45 UTC (permalink / raw)


>
> In *rc* you use quotation marks when you want a syntax character to
> appear in an argument, or an argument that is the empty string, and at no
> other time. IFS is no longer used, *except in the one case where it was
> indispensable*: converting command output into argument lists during
> command substitution.


So, I undestood: it used to use IFS in that one case.

I got it now: the fact that IFS was named ifs was not a relevant for the
discourse, and thus omitted.

Still I'm a bit surprised that such change in the conventions provides no
practical advantage: the taste changes with age, but costs accumulate... :-)


BTW, thanks for your answers!


Giacomo


2017-10-17 17:18 GMT+02:00 Charles Forsyth <charles.forsyth at gmail.com>:

> since for example the original Rc paper still referred to $IFS.
>
>
> really? the only references to IFS I can find are in comparisons of $ifs
> to the Bourne shell's $IFS
>
> On 17 October 2017 at 16:05, Giacomo Tesio <giacomo at tesio.it> wrote:
>
>> Really? Just aesthetics? :-o
>> I supposed it had some practical goal I was missing, since for example
>> the original Rc paper still referred to $IFS.
>>
>> This would flips the question a bit: I wonder why the same designers
>> chose uppercase variable names while designing Unix... :-)
>>
>>
>> Giacomo
>>
>> 2017-10-17 16:39 GMT+02:00 Dan Cross <crossd at gmail.com>:
>>
>>> On Tue, Oct 17, 2017 at 10:38 AM, Giacomo Tesio <giacomo at tesio.it>
>>> wrote:
>>> > Out of curiosity, do anybody know why Plan9 designers chose lowercase
>>> > variables over uppercase ones?
>>> >
>>> > At first, given the different conventions between rc and sh (eg $path
>>> is an
>>> > array, while $PATH is a string), I supposed Plan 9 designers wanted to
>>> > prevent conflict with unix tools relying to the older conventions.
>>> >
>>> > However, I'm not sure this was the main reason, as this also open to
>>> subtle
>>> > issues: if a unix shell modifies $IFS and then invoke an rc script,
>>> such
>>> > script will ignore the change and keep using the previous $ifs.
>>> >
>>> >
>>> > As far as I can see, APE does not attempt any translation between the
>>> two
>>> > conventions, so maybe I'm just missing something obvious...
>>> >
>>> >
>>> > Do anyone know what considerations led to such design decision?
>>>
>>> Aesthetics.
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.9fans.net/private/9fans/attachments/20171017/5316f142/attachment-0001.html>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 14:38 [9fans] Why Plan 9 uses $ifs instead of $IFS? Giacomo Tesio
  2017-10-17 14:39 ` Dan Cross
@ 2017-10-17 15:46 ` Teodoro Santoni
  2017-10-17 18:28 ` Anthony Martin
  2 siblings, 0 replies; 16+ messages in thread
From: Teodoro Santoni @ 2017-10-17 15:46 UTC (permalink / raw)


Hi,

2017-10-17 16:38 GMT+02:00, Giacomo Tesio <giacomo at tesio.it>:
> Out of curiosity, do anybody know why Plan9 designers chose lowercase
> variables over uppercase ones?
>
> At first, given the different conventions between rc and sh (eg $path is an
> array, while $PATH is a string), I supposed Plan 9 designers wanted to
> prevent conflict with unix tools relying to the older conventions.
>
> However, I'm not sure this was the main reason, as this also open to subtle
> issues: if a unix shell modifies $IFS and then invoke an rc script, such
> script will ignore the change and keep using the previous $ifs.
>
>
> As far as I can see, APE does not attempt any translation between the two
> conventions, so maybe I'm just missing something obvious...
>
>
> Do anyone know what considerations led to such design decision?
>
>
> Giacomo
>


Probably a matter of taste and different user behaviours, plan9
developers weren't just the same developers from unix.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 15:05   ` Giacomo Tesio
  2017-10-17 15:18     ` Charles Forsyth
@ 2017-10-17 16:00     ` Skip Tavakkolian
  2017-10-17 16:22       ` Giacomo Tesio
  1 sibling, 1 reply; 16+ messages in thread
From: Skip Tavakkolian @ 2017-10-17 16:00 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]

On Tue, Oct 17, 2017, 8:05 AM Giacomo Tesio <giacomo@tesio.it> wrote:

> Really? Just aesthetics? :-o
>


> This would flips the question a bit: I wonder why the same designers chose
> uppercase variable names while designing Unix... :-)
>

Programs can evolve, why not names? There was no expectation that sh
scripts would work in rc.


>
> Giacomo
>
> 2017-10-17 16:39 GMT+02:00 Dan Cross <crossd@gmail.com>:
>
>> On Tue, Oct 17, 2017 at 10:38 AM, Giacomo Tesio <giacomo@tesio.it> wrote:
>> > Out of curiosity, do anybody know why Plan9 designers chose lowercase
>> > variables over uppercase ones?
>> >
>> > At first, given the different conventions between rc and sh (eg $path
>> is an
>> > array, while $PATH is a string), I supposed Plan 9 designers wanted to
>> > prevent conflict with unix tools relying to the older conventions.
>> >
>> > However, I'm not sure this was the main reason, as this also open to
>> subtle
>> > issues: if a unix shell modifies $IFS and then invoke an rc script, such
>> > script will ignore the change and keep using the previous $ifs.
>> >
>> >
>> > As far as I can see, APE does not attempt any translation between the
>> two
>> > conventions, so maybe I'm just missing something obvious...
>> >
>> >
>> > Do anyone know what considerations led to such design decision?
>>
>> Aesthetics.
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 2475 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 15:45       ` Giacomo Tesio
@ 2017-10-17 16:04         ` Giacomo Tesio
  2017-10-17 17:35           ` Dan Cross
  2017-10-17 22:32           ` Tiago Natel
  0 siblings, 2 replies; 16+ messages in thread
From: Giacomo Tesio @ 2017-10-17 16:04 UTC (permalink / raw)


Also, why NPROC has been left uppercase? :-)


Giacomo

2017-10-17 17:45 GMT+02:00 Giacomo Tesio <giacomo at tesio.it>:

> In *rc* you use quotation marks when you want a syntax character to
>> appear in an argument, or an argument that is the empty string, and at no
>> other time. IFS is no longer used, *except in the one case where it was
>> indispensable*: converting command output into argument lists during
>> command substitution.
>
>
> So, I undestood: it used to use IFS in that one case.
>
> I got it now: the fact that IFS was named ifs was not a relevant for the
> discourse, and thus omitted.
>
> Still I'm a bit surprised that such change in the conventions provides no
> practical advantage: the taste changes with age, but costs accumulate... :-)
>
>
> BTW, thanks for your answers!
>
>
> Giacomo
>
>
> 2017-10-17 17:18 GMT+02:00 Charles Forsyth <charles.forsyth at gmail.com>:
>
>> since for example the original Rc paper still referred to $IFS.
>>
>>
>> really? the only references to IFS I can find are in comparisons of $ifs
>> to the Bourne shell's $IFS
>>
>> On 17 October 2017 at 16:05, Giacomo Tesio <giacomo at tesio.it> wrote:
>>
>>> Really? Just aesthetics? :-o
>>> I supposed it had some practical goal I was missing, since for example
>>> the original Rc paper still referred to $IFS.
>>>
>>> This would flips the question a bit: I wonder why the same designers
>>> chose uppercase variable names while designing Unix... :-)
>>>
>>>
>>> Giacomo
>>>
>>> 2017-10-17 16:39 GMT+02:00 Dan Cross <crossd at gmail.com>:
>>>
>>>> On Tue, Oct 17, 2017 at 10:38 AM, Giacomo Tesio <giacomo at tesio.it>
>>>> wrote:
>>>> > Out of curiosity, do anybody know why Plan9 designers chose lowercase
>>>> > variables over uppercase ones?
>>>> >
>>>> > At first, given the different conventions between rc and sh (eg $path
>>>> is an
>>>> > array, while $PATH is a string), I supposed Plan 9 designers wanted to
>>>> > prevent conflict with unix tools relying to the older conventions.
>>>> >
>>>> > However, I'm not sure this was the main reason, as this also open to
>>>> subtle
>>>> > issues: if a unix shell modifies $IFS and then invoke an rc script,
>>>> such
>>>> > script will ignore the change and keep using the previous $ifs.
>>>> >
>>>> >
>>>> > As far as I can see, APE does not attempt any translation between the
>>>> two
>>>> > conventions, so maybe I'm just missing something obvious...
>>>> >
>>>> >
>>>> > Do anyone know what considerations led to such design decision?
>>>>
>>>> Aesthetics.
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.9fans.net/private/9fans/attachments/20171017/65552e08/attachment.html>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 16:00     ` Skip Tavakkolian
@ 2017-10-17 16:22       ` Giacomo Tesio
  0 siblings, 0 replies; 16+ messages in thread
From: Giacomo Tesio @ 2017-10-17 16:22 UTC (permalink / raw)


2017-10-17 18:00 GMT+02:00 Skip Tavakkolian <skip.tavakkolian at gmail.com>:

> On Tue, Oct 17, 2017, 8:05 AM Giacomo Tesio <giacomo at tesio.it> wrote:
>
>> Really? Just aesthetics? :-o
>>
>
>
>> This would flips the question a bit: I wonder why the same designers
>> chose uppercase variable names while designing Unix... :-)
>>
>
> Programs can evolve, why not names? There was no expectation that sh
> scripts would work in rc.
>


They can! For sure! But usually they evolve towards a goal... and I'm a
curious person.. :-)

Also this is not about sh scripts run by rc, but sh script run by an sh
shell started by rc.
Or, rc scripts run by an rc shell invoked by an sh.

Just to explain, for example, you could have an sh script that changes
$USER and then invoke psu that would keep using the previous $user.


Giacomo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.9fans.net/private/9fans/attachments/20171017/900fd815/attachment-0001.html>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 16:04         ` Giacomo Tesio
@ 2017-10-17 17:35           ` Dan Cross
  2017-10-17 22:32           ` Tiago Natel
  1 sibling, 0 replies; 16+ messages in thread
From: Dan Cross @ 2017-10-17 17:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Tue, Oct 17, 2017 at 12:04 PM, Giacomo Tesio <giacomo@tesio.it> wrote:
> Also, why NPROC has been left uppercase? :-)

I once had a mathematics professor who advised me not to look for
rationality or logic in nomenclature. I've found that, since taking
this advice to heart, my life is much less stressful.

        - Dan C.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 14:38 [9fans] Why Plan 9 uses $ifs instead of $IFS? Giacomo Tesio
  2017-10-17 14:39 ` Dan Cross
  2017-10-17 15:46 ` Teodoro Santoni
@ 2017-10-17 18:28 ` Anthony Martin
  2017-10-17 21:12   ` Jules Merit
  2 siblings, 1 reply; 16+ messages in thread
From: Anthony Martin @ 2017-10-17 18:28 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Note that variables in the Mashey shell were single letters
in lower-case. $p was similar to $PATH in the Bourne shell.

Maybe Tom just split the difference. Have you asked him? :)

  Anthony



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 18:28 ` Anthony Martin
@ 2017-10-17 21:12   ` Jules Merit
  2017-10-17 21:45     ` Jules Merit
  0 siblings, 1 reply; 16+ messages in thread
From: Jules Merit @ 2017-10-17 21:12 UTC (permalink / raw)


0x80000000 ... obviously it wastes time when running plan9 as RTL in a
HDL simulator.

On Tue, Oct 17, 2017 at 11:28 AM, Anthony Martin <ality at pbrane.org> wrote:
> Note that variables in the Mashey shell were single letters
> in lower-case. $p was similar to $PATH in the Bourne shell.
>
> Maybe Tom just split the difference. Have you asked him? :)
>
>   Anthony
>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 21:12   ` Jules Merit
@ 2017-10-17 21:45     ` Jules Merit
  2017-10-17 21:49       ` Jules Merit
  0 siblings, 1 reply; 16+ messages in thread
From: Jules Merit @ 2017-10-17 21:45 UTC (permalink / raw)


E4M1 Charles, doooom
E3M8 Dis 9/11

On Tue, Oct 17, 2017 at 2:12 PM, Jules Merit
<jules.merit.eurocorp.us at gmail.com> wrote:
> 0x80000000 ... obviously it wastes time when running plan9 as RTL in a
> HDL simulator.
>
> On Tue, Oct 17, 2017 at 11:28 AM, Anthony Martin <ality at pbrane.org> wrote:
>> Note that variables in the Mashey shell were single letters
>> in lower-case. $p was similar to $PATH in the Bourne shell.
>>
>> Maybe Tom just split the difference. Have you asked him? :)
>>
>>   Anthony
>>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 21:45     ` Jules Merit
@ 2017-10-17 21:49       ` Jules Merit
  2017-10-17 22:18         ` Charles Forsyth
  0 siblings, 1 reply; 16+ messages in thread
From: Jules Merit @ 2017-10-17 21:49 UTC (permalink / raw)


Gun Control UTF8, sgi 0xfbc bowling for columbine

On Tue, Oct 17, 2017 at 2:45 PM, Jules Merit
<jules.merit.eurocorp.us at gmail.com> wrote:
> E4M1 Charles, doooom
> E3M8 Dis 9/11
>
> On Tue, Oct 17, 2017 at 2:12 PM, Jules Merit
> <jules.merit.eurocorp.us at gmail.com> wrote:
>> 0x80000000 ... obviously it wastes time when running plan9 as RTL in a
>> HDL simulator.
>>
>> On Tue, Oct 17, 2017 at 11:28 AM, Anthony Martin <ality at pbrane.org> wrote:
>>> Note that variables in the Mashey shell were single letters
>>> in lower-case. $p was similar to $PATH in the Bourne shell.
>>>
>>> Maybe Tom just split the difference. Have you asked him? :)
>>>
>>>   Anthony
>>>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 21:49       ` Jules Merit
@ 2017-10-17 22:18         ` Charles Forsyth
  0 siblings, 0 replies; 16+ messages in thread
From: Charles Forsyth @ 2017-10-17 22:18 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]

WAT! or should that be "wat!"

On 17 October 2017 at 22:49, Jules Merit <jules.merit.eurocorp.us@gmail.com>
wrote:

> Gun Control UTF8, sgi 0xfbc bowling for columbine
>
> On Tue, Oct 17, 2017 at 2:45 PM, Jules Merit
> <jules.merit.eurocorp.us@gmail.com> wrote:
> > E4M1 Charles, doooom
> > E3M8 Dis 9/11
> >
> > On Tue, Oct 17, 2017 at 2:12 PM, Jules Merit
> > <jules.merit.eurocorp.us@gmail.com> wrote:
> >> 0x80000000 ... obviously it wastes time when running plan9 as RTL in a
> >> HDL simulator.
> >>
> >> On Tue, Oct 17, 2017 at 11:28 AM, Anthony Martin <ality@pbrane.org>
> wrote:
> >>> Note that variables in the Mashey shell were single letters
> >>> in lower-case. $p was similar to $PATH in the Bourne shell.
> >>>
> >>> Maybe Tom just split the difference. Have you asked him? :)
> >>>
> >>>   Anthony
> >>>
>
>

[-- Attachment #2: Type: text/html, Size: 1531 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [9fans] Why Plan 9 uses $ifs instead of $IFS?
  2017-10-17 16:04         ` Giacomo Tesio
  2017-10-17 17:35           ` Dan Cross
@ 2017-10-17 22:32           ` Tiago Natel
  1 sibling, 0 replies; 16+ messages in thread
From: Tiago Natel @ 2017-10-17 22:32 UTC (permalink / raw)


AFAIK, NPROC is a env variable of mk.

On Oct 17, 2017 13:08, "Giacomo Tesio" <giacomo at tesio.it> wrote:

> Also, why NPROC has been left uppercase? :-)
>
>
> Giacomo
>
> 2017-10-17 17:45 GMT+02:00 Giacomo Tesio <giacomo at tesio.it>:
>
>> In *rc* you use quotation marks when you want a syntax character to
>>> appear in an argument, or an argument that is the empty string, and at no
>>> other time. IFS is no longer used, *except in the one case where it was
>>> indispensable*: converting command output into argument lists during
>>> command substitution.
>>
>>
>> So, I undestood: it used to use IFS in that one case.
>>
>> I got it now: the fact that IFS was named ifs was not a relevant for the
>> discourse, and thus omitted.
>>
>> Still I'm a bit surprised that such change in the conventions provides no
>> practical advantage: the taste changes with age, but costs accumulate... :-)
>>
>>
>> BTW, thanks for your answers!
>>
>>
>> Giacomo
>>
>>
>> 2017-10-17 17:18 GMT+02:00 Charles Forsyth <charles.forsyth at gmail.com>:
>>
>>> since for example the original Rc paper still referred to $IFS.
>>>
>>>
>>> really? the only references to IFS I can find are in comparisons of $ifs
>>> to the Bourne shell's $IFS
>>>
>>> On 17 October 2017 at 16:05, Giacomo Tesio <giacomo at tesio.it> wrote:
>>>
>>>> Really? Just aesthetics? :-o
>>>> I supposed it had some practical goal I was missing, since for example
>>>> the original Rc paper still referred to $IFS.
>>>>
>>>> This would flips the question a bit: I wonder why the same designers
>>>> chose uppercase variable names while designing Unix... :-)
>>>>
>>>>
>>>> Giacomo
>>>>
>>>> 2017-10-17 16:39 GMT+02:00 Dan Cross <crossd at gmail.com>:
>>>>
>>>>> On Tue, Oct 17, 2017 at 10:38 AM, Giacomo Tesio <giacomo at tesio.it>
>>>>> wrote:
>>>>> > Out of curiosity, do anybody know why Plan9 designers chose lowercase
>>>>> > variables over uppercase ones?
>>>>> >
>>>>> > At first, given the different conventions between rc and sh (eg
>>>>> $path is an
>>>>> > array, while $PATH is a string), I supposed Plan 9 designers wanted
>>>>> to
>>>>> > prevent conflict with unix tools relying to the older conventions.
>>>>> >
>>>>> > However, I'm not sure this was the main reason, as this also open to
>>>>> subtle
>>>>> > issues: if a unix shell modifies $IFS and then invoke an rc script,
>>>>> such
>>>>> > script will ignore the change and keep using the previous $ifs.
>>>>> >
>>>>> >
>>>>> > As far as I can see, APE does not attempt any translation between
>>>>> the two
>>>>> > conventions, so maybe I'm just missing something obvious...
>>>>> >
>>>>> >
>>>>> > Do anyone know what considerations led to such design decision?
>>>>>
>>>>> Aesthetics.
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.9fans.net/private/9fans/attachments/20171017/ba8e3a0e/attachment-0001.html>


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-10-17 22:32 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17 14:38 [9fans] Why Plan 9 uses $ifs instead of $IFS? Giacomo Tesio
2017-10-17 14:39 ` Dan Cross
2017-10-17 15:05   ` Giacomo Tesio
2017-10-17 15:18     ` Charles Forsyth
2017-10-17 15:45       ` Giacomo Tesio
2017-10-17 16:04         ` Giacomo Tesio
2017-10-17 17:35           ` Dan Cross
2017-10-17 22:32           ` Tiago Natel
2017-10-17 16:00     ` Skip Tavakkolian
2017-10-17 16:22       ` Giacomo Tesio
2017-10-17 15:46 ` Teodoro Santoni
2017-10-17 18:28 ` Anthony Martin
2017-10-17 21:12   ` Jules Merit
2017-10-17 21:45     ` Jules Merit
2017-10-17 21:49       ` Jules Merit
2017-10-17 22:18         ` Charles Forsyth

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 NNTP newsgroup(s).