The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* Re: [TUHS] RPN (was The most surprising Unix programs)
@ 2020-03-20 23:15 Doug McIlroy
  2020-03-21  0:40 ` Rob Pike
  2020-03-21  0:43 ` Grant Taylor via TUHS
  0 siblings, 2 replies; 3+ messages in thread
From: Doug McIlroy @ 2020-03-20 23:15 UTC (permalink / raw)
  To: tuhs

Sorry to flog this topic, but the two examples below are an
unfair comparison. What happened to the multiplications in the
second?  And  two of the [enter]s in the first are unnecessary.
Ironically three of the four operations in the second are
actually reverse Polish!  If you had to utter sqrt first,
as we do on paper and in speech, things wouldn't look so great.

[a] [enter]
[a] [enter]
[multiply]
[b] [enter]
[b] [enter]
[multiply]
[add]
[square root]


[a]
[square]
[plus]
[b]
[square]
[square root]

Doug

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

* Re: [TUHS] RPN (was The most surprising Unix programs)
  2020-03-20 23:15 [TUHS] RPN (was The most surprising Unix programs) Doug McIlroy
@ 2020-03-21  0:40 ` Rob Pike
  2020-03-21  0:43 ` Grant Taylor via TUHS
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Pike @ 2020-03-21  0:40 UTC (permalink / raw)
  To: Doug McIlroy; +Cc: The Eunuchs Hysterical Society

Oh, flog away.

RPN works for me because the thing on the screen is usually the value
so far. I get to think about what to do with what I've got in my hand.
Equation-driven expression doesn't flow like that. As a calculator, as
opposed to an equation evaluator, it's RPN for me.

-rob

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

* Re: [TUHS] RPN (was The most surprising Unix programs)
  2020-03-20 23:15 [TUHS] RPN (was The most surprising Unix programs) Doug McIlroy
  2020-03-21  0:40 ` Rob Pike
@ 2020-03-21  0:43 ` Grant Taylor via TUHS
  1 sibling, 0 replies; 3+ messages in thread
From: Grant Taylor via TUHS @ 2020-03-21  0:43 UTC (permalink / raw)
  To: tuhs

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

On 3/20/20 5:15 PM, Doug McIlroy wrote:
> Sorry to flog this topic, but the two examples below are an unfair 
> comparison. What happened to the multiplications in the second?

Are you referring to the second {a,b} and the subsequent multiply?  (I'm 
presuming so until corrected otherwise.)  I think that is addressed by 
the square operation.

> And  two of the [enter]s in the first are unnecessary.

Which two?  The enter before the multiplies?

Seeing as how I'm trying to learn from the collective experience of 
TUHS, would you please elaborate or reproduce what you believe to be the 
correct key sequences?

> Ironically three of the four operations in the second are actually 
> reverse Polish!  If you had to utter sqrt first, as we do on paper 
> and in speech, things wouldn't look so great.

Hum.... :-/



-- 
Grant. . . .
unix || die


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4013 bytes --]

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

end of thread, other threads:[~2020-03-21  0:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-20 23:15 [TUHS] RPN (was The most surprising Unix programs) Doug McIlroy
2020-03-21  0:40 ` Rob Pike
2020-03-21  0:43 ` Grant Taylor via TUHS

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