Heh, recognized reverse polish notation right away. One of the companies I interviewed at last year had me program an RPN calculator fed by CSV spreadsheets. Weirdest thing I've made to date by a pretty wide margin.
"+ 41 1" more closely resembeles straight-up non-reverse Polish notation. Its cool property is that it has unambiguous grouping without parentheses.
Reverse Polish notation's even cooler property is that, in addition to the unambiguity, it can easily be evaluated from left to right with a stack: If you see a operand, push it onto the stack. If you see an operator, pop two operands off the stack, compute, and push the result onto the stack. By the end you'll have a one-element stack with your result.
Really what we're seeing here, though, is a language without infix operators: all functions are of the form "<name> <operand1> <operand2>…", but grouping still works as expected.
Heh, no. It was as a take home coding project (in my earlier and dumber years, I would never do this now). This was after one business and two technical phone screeners. Then after they reviewed my code, I was brought in for a marathon interview lasting from 9:30AM to 6:30PM on a Friday. I left for a wedding when they started their company wide "pizza and demo night". I imagine after this was done they pulled out cots and handed out stuffed animals and blankies to the bro's. In the end, I was so massively frustrated that I forced myself to nail everything they threw at me just so I could have the satisfaction of turning down their job offer, which I did.
Thanks matchu for the additional info on RPN. I didn't know about the stack evaluation benefit, that is very cool.