News for hackers. Stuff that matters.
Re:The Art of Lisp and Writing by lproven on Monday June 16, 2025 @12:35PM (#44291110)
> one simple syntax solves everything about computation in the axiomatically simplest way possible.

So what about RPN? What about Forth and Postscript? Just as simple... just as terse... just as efficient... just as general.

And, for me, just as unreadable.

Re:The Art of Lisp and Writing by quantadev on Monday June 16, 2025 @01:45PM (#44291674)
I don't think RPN is as simple as parenthesis.

All RPN does is replace the easy to get right parenthesis with difficult to get right newline characters.

Re:The Art of Lisp and Writing by lproven on Tuesday June 17, 2025 @11:27AM (#44300349)
Reverse Polish notation is every bit as easy, simple and minimal as Lispian prefix notation. They are mirror images of one another... and for most ordinary people, both are equally difficult to read or to use.

And I include myself in this.

Remember that for a lot of ordinary people, school algebra is almost impossible to follow and is the reason they stop studying maths as soon as they can. And that is simple infix notation.

Re:The Art of Lisp and Writing by quantadev on Tuesday June 17, 2025 @01:32PM (#44301591)
> RPN is every bit as easy [as LISP]

Riddle me this then: When editing code full of parentheticals, why do devs find it helpful that IDEs can find and highlight the matching opening/closing parenthesis automatically? I mean, based on your logic, parenthesis just don't make things any easier, right? I'll leave the topic of "indentation" completely off the table too, because a single riddle is enough.

Re:The Art of Lisp and Writing by lproven on Tuesday June 17, 2025 @06:48PM (#44304852)
I don't know what side you think I am arguing for here, but it's not the one you're guessing.
Re:The Art of Lisp and Writing by quantadev on Tuesday June 17, 2025 @08:22PM (#44305436)
Yeah, I did't think you ever genuinely believed RPN is easier than LISP.
Re:The Art of Lisp and Writing by lproven on Wednesday June 18, 2025 @07:56AM (#44309083)
No, that is not true.

Me personally? I dislike them both. I find them both unreadable.

But both are compact and efficient... just really difficult.

You are trying to put words in my mouth that are not there. That is very rude. Do not do that, ever.

But also, as you have been throughout this thread, you are wrong.

Re:The Art of Lisp and Writing by quantadev on Wednesday June 18, 2025 @10:13AM (#44310087)
The parenthesis in LISP make it dramatically easier to deal with than RPN; and I don't believe for a millisecond that you objectively disagree with that fact.
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".