News for hackers. Stuff that matters.
Re:Lisp and Haskell (2015) by timonoko on Thursday October 08, 2020 @02:30AM (#24716449)
Common Lisp could evolve into totally parenthesis-free language. By expanding the "powerfull and versatile" Loop-macro into full powerfullness and versatileness. Unfortunately two parenthessis needed, but you can redefine the language having those by default around every file.
Re:Lisp and Haskell (2015) by goto11 on Thursday October 08, 2020 @03:03AM (#24716627)
Parentheses in Lisp is like significant whitespace in Python: A big stumbling block for people who don't use the language.
Re:Lisp and Haskell (2015) by kgwgk on Thursday October 08, 2020 @03:15AM (#24716693)
But for those who use the language one is a powerful feature and the other a minor annoyance.
Re:Lisp and Haskell (2015) by Insanity on Thursday October 08, 2020 @06:57AM (#24717904)
The parens made me reluctant to try lisp. Then, 5ish years ago I decided to "just do it", and now they don't bother me at all.

The experience of a beginner is also important though, especially for language adoption, this might be one of the reasons why lisp flavours are not more popular.

Re:Lisp and Haskell (2015) by agumonkey on Thursday October 08, 2020 @03:28AM (#24716769)
I don't even remember when parens stopped being an issue.

I think my hate relationship toward algol syntax was so strong, sexp were an obvious answer from minute 0.

Re:Lisp and Haskell (2015) by iambrj on Thursday October 08, 2020 @05:37AM (#24717457)
One man's hack is another man's elegance
Re:Lisp and Haskell (2015) by adamkl on Thursday October 08, 2020 @09:25AM (#24718884)
Heck, why not just go one (several?) steps further and just use macros to create a DSL for <insert your favourite language here>?

https://aphyr.com/posts/353-rewriting-the-technical-intervie...

Re:Lisp and Haskell (2015) by ashtonkem on Thursday October 08, 2020 @02:56AM (#24716587)
It was originally supposed to, s-expressions (parenthesis) were supposed to be eventually replaced with m-expressions which were influenced by Algol and FORTRAN (the irony), but reviewers of the paper and the initial implementors of lisp preferred s-expressions, which stuck.

That being said, having worked professionally in Lisp, the “un-lispy” macros like Loop are some of the worst parts of that language. They completely violate the otherwise standard-ish syntax of Lisp, are very poorly documented, impossible to memorize, and are really hard to debug despite the otherwise excellent tooling available for top tier implementations like SBCL. It was our standard practice to replace these macros with more verbose but idiomatic lisp whenever possible.

Re:Lisp and Haskell (2015) by Rerarom on Thursday October 08, 2020 @04:16AM (#24717053)
"Haskell is Lisp's missing M-Expression implementation."
Re:Lisp and Haskell (2015) by andi999 on Thursday October 08, 2020 @03:27AM (#24716763)
how would an idiomatic loop statement look like?
Re:Lisp and Haskell (2015) by bjoli on Thursday October 08, 2020 @03:36AM (#24716817)
Iterate is more lispy, and for people that don't like macros transversing the loop body (because the errors you get when something like that goes wrong are hard to debug), something like foof-loop for scheme is pretty nice. I am writing this on neanderthal GPRS internet, so I leave finding documentation for these looping facilities an exercise for the reader.
Re:Lisp and Haskell (2015) by vindarel on Thursday October 08, 2020 @07:07PM (#24724913)
Re:Lisp and Haskell (2015) by sfrank on Thursday October 08, 2020 @03:34AM (#24716804)
Re:Lisp and Haskell (2015) by timonoko on Thursday October 08, 2020 @03:37AM (#24716824)
Just a jumble of random words. They are especially difficult to non-english speakers, because they are not grammatically correct sentences, but rely on some unknown word-order logic in indo-european languages. Same aplies to list comprehension sentences in Python too.
Re:Lisp and Haskell (2015) by guenthert on Thursday October 08, 2020 @03:07PM (#24722588)
Is that truly a stumbling block? I ask because English is not my native language. Around the time I learned English in high school I also became interested in computers, which to me then meant programming in BASIC. It took an embarrassingly long time for me to realize that e.g. GOTO was actually formed from 'go to' -- to me, "GOTO <n>" just meant that program flow would continue at line <n>, nothing more, nothing less. "IF" was just a mnemonic introducing a conditional branch, etc. . I didn't perceive my poor grasp on English as a hindrance in learning to program (as thankfully introductory text were available in my native language). Of course, you need a good handle on the language, when communicating with co-workers (and all code is communication), but that came much later.
Re:Lisp and Haskell (2015) by ashtonkem on Friday October 09, 2020 @06:20PM (#24735014)
The problem with the Loop macro isn’t the English, it’s that it doesn’t look anything like the rest of the language. It’s like finding some embedded Python in your Java; even if you’re fine with using Python, it’s going to be pretty hard to work with when you’re in Java mode.

Also, macros are much harder to debug, especially when the macro expansion code itself crashes. The loop macro does a lot of work, which makes it a particularly annoying macro to fix when things go wrong.

Re:Lisp and Haskell (2015) by guenthert on Friday October 09, 2020 @10:59PM (#24736400)
I wasn't defending the LOOP macro, but I think your critique comes 30 years too late ;-}
Re:Lisp and Haskell (2015) by timonoko on Friday October 09, 2020 @12:18AM (#24726783)
LOOP is just a little bit more complex than BASIC:

    (LOOP FOR I FROM 0 BELOW (LENGTH S) THEREIS FOR
    CH = (CHAR S I) WHEN (< I 0) ALWAYS DO (RETURN CH))  

    *** - loop: illegal syntax near for in
       (loop for i from 0 below (length s) thereis 
       for ch = 
       (char s i) when (< i 0) always do (return ch))
Re:Lisp and Haskell (2015) by guenthert on Friday October 09, 2020 @10:49PM (#24736375)
That might be the case, the same approach would work here though I think. There is even less a pretention of proper English grammar and why should there be? I can't remember the exact syntax of all the LOOP terms for the life of me and generally try to keep it simple.

https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node240.html#... states that "The thereis construct takes one form" so that will be your error. Not quite sure, as I don't know what you intend to express. when (< i 0) makes no sense as i is always positive.

http://www.gigamonkeys.com/book/loop-for-black-belts.html might be of help.

Re:Lisp and Haskell (2015) by andi999 on Saturday October 10, 2020 @01:58AM (#24736946)
The 'go to' thing probably took me 30 years to realize. I was puzzled when I read the 'go to considered harmful'and the 'structured programming with go to' article until I realized.... It is probably the same as in your case, I learned programming before learning English.
Re:Lisp and Haskell (2015) by andi999 on Thursday October 08, 2020 @04:21AM (#24717082)
Can you elaborate? I have difficulties understanding what you mean. Do you really mean an idiomatic loop should be 'a jumble of random words'?
Re:Lisp and Haskell (2015) by timonoko on Thursday October 08, 2020 @04:50AM (#24717220)
Difficult to explain cause not an expert, but most languages do not have "list comprehension" by post-description. "New York has rats bigger than a dog" comes to mind. In Finnish you can but the adjective word have same ending or grammatical case as the main word. Without those clues the sentence would be nonsensical.
Re:Lisp and Haskell (2015) by shakow on Thursday October 08, 2020 @10:21AM (#24719295)
> but most languages do not have "list comprehension" by post-description. "New York has rats bigger than a dog" comes to mind.

« New-York a des rats plus gros que des chiens »

Re:Lisp and Haskell (2015) by timonoko on Thursday October 08, 2020 @12:18PM (#24720576)
That is an indo-european language. Those languages have no grammar or rules. You just string words together and hope it makes sense.
Re:Lisp and Haskell (2015) by shakow on Thursday October 08, 2020 @05:36PM (#24724188)
> You just string words together and hope it makes sense.

I beg your pardon? Messing the word orders in French or German will definitely mess up the sentence.

The German would be something like “Im New York sind Ratten, die größter als Hunden sind”, and moving the words would make the sentence invalid – albeit probably understandable.

Re:Lisp and Haskell (2015) by konjin on Thursday October 08, 2020 @06:02AM (#24717625)
A lisp without brackets is no longer a lisp.