News for hackers. Stuff that matters.
Re:The Nature of Lisp (2006) by frou_dh on Wednesday May 20, 2015 @10:11AM (#9576400)
There's a "lisp parens lol" thing among programmers that's so intellectually lazy. I once interviewed someone who I noticed had explicitly mentioned Lisp on their resume, and when as an aside I asked what their thoughts on Lisp development were, all they could muster was "Oh god the parens hyuck hyuck".
Re:The Nature of Lisp (2006) by mbrock on Wednesday May 20, 2015 @10:16AM (#9576425)
Other languages tend to get a free pass, but I take every chance I get to whine about JavaScript's three kinds of parens that I have to keep track of manually, and the convention of putting nearly every closing paren on its own line, wasting kilometers of space.
Re:The Nature of Lisp (2006) by chucksmash on Wednesday May 20, 2015 @10:55AM (#9576717)
Truer for some languages than it is for others...

"Oh god, syntactically significant white space!"

Re:The Nature of Lisp (2006) by acc54321 on Wednesday May 20, 2015 @12:36PM (#9577473)
I'm more bothered by Python's lack of homoiconicity (thus no good macro facility) and poor performance when compared to Common Lisp.

Python feels a bit like a toy Lisp with all the adult parts hidden.

Re:The Nature of Lisp (2006) by oldmanjay on Wednesday May 20, 2015 @10:59AM (#9576743)
Yeah that screen space, truly a limited resource. You should cram everything together and don't forget to be extra clever in the middle of the dense unreadable forest of sigils as well. It was hard to write, it should be hard to read.
Re:The Nature of Lisp (2006) by bad_user on Wednesday May 20, 2015 @11:26AM (#9576931)
While I agree that in programming we should break our code in logical paragraphs, just like in prose, such conventions (placing closing brackets on their own line) are detrimental for that purpose. For me this doesn't have anything to do with wasting vertical space, as it has to do with aesthetics.

I'm not really speaking for LISP, but in my projects what really bothers me are people that don't have common sense when indenting / formatting their code and so they start using IDE or build plugins, using common conventions and formatters that will never be able to understand the meaning of the code being formatted, making a total mess of other people' carefully crafted code. And we go round and round on this.

Re:The Nature of Lisp (2006) by mbrock on Wednesday May 20, 2015 @11:08AM (#9576810)
While your sarcasm is mildly amusing, your point doesn't apply.

I don't advocate writing cryptic code. Of course I prefer code that is easy to read. That's a major basis for my opinions on syntax.

Do you think Python's syntax is cryptic and hard to read, because of the lack of end parens? Or did you just misunderstand my point completely?

Re:The Nature of Lisp (2006) by aaron-lebo on Wednesday May 20, 2015 @11:39AM (#9577038)
I don't know that it is intellectually lazy. It makes a lot of sense.

If a lisp dialect had a large, vibrant ecosystem on the scale of Python or Javascript, then a lot of people would see the parens, see the advantage of having them, work their way through it and eventually get used to them and even embrace them because they see a real payoff.

That's not the case with lisp dialects. The major payoff with lisp dialects is macros. But for most people, it isn't obvious why they are important. They are something you have to use to really get.

So the intellectually reasonable position for most people is to either ignore lisp or laugh at it. Meanwhile, you see endless articles like this posted over the years (not knocking the article itself), trying to explain lisp in a kind of reverence and terminology usually associated with religious texts. "Hey, brother, you just need to see the light".

I've been doing quite a bit of Clojure coding lately and I love it. I just can't see a lisp ever catching on. Actually, the project I'm working on is a lisp that does not look like a lisp but compiles down to Clojure. The parens aren't really necessary for lisp's best feature, as seen by Elixir. Here's a bit of my language:

    " " join([1, 2, 3]) count println
Re:The Nature of Lisp (2006) by mbrock on Wednesday May 20, 2015 @12:20PM (#9577339)
To "ignore or laugh at" a whole family of important and interesting languages because they aren't as popular as Python or JavaScript is exactly laziness, or at best pragmatic, but has nothing to do with intellectual reasonableness.
Re:The Nature of Lisp (2006) by aaron-lebo on Wednesday May 20, 2015 @12:39PM (#9577493)
Why is being pragmatic not intellectually reasonable?
Re:The Nature of Lisp (2006) by mbrock on Wednesday May 20, 2015 @02:16PM (#9578103)
I'm not saying being "pragmatic" in this way is "bad" or "wrong," and since this is pretty much a total derail, I'll stop engaging in this thread. But, like, this is the actual thing you said that I was responding to:

"the intellectually reasonable position for most people is to either ignore lisp or laugh at it"

I said that such a position has nothing to do with "intellectual reasonableness" because it's barely an intellectual position at all. There is no propositional content; there is very little thought involved at all; it's a default "meh" position that is more accurately labelled "laziness."

Re:The Nature of Lisp (2006) by gknoy on Wednesday May 20, 2015 @01:17PM (#9577730)
One should not sneer or laugh at languages like Perl, COBOL, or similar, simply because there are others we like better, or are more popular.

I used to be a HUGE Perl fan, and discounted Python for years. I figured that I already knew Java, and since Python and Perl were effectively similar, it was a waste of my time to study both. I now regret that. As formative as that was for my growth as a programmer, I've loved coding in Python more than almost any other language -- and I delayed that discovery by a decade because I wrote it off as "effectively the same as" Perl.

Sure, it was pragmatic to focus on one language that I was learning and using. But the reasons I did so were flawed, IMO.

Re:The Nature of Lisp (2006) by cp9 on Wednesday May 20, 2015 @01:18PM (#9577741)
the parens seems pretty necessary for that expression, I can't even tell what it's doing...

it's joining the vector 1,2,3 with a space to make "1 2 3 ", right? so what is that count doing there? I'm not saying that lists are the end all be all of syntax (clojure has vectors for a lot of things specifically to reduce the parens), but you need something there to make it clearer

Re:The Nature of Lisp (2006) by aaron-lebo on Wednesday May 20, 2015 @01:25PM (#9577788)
I could have explained the syntax.

If you are familiar with Python, it more or less is equivalent to something like:

  " ".join([1, 2, 3]).count().println()
Which, imo, reads much better than:

  (println (count (join " " [1 2 3])))
Of course, Clojure has the threading macro, but this language emphasizes it.
Re:The Nature of Lisp (2006) by kazinator on Wednesday May 20, 2015 @03:30PM (#9578637)
Or, rather, maybe it will read better, about a generation after the first crop of high schoolers start being taught

   f(x).sin().log()
instead of

   log(sin(f(x))).
Re:The Nature of Lisp (2006) by Someone on Wednesday May 20, 2015 @04:43PM (#9579154)
That should be

  x.f().sin().log()
and that is exactly what they type on their calculators:

[3] [1/x] [sin] [log]

(either that, or I am getting old. Modern graphing calculators may have different input modes)

Re:The Nature of Lisp (2006) by aaron-lebo on Wednesday May 20, 2015 @03:47PM (#9578776)
I get what you are saying, but when you are talking about programming languages as opposed to math or another domain, more people are familiar or comfortable with the former, hence the reason for numerous posts like the original having to explain why lisp's syntax is a good thing.
Re:The Nature of Lisp (2006) by kazinator on Wednesday May 20, 2015 @03:52PM (#9578810)
Posts explaining why Lisp's syntax is a good thing have to deal with moving the left parenthesis to include the function:

  log(sin(f(x)))) ->  (log (sin (f x)))
They don't have to evangelize function composition being indicated by nesting.
Re:The Nature of Lisp (2006) by codygman on Wednesday May 20, 2015 @03:40PM (#9578712)
Clojure is weakly typed? That python won't work since it is strongly typed.
Re:The Nature of Lisp (2006) by aaron-lebo on Wednesday May 20, 2015 @03:44PM (#9578743)
Key word being like. That syntax works in Ruby, Python, or JS with the right methods defined.
Re:The Nature of Lisp (2006) by agumonkey on Wednesday May 20, 2015 @10:57AM (#9576732)
The mainstream may realize how syntax doesn't really matter. The FP push helps a lot already (map,filter,streamfusion instead of crazy for/while statements).
Re:The Nature of Lisp (2006) by AnimalMuppet on Wednesday May 20, 2015 @02:11PM (#9578073)
Why do you call for and while statements "crazy"? Because it's possible to write them wrong? Because you think it's crazy to have to write them at all? Why?
Re:The Nature of Lisp (2006) by agumonkey on Wednesday May 20, 2015 @02:25PM (#9578166)
> it's possible to write them wrong

too easy languages to conflate a lot of logic into large side effectful statements. FP forces you to separate layers, and deforestation (when available) helps reclaiming space/time costs.

Re:The Nature of Lisp (2006) by AnimalMuppet on Wednesday May 20, 2015 @04:26PM (#9579047)
All right, but "can be misused" is not the same as "crazy".
Re:The Nature of Lisp (2006) by agumonkey on Thursday May 21, 2015 @03:40AM (#9581432)
Alright, that was my own misunderstanding of loop invariants and scope showing. That gave opportunity for traumas when I started reading imperative code.
Re:The Nature of Lisp (2006) by spacemanmatt on Wednesday May 20, 2015 @11:16PM (#9580766)
Seems fair to assume pp calls them crazy because they don't compose.