News for hackers. Stuff that matters.
Re:The Art of Lisp and Writing by kazinator on Wednesday June 18, 2025 @11:21AM (#44310699)
Lisp would be vastly less readable if the parentheses were removed, and arity had to be worked out according to the definitions of the functions and operators, understood to be working on an implicit operand stack.

Think about it: the entire class of error of mismatched stack height doesn't exist in Lisps.

There could be an operand stack, if the Lisp is translated to a stack-based byte code; but it's managed so the programmer isn't concerned about it.

Re:The Art of Lisp and Writing by quantadev on Thursday June 19, 2025 @11:36AM (#44319646)
Yeah, RPN is essentially what you'd get as output if you compiled LISP using a compiler. Claiming RPN is as easy to deal with as LISP would be utterly absurd, and no one genuinely believes that.
Re:The Art of Lisp and Writing by kazinator on Friday June 20, 2025 @12:07AM (#44324650)
Well, RPN with parentheses, as a layer of syntax, would be easy to deal with. That's what Lisp backwards would be.

  ((a b +) (a b) defun)

  (((list pop) print) list while)
Re:The Art of Lisp and Writing by quantadev on Friday June 20, 2025 @12:47AM (#44324823)
Yeah, the Japanese incorrectly put verbs at the end of the sentence! Just like Yoda does. Asian he must be. Incorrect they all are.

But seriously, yeah computers are naturally 'Stack Machines' [almost] always, where they need the arguments pushed onto a stack before the 'verb' is executed.

Re:The Art of Lisp and Writing by kazinator on Friday June 20, 2025 @01:53AM (#44325080)
Even if we don't think about stacks, but just the raw data dependency: before we can perform an operation, we need to determine its operands.

So if we translate that sequence to language, stating the operands before the operation does follow the non-negotiable evaluation data flow.

Re:The Art of Lisp and Writing by quantadev on Friday June 20, 2025 @10:54AM (#44328305)
That's why we have interpreters and compilers: So we can make code easier to read. FORTRAN was originally invented as a way to let humans think in terms of parenthetical groupings for math and functions, specifically to _avoid_ reasoning in an RPN way.
Re:The Art of Lisp and Writing by pklausler on Friday June 20, 2025 @07:09PM (#44332957)
What programming systems used RPN prior to 1957?
Re:The Art of Lisp and Writing by quantadev on Friday June 20, 2025 @09:34PM (#44333766)
Doing ASM ~ "RPN reasoning".