News for hackers. Stuff that matters.
Re:If Lisp Is So Great (2003) by ridiculous_fish on Saturday November 28, 2015 @03:50AM (#10640523)
I think it would be valuable for other commenters to share why they did or did not choose Lisp for their most recent project(s).

I chose Go for a recent project, and TypeScript for another. Both languages make getting started very easy: they have straightforward installation, good tooling, and a lot of support for when things go wrong.

I did not seriously consider LISP, and I think the main reason is that it's a very confusing landscape. Google "how to install LISP" and you get a page like https://en.wikibooks.org/wiki/Common_Lisp/First_steps/Instal... with half a dozen options. It's hard to choose and most of these do not look promising. For example, Steel Bank Common Lisp is one I have heard of, but their binaries are out of date and they use SourceForge (shiver). Arc is another, but their installation instructions do not inspire confidence with disclaimers like "don't use the latest version." My concern is I will spend two weeks diving in before hitting some hard limitation, and I'll be stuck.

(Clojure is surely the best known modern LISP, but I do not want to depend on the JVM.)

Speaking as an outsider, I think LISP would gain a lot more traction if its community coalesced around a single implementation. (Sorry if that's a clichéd argument). This would allow for investment in areas like documentation, platform support, tooling, etc. The functional language community went through this and the result was Haskell, which is excellent in all of those areas.

Re:If Lisp Is So Great (2003) by oskarth on Saturday November 28, 2015 @04:02AM (#10640545)
There's no one lisp; there are many. Here are the top three:

Clojure: http://clojure.org/getting_started

Racket: http://docs.racket-lang.org/getting-started/

Common Lisp: https://www.quicklisp.org/beta/

Lisp is a family of languages. All the dialects are good in their own way - "standardization", if such a thing even makes sense, would be counter-productive.

Re:If Lisp Is So Great (2003) by ridiculous_fish on Saturday November 28, 2015 @04:24AM (#10640594)
The history of Haskell is described in this PDF: http://research.microsoft.com/en-us/um/people/simonpj/papers...

This paper describes the situation in the mid-1980s as a "lazy Tower of Babel" with competing lazy-functional languages like Miranda, MLs, Orwell, Clean, Ponder, each good in its own way, but none of them with critical mass. Thus they decided to create Haskell as a new, common language. No doubt each language designer felt that Haskell compromised on their particular vision, but rallied around it anyways, resulting in a far more potent force for lazy functional programming than ever could have been achieved working separately.

Why does this not describe LISP today? Honest question.

Re:If Lisp Is So Great (2003) by zodmaner on Saturday November 28, 2015 @05:30AM (#10640694)
Common Lisp _IS_ the consolidation of various Lisp dialects that you've asked about.

Back in the 70s and 80s there are numerous Lisp dialects (way, _way_ more then there are today, since each dialects has their own sub-dialect and so forth), and so Common Lisp was created back in the 80s (the work started in 1981 and finished in 1994) to unified various Lisp dialects into one common language.

And Common Lisp accomplishes that objective, well mostly anyway. Soon(-ish) most people, companies, and institutions ported their Lisp code base to Common Lisp, and by the late 80's and early 90's, when you say Lisp most people will (correctly) assume that you mean Common Lisp, not MacLisp or InterLisp, or some earlier, long depreciated dialects.

You can read more about the nitty gritty details in the Evolution of Lisp essay by Richard Gabriel here: http://www.dreamsongs.com/Essays.html

Now, about Scheme. Remember when I said that Common Lisp _mostly_ accomplishes its objective of unifying various Lisp dialects? Yeah, basically the Scheme community didn't like how Common Lisp turns out, so they decided to stick with Scheme. And it is understandable why they feel this way, because despite outward appearance, the two languages are very different, with Scheme focuses on small (and mathematically elegant) core language, while Common Lisp, with its focus on being practical, is a huge language with a standard library that includes everything and a kitchen sink. Scheme also has a totally different evaluation model compared to Common Lisp and its own macro system with emphasis on hygienic. Not to mention that Scheme has its own standard, the R*RS (now in its 6th revision, with 7th in the drafting process).

Now, the thing about Common Lisp is that it is very hard, if not downright impossible, to change its standard. This means that it is not easy to make a substantial changes to the language and has the wider community adopt it (and we haven't even talk about changes that will break backward compatibility here). This is one of the reason that Rich Hickey created Clojure as an entirely new Lisp dialect (before this, he had implemented a Java FFI for Common Lisp). Clojure has a new syntax that is far more consistent than Common Lisp (which comes at the cost of breaking backward compatibility), as well as many new and experimental features, such as immutability, asynchronous operations, and the focus on functional programming style. All of these would be very hard to introduce into Common Lisp without significant efforts and time.

Re:If Lisp Is So Great (2003) by pmoriarty on Saturday November 28, 2015 @07:50AM (#10640923)
> Scheme focuses on small (and mathematically elegant) core language, while Common Lisp, with its focus on being practical

I don't think it's really fair to say modern Schemes aren't focused on being practical. Nor that they're small.

Take a look at Chicken or Racket, and you'll see that they have quite substantial libraries and many features above and beyond the specs that make them much more practical than the core Scheme spec alone.

Quite beside that, there's also the new R7RS[1] spec's "large" language is just that: large. It's also focused on being practical. So I wouldn't say that the traditional Scheme vs CL divisions in terms of size and practicality still hold.

I would say that Scheme is more elegant than CL, and more modern, and less crufty. Unfortunately, there are still far more programmers using CL than Scheme. Hopefully with Emacs' move to Guile that will change.

That said, I still love CL, and would far rather use it than any other language, except Scheme.

[1] - http://trac.sacrideo.us/wg/raw-attachment/wiki/WikiStart/r7r...

Re:If Lisp Is So Great (2003) by oskarth on Saturday November 28, 2015 @06:20AM (#10640772)
Excellent historical summary!
Re:If Lisp Is So Great (2003) by mbrock on Saturday November 28, 2015 @05:06AM (#10640663)
It describes Common Lisp.

Scheme is another language with its own common standards.

The way people are so quick to talk about "Lisp" as a general meta-language is kind of confusing.

We could invent a definition by which Ruby, Python, and Perl are "really the same language" that just failed to standardize, but that would be obviously silly.

Re:If Lisp Is So Great (2003) by gonewest on Saturday November 28, 2015 @05:49PM (#10642845)
You could say Ruby, Python, Perl, C, Java, etc are really ALGOL-like languages whose data structures are generally mutable, and whose syntax is made for expressing how the state of the program is mutated in-place.

Whereas LISP-like languages have data structures that are generally immutable, and whose functional orientation results in expressing the computation of new data from old (mostly) without mutating in-place.

The thing about imperative programming languages is that the paradigm matches up to the mental model of "a computer" that most programmers would recognize and find comfortable. Without having any concrete evidence, I have a hunch that this paradigm difference is what deters new developers the most. And stacked on top of that you have the non-ALGOL syntax and the lack of libraries.

In my opinion, anyway.

Re:If Lisp Is So Great (2003) by mbrock on Sunday November 29, 2015 @02:05AM (#10644029)
Your opinion is about an idea of Lisp that's simply not true. Both Common Lisp and Scheme are pervasively mutable and imperative constructs occur just as often as in "Algol." Clojure diverges from this with its nice immutable data structures, but that's a rather novel and distinguishing feature, not a core trait of "Lisp."

I'm curious about where the idea originated that Lisp is an especially non-mutating language. Some of it is just that it's a garbage collected language with first class functions, so it's easy to classify it as "functional" which has associations to "pure functional." But Lisp is very far from a pure functional language. It's more like a general multi-paradigm language—like Perl and Ruby.

Re:If Lisp Is So Great (2003) by sklogic on Saturday November 28, 2015 @04:51AM (#10640647)
Lisp thrives in Babel, while the other kinds of languages may be harmed by it. Lisp is a meta-language and it facilitates building a Babel tower of eDSLs for each and every little project. It is the main source of its unmatched power.
Re:If Lisp Is So Great (2003) by ridiculous_fish on Saturday November 28, 2015 @05:19AM (#10640676)
But this doesn't require the proliferation of implementations. Each little project doesn't require its own garbage collector, for example.

The paper I linked discusses some of the "practical" areas of Haskell: profiling, debugging, packaging, FFI, compiler errors and optimizations, etc. Surely there's a lot of energy being expended replicating this stuff across the various Lisp implementations?

Re:If Lisp Is So Great (2003) by mbrock on Saturday November 28, 2015 @05:41AM (#10640708)
There happens to be wide community consensus around a single Haskell compiler, GHC, at the moment, but that's a contingency and there are some other compilers, interpreters, and stuff like GHCJS. Profiling and debugging support is a feature of GHC (and other implementations), not of the language standard.

Common Lisp has unified packaging and FFI and stuff through various community projects like ASDF and Quicklisp.

If you're talking about Lisp in the general vague sense of "Lisps" then there can't be general interoperability because that umbrella term covers lots of very different languages with no formal common ground.

Re:If Lisp Is So Great (2003) by zodmaner on Saturday November 28, 2015 @05:49AM (#10640715)
There aren't that many Lisp implementations, especially those that are considered to be mature and ready for production.

For Common Lisp, the open source ones are SBCL and Clozure CL, and the proprietary ones are Allegro CL and LispWorks.

For Scheme, there are Racket (PLT Scheme), Chicken Scheme, and Guile.

I'm quite certain that the majority of people who use Common Lisp and/or Scheme use one of the aforementioned implementations.

Re:If Lisp Is So Great (2003) by sklogic on Saturday November 28, 2015 @09:27AM (#10641123)
Even GC cannot be a common ground for everything. Take a look at Harlan, a Lisp-like language with a region-based memory management. Unification harms diversity and flexibility.
Re:If Lisp Is So Great (2003) by bitdiddle on Saturday November 28, 2015 @06:03AM (#10640736)
I would include Guile in this list of lisps :)
Re:If Lisp Is So Great (2003) by greggman on Saturday November 28, 2015 @04:28AM (#10640600)
This is spot on for me. I actually have used lisp in one large project but I haven't used it since. It wasn't my choice then and the guy who's choice it was was a total lisp guru. I don't have his chops. I did enjoy parts of it but not enough to switch

The biggest issue for me vs other options is lack of community / packages

Pick Python, JavaScipt, even Perl and there's millions of solutions to pick from so you can get shit done. Maybe that stuff exists for lisp but I'm unaware of it.

If there was a popular lisp with something like npm, easy integration with non lisp libraries I might consider it.

There's also the issue of perf. The lisp I used was optimized for generating machine code for games. My understanding is most lisps don't perform at that level. Of course as a replacement for Python, perl, JavaScript that's not an issue. But it would be for C/C++ for games

Another issue is finding collaborators.

Re:If Lisp Is So Great (2003) by giancarlostoro on Saturday November 28, 2015 @04:04AM (#10640548)
The easiest Lisp I would recommend is probably Racket, it is what got me into Lisp personally. After that I would give Clojure a shot, it has some amazing tools like lein.

I think first time setup is a huge key for programming languages. For example Go has the benefit of an amazing out of the box standard library, unlike D and Ruby where you would install via a package manager the right tools to get a web project going, you could do it all from vanilla Go code.

Of course in both Ruby and D you could do it from vanilla code, but it's not as seamless and tried and tested I suppose?

Re:If Lisp Is So Great (2003) by jwdunne on Saturday November 28, 2015 @05:21AM (#10640680)
If you are reading SICP or want to, Racket is also a good choice here. I bounced between SICP and The Little Schemer with Racket. I didn't use the SICP language until later on but I found that Rackets documentation was so good that it was pretty easy to fill in any blanks.

All in all, that experience was useful to me to both learn Scheme, learn core concepts, such as recursion, higher order functions, closures and so on whilst also paving a familiarity that has aided in quickly picking up CL, Clojure and also, in my opinion, Haskell.

I would recommend Racket whole heartedly.

Re:If Lisp Is So Great (2003) by sheepmullet on Saturday November 28, 2015 @06:19AM (#10640769)
> Clojure is surely the best known modern LISP, but I do not want to depend on the JVM.

Why don't you want to depend on the JVM?

You are deliberate ignoring the most well known modern lisp, which has straightforward installation, great tooling, and lots of support available.

Not to mention the JVM is one of the most powerful and highly optimised vm platforms and has hundreds of thousands of man years invested in high quality libraries.

> Speaking as an outsider, I think LISP would gain a lot more traction if its community coalesced around a single implementation

And surely they would focus around a JVM implementation. The only other platforms that even come close are c/c++, and the .net clr.

Re:If Lisp Is So Great (2003) by Scarblac on Saturday November 28, 2015 @05:42AM (#10640709)
> (Clojure is surely the best known modern LISP, but I do not want to depend on the JVM.)

What are the reasons you don't want to depend on the JVM that don't apply doubly so to Common Lisp?

Re:If Lisp Is So Great (2003) by sklogic on Saturday November 28, 2015 @04:01AM (#10640543)
All the modern lisps are installed just like anything else, whith apt-get install. I've no idea what are you talking about.
Re:If Lisp Is So Great (2003) by blue1 on Saturday November 28, 2015 @05:40AM (#10640703)
I don't know if this is still the case, but for SBCL on Debian installing with apt-get would get you an incredibly outdated version, and all that common-lisp-controller nonsense. The standard advice was NOT to install with apt-get, but to install manually.
Re:If Lisp Is So Great (2003) by giancarlostoro on Saturday November 28, 2015 @04:06AM (#10640556)
Usually apt-get doesn't feature the most recent up to date release, also you assume everyone uses a Debian derived distribution of Linux, bad assumption. I'm on openSUSE and I'm sure many are on Windows or Mac.
Re:If Lisp Is So Great (2003) by pm215 on Saturday November 28, 2015 @05:27AM (#10640690)
If you need the absolute most recent release of a language to write code in it, that in my opinion is a bad sign -- maybe it's still a bit new and evolving rapidly, if there's a runtime component it might be awkward to distribute to machines you want to run on, and setting the dev environment up becomes a little painful which can discourage others from contributing. Not a dealbreaker, especially if you're just experimenting or doing a small private project, but for anything serious I would be worried if I couldn't develop and run it with whatever version of a language is shipped with the major Linux distros.
Re:If Lisp Is So Great (2003) by giancarlostoro on Saturday November 28, 2015 @10:48AM (#10641338)
I'm on about it being behind 2 or more major versions.
Re:If Lisp Is So Great (2003) by sklogic on Saturday November 28, 2015 @04:32AM (#10640612)
I meant "apt-get" or whatever else is used in your system - brew, yum, whatever.
Re:If Lisp Is So Great (2003) by vram22 on Saturday November 28, 2015 @03:57PM (#10642394)
> (shiver)

Nice "syntactical" touch :)

Let me try a variation:

(shiver 'me 'timbers)

Re:If Lisp Is So Great (2003) by fnordsensei on Saturday November 28, 2015 @05:18AM (#10640674)
You can run Clojure on Node if you prefer. That's what I'm doing in a current project.