baker wrote: ↑Wed Oct 27, 2021 2:56 amThe other advantage of Lisp is it's super easy to write an interpreter for it.
Lisp interpreters are probably the easiest to implement, the best for learning general language parsing. Lambda calculus with some higher order functions and syntax. I’ve played with implementing one but all I’ve wrote to completion is a brainfuck interpreter
[/quote]
Reminds me of Ricky Greenblatt and the other AI hackers. Such a good read... https://en.wikipedia.org/wiki/Hackers:_ ... Revolution
jlv wrote:If it weren't for Havoc I'd have been arguing with the 12 year olds by myself.
The funny thing about Lisp is the original plan (take this with a grain of salt since I'm not sure where I heard this) was that the s-expression syntax was supposed to just be the low level representation and the super powerful macro system was supposed to give you things like infix syntax to make it easy to use and readable. But somewhere along the line they decided they just liked s-expressions and if you don't like a million parentheses you'll just have to deal with it. It's a shame since it could have been much more than what it was.
Josh Vanderhoof
Sole Proprietor jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
ddmx wrote: ↑Thu Oct 28, 2021 11:08 pm
These last few posts have sent me down a real rabbit hole on List syntax, Carmack, and the Ars Technica youtube channel.
If you haven't, I highly recommend checking out Fabien Sanglard's Game engine black books on wolfenstein 3d and Doom. The pdf versions are free and they're very thorough and interesting look into the nuts and bolts of those game engines.
jlv wrote: ↑Thu Oct 28, 2021 12:48 am
The funny thing about Lisp is the original plan (take this with a grain of salt since I'm not sure where I heard this) was that the s-expression syntax was supposed to just be the low level representation and the super powerful macro system was supposed to give you things like infix syntax to make it easy to use and readable. But somewhere along the line they decided they just liked s-expressions and if you don't like a million parentheses you'll just have to deal with it. It's a shame since it could have been much more than what it was.
Correct, everything I read says it was intended as an AST. To be fair it’s still capable of being used as an AST.
I don’t think all the parenthesis are bad to read at all with proper spacing and syntax highlighting. Any functional programming language using parenthesis to contain args can get the same issue. Ex j(h(g(f(x)))) vs lisp (j (h (g (f x) ) )
baker wrote: ↑Sat Oct 30, 2021 10:03 pm
I don’t think all the parenthesis are bad to read at all with proper spacing and syntax highlighting. Any functional programming language using parenthesis to contain args can get the same issue. Ex j(h(g(f(x)))) vs lisp (j (h (g (f x) ) )
That's the argument but they're kidding themselves if they think anyone prefers this:
(defun vlen (x y z) (sqrt (+ (* x x) (* y y) (* z z))))
to this:
function vlen(x, y, z) { return Math.sqrt(x * x + y * y + z * z); }
All it needed was an infix macro as part of the standard library and anything doing math would be instantly way easier to read.
Josh Vanderhoof
Sole Proprietor jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
baker wrote: ↑Sat Oct 30, 2021 10:03 pm
I don’t think all the parenthesis are bad to read at all with proper spacing and syntax highlighting. Any functional programming language using parenthesis to contain args can get the same issue. Ex j(h(g(f(x)))) vs lisp (j (h (g (f x) ) )
That's the argument but they're kidding themselves if they think anyone prefers this:
(defun vlen (x y z) (sqrt (+ (* x x) (* y y) (* z z))))
to this:
function vlen(x, y, z) { return Math.sqrt(x * x + y * y + z * z); }
All it needed was an infix macro as part of the standard library and anything doing math would be instantly way easier to read.
True, I much rather prefer the c-like syntax. I think the lisp diehards are just biased .