News for hackers. Stuff that matters.
Re:Common Lisp homepage by xyproto on Thursday May 10, 2018 @08:15AM (#17038157)
(mapcar #'string-downcase (list "Hello" "world!"))

This is a great example of why I don't want to use Common Lisp.

Compare with Python:

[word.lower() for word in ("Hello", "world!")]

Beating Node and Ruby in terms of speed is also a big non-argument, with so many attractive programming languages to choose from that are both fast and good looking.

Re:Common Lisp homepage by klibertp on Thursday May 10, 2018 @10:39AM (#17039218)
Can you elaborate on why?

I know both Python and Common Lisp, neither version looks any better than the other to me.

Also, as another commenter notes, the snippets are not actually good translations of each other. Your CL snippet would look like this in Python:

    list(map(str.tolower, ("Hello", "world!")))
While your Python snippet would look like this in CL (as pavelludiq notes):

    (loop for word in '("Hello" "world!") collect (string-downcase word))
Granted, Lisps tend to be a bit more verbose (longer names, less symbols used), which is a natural consequence of having little syntax. It has serious advantages when learning the language or when reading unfamiliar code, although it comes with some drawbacks, too.
Re:Common Lisp homepage by svetlyak40wt on Friday May 11, 2018 @09:02AM (#17046972)
Actually, lisp varian can be also a:

    (mapcar #'string-downcase '("Hello" "world!"))
Re:Common Lisp homepage by pavelludiq on Thursday May 10, 2018 @08:28AM (#17038198)

  (loop for item in '("Hello" "world!") collect (string-downcase item))
Re:Common Lisp homepage by m00natic on Thursday May 10, 2018 @09:43AM (#17038740)
Looking at https://sites.google.com/view/energy-efficiency-languages/re...

Common Lisp is beating on performance surprising number of static languages too. Despite being more dynamic and flexible than any other language.

Re:Common Lisp homepage by flavio81 on Thursday May 10, 2018 @03:40PM (#17042295)
>Beating Node and Ruby in terms of speed is also a big non-argument, with so many attractive programming languages to choose from that are both fast

It beats the majority of programming languages for speed, except for languages known for ultimate speed like C, C++, Rust, Forth, Chapel, and Ada.

This is because Lisp is both high-level and low-level at the same time. This sorcery is possible because of homoiconicity and metaprogramming.

Re:Common Lisp homepage by lispm on Thursday May 10, 2018 @08:11PM (#17043964)
Which is strange, because MAP functions are easy to use. The slightly problematic part is that there is not a predefined generic downcase function.

A little more general:

    (map 'list #'string-downcase (list "Hello" "world!"))