From mboxrd@z Thu Jan 1 00:00:00 1970 From: terry at jon.es (Terry Jones) Date: Fri, 20 Mar 2020 21:10:41 +0100 Subject: [COFF] The most surprising Unix programs In-Reply-To: References: <202003132331.02DNVaxN061501@tahoe.cs.Dartmouth.EDU> <7ec47fd97b1a3d383ffed428f21f5287@firemail.cc> <6D9CA6C2-BDF2-4BCA-9503-0F8415C594C9@guertin.net> <211b9d54-573c-05d3-2c60-e15a9fc0b86b@tnetconsulting.net> <202003201640.02KGerlG470796@darkstar.fourwinds.com> <0b0d0ba3-7eae-a844-cc9a-ae542edb302b@tnetconsulting.net> Message-ID: I also love RPN, dc, & the HP calculators. I wrote an RPN calculator in Python recently (I call it via a shell alias called pc). It imports much of the math, operator, and builtins modules, so you can use it just like dc, but with much more stuff available: $ pc 200 pi \* log10 sqrt 1.6727760963016285 You can push arbitrary Python objects and functions onto the stack. Install with pip install rpnpy Source at https://github.com/terrycojones/rpnpy Terry On Fri, Mar 20, 2020 at 8:48 PM Grant Taylor via COFF wrote: > On 3/20/20 1:43 PM, Grant Taylor via COFF wrote: > > What I think I'm hearing you say is that with RPN you were shouldering > > part of the computational load based on how you were entering things so > > that they aligned as necessary with the stack. Conversely, you were > > simply "plug and chug" (as I've heard elsewhere). Meaning you entered > > the equation / formula and were largely hands off from the calculation. > > I can see how this could be translated to RPN could cause someone to > feel like they have a better understanding of what's being calculated. > Conversely, infix notation leaving someone feeling separated from the > calculation and having much less of an understanding of what's being > calculated. > > This separation making it more likely that people will have problems > estimating and having any idea if what they're doing makes any sense or > not. > > > > -- > Grant. . . . > unix || die > > _______________________________________________ > COFF mailing list > COFF at minnie.tuhs.org > https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff > -------------- next part -------------- An HTML attachment was scrubbed... URL: