News for hackers. Stuff that matters.
Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by rarw on Friday August 30, 2013 @01:48PM (#6303130)
Reverse Polish Notation - sounds like the punch line to a really bad math joke
Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by eli on Friday August 30, 2013 @02:14PM (#6303294)
Allegedly the name "Polish Notation" stuck because nobody could pronounce its inventor's name: Jan Łukasiewicz
Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by roryokane on Friday August 30, 2013 @08:07PM (#6304948)
The correct pronunication is “John Wookuh-shev-eetch”, according to my decoding of the IPA notation [ˈjan wukaˈɕɛvʲitʂ] from Wikipedia (http://en.wikipedia.org/wiki/Jan_%C5%81ukasiewicz) using Wikipedia’s help page http://en.wikipedia.org/wiki/Help:IPA_for_Polish.
Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by Demagog on Saturday August 31, 2013 @02:14PM (#6307559)
Rather Ian with harder/stronger I than John. Well Polish it is not that hard. It's only second hardest language on the world (China I look at you) If it is hard for you. Well try to spell this thing correctly "Zażółć żółtą jaźń" or "Chrząszcz brzmi w trzcinie"

Sorry for OT.

All thing look really amaizing. I'd love to see more in this topic.

Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by wowaname on Friday August 30, 2013 @06:34PM (#6304638)
I'm gonna make a wallpaper right now with his name on it.
Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by rarw on Friday August 30, 2013 @06:18PM (#6304571)
Poor guy. I wonder how many light bulbs he had to screw in before people learned his name.
Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by nealabq on Friday August 30, 2013 @02:22PM (#6303347)
After I got used to RPN (I had a lovely old HP-21) I found it much more intuitive. Stack-based thinking. No parentheses! (And I've used LISP for years, but that's entirely different.)

RPN vs Infix/Algebraic used to be a holy-war topic. Like emacs vs vi, or iPhone vs Android.

Once you go RPN, you can never go back again.

Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by TheLoneWolfling on Friday August 30, 2013 @03:52PM (#6303824)
The one issue I've already had with RPN is that you require a separator between numbers anyways - in RPN it's too easy to parse "23 4 +" as "2 34 +", for example, especially if you're writing quickly.
Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by anonymouz on Saturday August 31, 2013 @04:28AM (#6306212)
On the HP calculators the separator would usually be the enter key. I think the old ones displayed just the top entry of the stack, on the newer ones with bigger display you see the stack with each entry on one line.
Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by orclev on Friday August 30, 2013 @07:00PM (#6304722)
Might have been better to demonstrate that using subtraction as addition is commutative and thus either one works fine in this case.
Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by sokoloff on Friday August 30, 2013 @09:31PM (#6305269)
One is 27; the other is 36.
Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by orclev on Wednesday September 04, 2013 @04:44PM (#6330341)
LOL, apparently I suck as a parser. I read them as just swaps of the numbers, I.E. 23 4 + vs. 4 23 +.
Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by pavel_lishin on Friday August 30, 2013 @03:29PM (#6303713)
I learned it for some scholastic competition once. You're right, after the initial confusion, it was fast and intuitive.

I've forgotten it all now, of course. How often do I need to calculate something?

Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by bitwize on Friday August 30, 2013 @05:39PM (#6304407)
I know that feel, bro. ENT > =!
Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by revelation on Friday August 30, 2013 @02:10PM (#6303266)
The joke has been going on for quite some time now - Lisp and related languages use Polish Notation everywhere.

(The main benefit is that (R)PN is parenthesis-free, so it makes it easier for a calculator to process expressions with multiple operators. The use in programming languages is nonexistent but to make clear that +, *, .. are just like any other function call, where you would naturally use polish notation.)

Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by Scaevolus on Friday August 30, 2013 @02:22PM (#6303349)
Not nonexistent-- there are many stack-oriented programming languages[1], of which Forth is the most famous.

There's even a "Reverse Polish Lisp" on HP calculators!

[1] http://en.wikipedia.org/wiki/List_of_programming_languages_b...

Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by nealabq on Friday August 30, 2013 @02:30PM (#6303400)
Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by revelation on Friday August 30, 2013 @02:25PM (#6303367)
Sorry, I meant there is no benefit to using it in programming languages.
Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by Scaevolus on Friday August 30, 2013 @02:39PM (#6303455)
Forth is arguably the best language in terms of expressive power/language complexity, though that's largely due to the denominator.

It's a great choice for tightly constrained devices, though far fewer devices have such constraints now. The mental overhead of having to track stack-effects for each function makes it difficult to scale to large systems and maintain productivity, but if you're trying to eke every iota of power out of a chip with a tiny amount of ROM, it's hard to beat a direct-threaded (or token-threaded...) Forth.

Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by orclev on Friday August 30, 2013 @07:07PM (#6304742)
> Lisp and related languages use Polish Notation everywhere.

> The main benefit is that (R)PN is parenthesis-free

... so what you're saying is Lisp has all those parenthesis just to troll us?

Seriously though, using PN can make implementing parsers a lot simpler as it makes the grammar less ambiguous.

Re:Reversing Sinclair's amazing 1974 calculator hack - half ... by anaphor on Friday August 30, 2013 @11:30PM (#6305654)
I don't know about less ambiguous, it can still require only single token lookahead and be context-free without any parentheses, but Lisp-ish languages are easier to parse because you have fewer productions to worry about compared to more complex languages.