Is RPN still relevant?
|
12-23-2023, 11:36 PM
Post: #83
|
|||
|
|||
RE: Is RPN still relevant?
(12-21-2023 01:27 PM)rprosperi Wrote: The incomplete question "Is RPN still relevant?" is simply not clear enough for any kind of consensus, as the disparate and diverse replies show.This separation into different domains is indeed important, thank you. While I have nothing to add on the latter three domains, the "public at large" one is in need of some addition. In certain (admittedly somewhat niche) topics reverse polish notation remains relevant, maybe even inescapable. The one that immediately comes to my mind is parsers (for programming languages, mathematical expressions, etc). Case in point: just yesterday independent game development studio Wube Software released a blog post in their Factorio Friday Facts series containing the following tidbit with a mention of RPN. FFF-390 Wrote:The parser was split into three logical parts.(Original post here.) Ironically the need for a parser means modern algebraic calculators likely contain some RPN deep inside their bowels. You'd have to get their firmware source code or engage in an excessive amount of reverse engineering to find it, but there's a very good chance it's there. Outside the world of calculators, here's a piece of what Clang can spit out when instructed to print the Abstract Syntax Tree of a C program. In particular, this is a function call. Code: | |-CallExpr 0x559193b5a4b0 <line:19:1, col:41> 'void' Other compilers similarly have a pinch of RPN (or maybe in some cases just PN) in them. And in the world of academia, the compiler-adjacent automata theory works with a stack once you move past type 3 automata in the Chomsky hierarchy into type 2, This stack obviously lends itself to RPN style utilization. Types 1 and 0 correspond to Turing machines (with a certain limitation for type 1), with a tape memory instead, but that could be described as two stacks (one in each direction of the type head), or maybe as a stack you can ROLL like we do in RPL. Either way, deep within computers, RPN is lurking. Not many people dig that deep anymore (which I think is a problem as it easily leads to misconceptions), but once you need to, you'd be better off if you can wrap your brain around RPN. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)