These are wireless bluetooth headphones. I find the fact that they do... um... have a wire... but it just goes around in a circle adorable.

This must be how my dad felt when I used to borrow his old reverse Polish notation calculator then programed my TI to do arithmetic the same way.

(Also if it's called "reverse Polish notation" wouldn't that imply "Polish notation" is just doing it the normal way?)

Follow

@futurebird Apologies if I'm telling you things you already know, but since you asked...

"The normal way" is infix (2 + 3), as in C, Java, and Python. Polish notation is prefix (+ 2 3), as in Lisp. RPN is postfix (2 3 +), as in PostScript, Forth, and old HP calculators.

I've heard that it's only called "Polish" because English-speaking mathematicians couldn't pronounce "Łukasiewicz", but that may be apocryphal.

Bonus tidbits:

It is argued that both prefix and postfix are better than infix, because you don't need parentheses or operator precedence rules. * + 2 3 4 is unambiguous, but without precedence rules 2 + 3 * 4 could mean (2 + 3) * 4 or 2 + (3 * 4).

Ironically, Lisp is mocked for seeming to consist entirely of parentheses. (This is because the previous statement doesn't hold with variable-arity functions.)

@peterdrake @futurebird if you want to see a prefix (so "Polish notation") programming language with (almost) no parenthesis, check out uiua:

uiua.org/

Parenthesis are only used for defining anonymous functions, since they are not needed to indicate precedence

@peterdrake
RPNCalc on Android is all I can use having lived my working life with an HP41c

@futurebird @trabern

@peterdrake @futurebird
Yes, RPN is called 'Polish' Notation because people could not pronounce 'Łukasiewicz'. And since dealing with operator precedence is difficult in parsing, one usually converts an infix expression to postfix before evaluating it. Evaluating postfix is simple using a stack! We make our students in computer science learn how to do this.

@peterdrake @futurebird “need parentheses” isn't a great way to think about it. Parentheses are great documentation.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.