9front - general discussion about 9front
 help / color / mirror / Atom feed
* Re: [9front] new rc parser: do we want it?
       [not found] <01DB736907F1AF8292BF2D9C25564677@ewsd.inri.net>
@ 2020-10-07  4:46 ` ori
  2020-10-07 13:06   ` kvik
  0 siblings, 1 reply; 11+ messages in thread
From: ori @ 2020-10-07  4:46 UTC (permalink / raw)
  To: sl, 9front

>> and unquoted '=' is allowed after the
>> first word:
>>
>> echo a=b
> 
> fwiw, when aiju suggested this a couple years ago i made a
> big stink about how this breaks the predictable quoting
> rules, but if rsc is dispensing with regularity, i don't
> know what to say anymore.  i suppose it's just one more thing to
> remember.
> 
> sl

I agree. I'm not sure how I feel about making '=' parsing
stateful. It matters more in plan9port, where a lot of
tools these days expect:

	--long-fucking-arg-name=thing

The free caret handling is slighty more interesting to me,
I've been tripped up by x`{y} getting a caret, but `{y}x
not getting one -- and it feels messy.

I also find the yacc grammar more readable than the C
rewrite.



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

* Re: [9front] new rc parser: do we want it?
  2020-10-07  4:46 ` [9front] new rc parser: do we want it? ori
@ 2020-10-07 13:06   ` kvik
  0 siblings, 0 replies; 11+ messages in thread
From: kvik @ 2020-10-07 13:06 UTC (permalink / raw)
  To: 9front

> It matters more in plan9port

ssh(1) and os(1) arc the matters into 9front as well.

For me this is a great quality of life improvement, totally
worth the supposed break of predictability.

I've applied the patch and tested it on some of my more
horrible scripts.  Seems to work fine.


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

* Re: [9front] new rc parser: do we want it?
  2020-10-15 23:14         ` Roman Shaposhnik
@ 2020-10-15 23:32           ` Stanley Lieber
  0 siblings, 0 replies; 11+ messages in thread
From: Stanley Lieber @ 2020-10-15 23:32 UTC (permalink / raw)
  To: 9front

On October 15, 2020 7:14:50 PM EDT, Roman Shaposhnik <roman@shaposhnik.org> wrote:
>On Thu, Oct 15, 2020 at 10:23 AM Anthony Martin <ality@pbrane.org>
>wrote:
>>
>> Stanley Lieber <sl@stanleylieber.com> once said:
>> > rc's v10 online man page refers to it as "the plan 9 shell." my
>print
>> > edition is in storage, but i don't think it mentioned plan 9. the
>> > online version may represent a later extraction from the labs'
>running
>> > system. plan 9 was percolating at least as early as 1988. it's
>unclear
>> > exactly when rc was first written, but based on the timeline of
>> > releases it first shipped in v10.
>>
>> The v10 tree on TUHS has /vol2/rc/rc.ms¹ but it's dated 1993-06-19.
>> The title from that version is "Rc — A shell for Plan 9 and UNIX".
>>
>> I don't have a copy of the printed v10 manual to check what it
>> was in 1989/1990. I'd be curious to see what yours says.
>
>My printed Second Edition manual says:
>
>NAME
>   rc, cd, eval, exec... - command language
>SYNOPSIS
>   rc ...
>DESCRIPTION
>   Rc is the Plan 9 shell.
>
>Thanks,
>Roman.
>
>Thanks,
>Roman.

everyone:

i screwed up and cc'd rob on my post (thought better of it and forwarded him the message, but forgot to remove the cc -- this mailing list silently drops messages from addresses that are not suscribed). please don't cc him on every single reply.

thanks,

sl


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

