Live data from Hacker News

An Intuition for Lisp Syntax

stopa.io

121–130 of 201 posts

Re: An Intuition for Lisp Syntax

#121

Earlier quoted context omitted.

What is or isn't readable can be judged by two qualities. The first one is if it's being familiar to what you're used to and the second one how long it takes to learn if you're not familiar with it. Now I learned C-like language before I learned Lisp-like languages, so that might be the reason I felt I understood Lisp way faster than I felt I understand C-like languages. There is simply less to learn about the langua…

> What is or isn't readable can be judged by two qualities. The first one is if it's being familiar to what you're used to and the second one how long it takes to learn if you're not familiar with it. So your argument is that all code is as easy to read as long as you have done the work to get familiar with it? I hope you understand that it is bullshit. Brainfuck isn't easier to understand than python no matter how m…

> Brainfuck isn't easier to understand than python no matter how much time you spend with brainfuck.

I don't disagree with your overall point, but I actually wonder how true that is. If you spent years working in Brainfuck, and had never touched Python, I suspect it would take a bit of effort before Python was as readable to you as Brainfuck.

Re: An Intuition for Lisp Syntax

#122
post #113

Earlier quoted context omitted.

I’ve literally seen first-hand GJS lose track of paren matching while lecturing on Sceme/SICP. It happens very rarely sure, but certainly not never. Probably about as often as experts in any other language/profession make silly mistakes. Perhaps you’re a better schemster than him, but I have my doubts :) I think no matter the language the syntax will disappear over time and your brain will learn to look at the charac…

I'm not sure who GJS is but if you see any lisper editing text instead of operating on structures (with auto-balancing parenthesis and so on), it's 99% certain it's in an environment they are not familiar with, so they will make mistakes. I don't think anyone who write Lisp-like languages professionally doesn't use tools like parinfer/paraedit, where balancing parenthesis is not something you have to do.

This was on a blackboard. And GJS advised Guy Steele in creating Scheme and coauthored SICP with him.

Re: An Intuition for Lisp Syntax

#123

a) great article b) "It can help you move with the speed of a sculptor"... This person has obviously never watched a sculptor. They are so slow compared to basically every other form of artistic visual representation.

I thought this in the back head when I wrote it xD. “hmm...it can’t be too easy changing marble around”. If you have a better metaphor lmk will change :}

Re: An Intuition for Lisp Syntax

#124
post #122

Earlier quoted context omitted.

I'm not sure who GJS is but if you see any lisper editing text instead of operating on structures (with auto-balancing parenthesis and so on), it's 99% certain it's in an environment they are not familiar with, so they will make mistakes. I don't think anyone who write Lisp-like languages professionally doesn't use tools like parinfer/paraedit, where balancing parenthesis is not something you have to do.

This was on a blackboard. And GJS advised Guy Steele in creating Scheme and coauthored SICP with him.

Yup, makes sense that you make mistakes then, as these folks are surely used to not having to think about balancing parenthesis anymore. Just as over-reliance on GPS will make your navigation skills without a GPS worse over time.

Re: An Intuition for Lisp Syntax

#125

I couldn't figure out how to email the author and I don't have twitter, but I found a few mistakes in the "More power" section that tripped me up a bit as I followed along, so just posting here in case it helps anyone else: The end of the second last code block should be: `data.instructions.forEach(...args.map(parseInstruction));` And the full definition of `data.instructions` that demonstrates the use of this modifi…

Will look this over and update, thanks!

Re: An Intuition for Lisp Syntax

#127
post #99

This is maybe the best introductions to Lisp i have seen, especially for a js dev like me it could hardly get more approachable and convincing. I could not help but thinking at the end, this is really awesome but s-expressions are kind of hard to read and reason about for my brain, it would be cool if we could generate them from more readable syntax, maybe something like javascript :D . Unfortunately the standard js…

> I could not help but thinking at the end, this is really awesome but s-expressions are kind of hard to read and reason about for my brain is (map foo '(1 2 3)) that more difficult than: [1, 2, 3].map(foo) ? Or: (let ((array #(1 2 3 4 5))) (vector-set! array 0 3) (vector-ref array 0)) that more difficult than: let array = [1, 2, 3, 4, 5]; array[0]=3 array[0]

Is

  (* (f (+ 2 x)) 5)
more difficult to parse than:

  5 * f(x+2)
Considering that we're familiar with the latter syntax (more or less) since kindergarten, I'd say... yes. And the idea that you'd somehow start to consider something you've been doing all your life as “irregular” after 2–4 weeks of Lisp cure is just hilarious.

Re: An Intuition for Lisp Syntax

#128

Since parenthesis are just an arbritary sign, it's possible to replace it with something different that fulfills the same role in Lisp. An example for Lisp without parenthesis: https://dustycloud.org/blog/wisp-lisp-alternative/

An example with smileys: https://youtu.be/CbciCrQCpkI?t=832

Re: An Intuition for Lisp Syntax

#129

Earlier quoted context omitted.

Yes. It's all personal, of course, but I find that the typographical variety of "traditional" languages with syntax makes it way easier to me to read/parse them than LISP. Parens, parens, everywhere, nor a drop of structure. And when it comes to macros and (pseudo)-quoting, the LISP is hands down more obnoxious (again, for me) than, say, Python's f"{}".

> It's all personal, of course, but I find that the typographical variety of "traditional" languages with syntax makes it way easier to me to read/parse them than LISP. I wonder how much of that has to do with your familiarity with "traditional" language syntax. For example, when I started writing Lisp, I had a similar opinion. But I write Clojure professionally for a while, and that disappeared. Now I haven't writte…

Yes, it's just that it's the useless (unless you write an AST-rewriting macro) structure that gets in my way. Say, naming a thing, a function definition, and a function invocation are all very visually different in, say, JS, while in LISP it's just a slightly different pattern of parens and two keywords ("let" and "lambda") that are, of course, not actually keywords but just happen to be interpreted in that way by the eval.

And yes, human ability to pattern-match things is astonishing, I am sure if I were to program exclusively in Scheme for half a year, I too would one day grow accustomed and used to it. But do I want to? I am really not convinced about that. A human can get used to pretty much anything, even to almost constantly being in mild pain, but... no. I'd rather just not.

Re: An Intuition for Lisp Syntax

#130
post #113

Earlier quoted context omitted.

I’ve literally seen first-hand GJS lose track of paren matching while lecturing on Sceme/SICP. It happens very rarely sure, but certainly not never. Probably about as often as experts in any other language/profession make silly mistakes. Perhaps you’re a better schemster than him, but I have my doubts :) I think no matter the language the syntax will disappear over time and your brain will learn to look at the charac…

I'm not sure who GJS is but if you see any lisper editing text instead of operating on structures (with auto-balancing parenthesis and so on), it's 99% certain it's in an environment they are not familiar with, so they will make mistakes. I don't think anyone who write Lisp-like languages professionally doesn't use tools like parinfer/paraedit, where balancing parenthesis is not something you have to do.

I'm pretty sure there are people who write common lisp professionally whithout those tools. Are they even available in the LispWorks or ACL editors?
Post reply on HN