* Re: [9front] new rc parser: do we want it?
  2020-10-15 17:22       ` Anthony Martin
@ 2020-10-15 23:14         ` Roman Shaposhnik
  2020-10-15 23:32           ` Stanley Lieber
  0 siblings, 1 reply; 11+ messages in thread
From: Roman Shaposhnik @ 2020-10-15 23:14 UTC (permalink / raw)
  To: 9front; +Cc: r

On Thu, Oct 15, 2020 at 10:23 AM Anthony Martin <ality@pbrane.org> wrote:
>
> Stanley Lieber <sl@stanleylieber.com> once said:
> > rc's v10 online man page refers to it as "the plan 9 shell." my print
> > edition is in storage, but i don't think it mentioned plan 9. the
> > online version may represent a later extraction from the labs' running
> > system. plan 9 was percolating at least as early as 1988. it's unclear
> > exactly when rc was first written, but based on the timeline of
> > releases it first shipped in v10.
>
> The v10 tree on TUHS has /vol2/rc/rc.ms¹ but it's dated 1993-06-19.
> The title from that version is "Rc — A shell for Plan 9 and UNIX".
>
> I don't have a copy of the printed v10 manual to check what it
> was in 1989/1990. I'd be curious to see what yours says.

My printed Second Edition manual says:

NAME
   rc, cd, eval, exec... - command language
SYNOPSIS
   rc ...
DESCRIPTION
   Rc is the Plan 9 shell.

Thanks,
Roman.

Thanks,
Roman.


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

* Re: [9front] new rc parser: do we want it?
  2020-10-15 12:11     ` Stanley Lieber
  2020-10-15 16:41       ` Romano
@ 2020-10-15 17:22       ` Anthony Martin
  2020-10-15 23:14         ` Roman Shaposhnik
  1 sibling, 1 reply; 11+ messages in thread
From: Anthony Martin @ 2020-10-15 17:22 UTC (permalink / raw)
  To: 9front; +Cc: r

Stanley Lieber <sl@stanleylieber.com> once said:
> rc's v10 online man page refers to it as "the plan 9 shell." my print
> edition is in storage, but i don't think it mentioned plan 9. the
> online version may represent a later extraction from the labs' running
> system. plan 9 was percolating at least as early as 1988. it's unclear
> exactly when rc was first written, but based on the timeline of
> releases it first shipped in v10.

The v10 tree on TUHS has /vol2/rc/rc.ms¹ but it's dated 1993-06-19.
The title from that version is "Rc — A shell for Plan 9 and UNIX".

I don't have a copy of the printed v10 manual to check what it
was in 1989/1990. I'd be curious to see what yours says.

  Anthony

1. https://www.tuhs.org/cgi-bin/utree.pl?file=V10/vol2/rc/rc.ms


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

* Re: [9front] new rc parser: do we want it?
  2020-10-15 12:11     ` Stanley Lieber
@ 2020-10-15 16:41       ` Romano
  2020-10-15 17:22       ` Anthony Martin
  1 sibling, 0 replies; 11+ messages in thread
From: Romano @ 2020-10-15 16:41 UTC (permalink / raw)
  To: 9front; +Cc: r

I probably didn't give enough context.

TUPE was referring to the Bourne shell, at least according to to page 100. So the comment is not referring to rc directly.

I brought it up because of what Duffy wrote in "Rc -- The Plan 9 Shell" under Design Principles (section 28), which discusses Rc's heavy reliance on Bourne's /bin/sh. I didn't see Duffy explicitly touch on why assignments anywhere in the command line were restricted, and so considered the parenthetical comment I found re: Bourne's shell to be the reason.

On October 15, 2020 12:11:10 PM UTC, Stanley Lieber <sl@stanleylieber.com> wrote:
>On October 15, 2020 6:11:13 AM EDT, Ethan Gardener
><eekee57@fastmail.fm> wrote:
>>On Mon, Oct 12, 2020, at 9:44 PM, Romano wrote:
>>> There is a parenthetical comment on page 90 of "The UNIX Programming
>
>>> Environment":
>>> "(Originally, assignments anywhere in the command line were passed
>to
>>
>>> the command, but this interfered with dd(1).)"
>>
>>So it was regular, initially. By the time I started to use Plan 9 &
>P9P
>>(2009 or so), it was broken. Rc was making errors of assignments after
>>the command word *and* dd's syntax was different. But Rc wouldn't have
>>been in TUPE, would it? I admit I never got around to reading it.
>
>if i understand correctly:
>
>tupe came out in 1984, and refers to rob's rewritten v8 sh[0].
>
>rc[1] first appeared in v10, and must have been developed around 1988
>or 1989.
>
>rc's v10 online man page refers to it as "the plan 9 shell." my print
>edition is in storage, but i don't think it mentioned plan 9. the
>online version may represent a later extraction from the labs' running
>system. plan 9 was percolating at least as early as 1988. it's unclear
>exactly when rc was first written, but based on the timeline of
>releases it first shipped in v10.
>
>sl
>
>[0] http://man.cat-v.org/unix_8th/1/sh
>[1] http://man.cat-v.org/unix_10th/1/rc


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

* Re: [9front] new rc parser: do we want it?
  2020-10-15 10:11   ` Ethan Gardener
@ 2020-10-15 12:11     ` Stanley Lieber
  2020-10-15 16:41       ` Romano
  2020-10-15 17:22       ` Anthony Martin
  0 siblings, 2 replies; 11+ messages in thread
From: Stanley Lieber @ 2020-10-15 12:11 UTC (permalink / raw)
  To: 9front; +Cc: r

On October 15, 2020 6:11:13 AM EDT, Ethan Gardener <eekee57@fastmail.fm> wrote:
>On Mon, Oct 12, 2020, at 9:44 PM, Romano wrote:
>> There is a parenthetical comment on page 90 of "The UNIX Programming 
>> Environment":
>> "(Originally, assignments anywhere in the command line were passed to
>
>> the command, but this interfered with dd(1).)"
>
>So it was regular, initially. By the time I started to use Plan 9 & P9P
>(2009 or so), it was broken. Rc was making errors of assignments after
>the command word *and* dd's syntax was different. But Rc wouldn't have
>been in TUPE, would it? I admit I never got around to reading it.

if i understand correctly:

tupe came out in 1984, and refers to rob's rewritten v8 sh[0].

rc[1] first appeared in v10, and must have been developed around 1988 or 1989.

rc's v10 online man page refers to it as "the plan 9 shell." my print edition is in storage, but i don't think it mentioned plan 9. the online version may represent a later extraction from the labs' running system. plan 9 was percolating at least as early as 1988. it's unclear exactly when rc was first written, but based on the timeline of releases it first shipped in v10.

sl

[0] http://man.cat-v.org/unix_8th/1/sh
[1] http://man.cat-v.org/unix_10th/1/rc



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

* Re: [9front] new rc parser: do we want it?
  2020-10-12 20:44 ` Romano
@ 2020-10-15 10:11   ` Ethan Gardener
  2020-10-15 12:11     ` Stanley Lieber
  0 siblings, 1 reply; 11+ messages in thread
From: Ethan Gardener @ 2020-10-15 10:11 UTC (permalink / raw)
  To: 9front

On Mon, Oct 12, 2020, at 9:44 PM, Romano wrote:
> There is a parenthetical comment on page 90 of "The UNIX Programming 
> Environment":
> "(Originally, assignments anywhere in the command line were passed to 
> the command, but this interfered with dd(1).)"

So it was regular, initially. By the time I started to use Plan 9 & P9P (2009 or so), it was broken. Rc was making errors of assignments after the command word *and* dd's syntax was different. But Rc wouldn't have been in TUPE, would it? I admit I never got around to reading it.


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

* Re: [9front] new rc parser: do we want it?
       [not found] <5EF01FE4B564E504DD635D7E391EE0C8@ewsd.inri.net>
@ 2020-10-12 20:44 ` Romano
  2020-10-15 10:11   ` Ethan Gardener
  0 siblings, 1 reply; 11+ messages in thread
From: Romano @ 2020-10-12 20:44 UTC (permalink / raw)
  To: 9front

There is a parenthetical comment on page 90 of "The UNIX Programming Environment":
"(Originally, assignments anywhere in the command line were passed to the command, but this interfered with dd(1).)"


On October 7, 2020 3:54:20 AM UTC, sl@stanleylieber.com wrote:
>> and unquoted '=' is allowed after the
>> first word:
>>
>> echo a=b
>
>fwiw, when aiju suggested this a couple years ago i made a
>big stink about how this breaks the predictable quoting
>rules, but if rsc is dispensing with regularity, i don't
>know what to say anymore.  i suppose it's just one more thing to
>remember.
>
>sl


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

* Re: [9front] new rc parser: do we want it?
       [not found] <1975289B8C108B2FCF360524D16AA25B@ewsd.inri.net>
@ 2020-10-07 10:00 ` Ethan Gardener
  0 siblings, 0 replies; 11+ messages in thread
From: Ethan Gardener @ 2020-10-07 10:00 UTC (permalink / raw)
  To: 9front

On Wed, Oct 7, 2020, at 4:54 AM, sl@stanleylieber.com wrote:
> > and unquoted '=' is allowed after the
> > first word:
> >
> > echo a=b
> 
> fwiw, when aiju suggested this a couple years ago i made a
> big stink about how this breaks the predictable quoting
> rules, but if rsc is dispensing with regularity, i don't
> know what to say anymore.  i suppose it's just one more thing to
> remember.

"this breaks the predictable quoting rules" has me a little concerned, but i'm not sure how it does. '=' behaves differently on either side of the first non-assignment word anyway. in the way i look at it, there's nothing to lose; it's already irregular. ;)

even if i'm wrong about that, i'd still be in favour of the change because the old way means urls typically break the convenience of 'send'. at one time, this was a big issue for me. still, my 9front use has dropped to nil, so my opinion's worth nothing unless anyone else feels the same. thinking about it just develops my forth ideas. i've got regular syntax, i can turn the rest of the line into a string and keep it on the stack to work with send (or even pull in the clipboard directly), but optional arguments are not so easy. ;) the fix is probably to break things down into even smaller parts.


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

* Re: [9front] new rc parser: do we want it?
  2020-10-07  3:15 ori
@ 2020-10-07  3:54 ` sl
  0 siblings, 0 replies; 11+ messages in thread
From: sl @ 2020-10-07  3:54 UTC (permalink / raw)
  To: 9front

> and unquoted '=' is allowed after the
> first word:
>
> echo a=b

fwiw, when aiju suggested this a couple years ago i made a
big stink about how this breaks the predictable quoting
rules, but if rsc is dispensing with regularity, i don't
know what to say anymore.  i suppose it's just one more thing to
remember.

sl


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

end of thread, other threads:[~2020-10-15 23:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <01DB736907F1AF8292BF2D9C25564677@ewsd.inri.net>
2020-10-07  4:46 ` [9front] new rc parser: do we want it? ori
2020-10-07 13:06   ` kvik
     [not found] <5EF01FE4B564E504DD635D7E391EE0C8@ewsd.inri.net>
2020-10-12 20:44 ` Romano
2020-10-15 10:11   ` Ethan Gardener
2020-10-15 12:11     ` Stanley Lieber
2020-10-15 16:41       ` Romano
2020-10-15 17:22       ` Anthony Martin
2020-10-15 23:14         ` Roman Shaposhnik
2020-10-15 23:32           ` Stanley Lieber
     [not found] <1975289B8C108B2FCF360524D16AA25B@ewsd.inri.net>
2020-10-07 10:00 ` Ethan Gardener
2020-10-07  3:15 ori
2020-10-07  3:54 ` [9front] " sl

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).