News for hackers. Stuff that matters.
Re:How to write Common Lisp in 2017 – an initiation manual by AlexCoventry on Tuesday March 28, 2017 @03:16PM (#13979721)
Can someone point me at an argument for why I'd want to write CL in 2017, given all the great alternatives available now?
Re:How to write Common Lisp in 2017 – an initiation manual by pnathan on Tuesday March 28, 2017 @04:13PM (#13980222)
It's a seamless dynamic programming language, which can, with care, be given excellent performance and a high level of abstraction. In my opinion, it's miles better than the other dynamic languages out there, by nearly every factor. It rewards investment and development very well; it's a tool for mastery, not for quick and easy starting.

If you're looking for statically typed languages, it's not going to win there. But my experience writing a lot of Perl and Python, with a certain amount of helping with Clojure and Ruby experience, strongly indicates that Common Lisp is very very competitive there outside of the 'library' front.

Re:How to write Common Lisp in 2017 – an initiation manual by ue_ on Tuesday March 28, 2017 @05:23PM (#13980858)
The Common Lisp library ecosystem isn't as polished as it is in Python from what I know. Nor is the documentation for many libraries up to scratch, even the stellar ones. Some libraries merely document the functions provided and don't go into how to use the library. Even stellar libraries such as Hunchentoot do this, which I find rather annoying after using Python libraries which seem to make it an important point to tell you how to use things.

I love CL and the idea of Lisp in general, but its modern unpopularity makes it hard to ask questions (because chances are you won't get a response any time soon) and the library situation is a real downer.

Re:How to write Common Lisp in 2017 – an initiation manual by pnathan on Tuesday March 28, 2017 @09:55PM (#13982661)
The CL community tends to expect you to read the source. You're not just a user, you're a programmer too - and quite possibly of the library you want to use.

It's an interesting dynamic, very alien to modern computing modalities.

Re:How to write Common Lisp in 2017 – an initiation manual by jabl on Wednesday March 29, 2017 @02:46AM (#13983966)
Sometimes I get the feeling that the lack of CL libraries is somewhat self-imposed. "We don't need no stinking libraries. Since CL is so AWESOME, a competent CL programmer can reimplement whatever he needs in a fraction of the time that programmers using a lesser language would need even with the help of ready-made libraries". See "smug Lisp weenie".

Not saying that the above is actually factually true; certainly quicklisp has done a lot to make 3rd party libraries a lot more approachable.

Re:How to write Common Lisp in 2017 – an initiation manual by wruza on Wednesday March 29, 2017 @10:13AM (#13986354)
I'm not an experienced web/http developer, but it [1] seems pretty understandable and even contains "Your own webserver (the easy teen-age New York version)" section for those who don't care, give them teh routez guys. define-easy-handler serves exactly that purpose.

From what I'm able to recall from my childhood, all docs were like that.

  [1] http://weitz.de/hunchentoot/
Re:How to write Common Lisp in 2017 – an initiation manual by edem on Tuesday March 28, 2017 @06:55PM (#13981617)
Do you prefer it over Clojure? If yes why? I'm a bit versed with Clojure but sometimes I feel that it is not a true lisp.
Re:How to write Common Lisp in 2017 – an initiation manual by cronjobber on Wednesday March 29, 2017 @05:20AM (#13984539)
> sometimes I feel that it is not a true lisp.

That feeling may be the result of some questionable syntactic design decisions in Clojure.

Hickey went over Lisp syntax and tried to remove parentheses wherever possible. (It was the hip thing, PG's Arc did it, too, which may be where Hickey got it from.) As a result, you get a sub-par editing experience —generic sexp-based structure editing doesn't get you as far as with a Lisp— and diminished readability once you get above three omitted pairs of parentheses in a row.

On the other hand, Clojure arbitrarily mandates a secondary kind of list literal in some places of the syntax, again making Clojure harder to write and edit. I don't even see a readability benefit, but of course YMMV.

TL;DR: Clojure syntax is a "complected" derivative of Lisp :-)

Re:How to write Common Lisp in 2017 – an initiation manual by joe-user on Wednesday March 29, 2017 @03:23PM (#13989699)
> you get a sub-par editing experience [in Clojure]

Paredit and vim-sexp have no problem doing structural editing. I don't use it myself, but Parinfer was created with Clojure in mind and people seem incredibly happy with it.

> diminished readability [in Clojure]

If you watched the talk that you lifted "complected" from, you'd know that this is subjective. Is German unreadable because I don't know German?

> Clojure syntax is a "complected" derivative of Lisp :-)

Complected in some ways sure, but far less so than many lisps, and certainly less so than Common Lisp. It seems your familiarity is complected with your reasoning.

Re:How to write Common Lisp in 2017 – an initiation manual by edem on Wednesday March 29, 2017 @02:53PM (#13989423)
So you seen that video? Great talk though.
Re:How to write Common Lisp in 2017 – an initiation manual by pnathan on Tuesday March 28, 2017 @09:54PM (#13982649)
Yes.

Clojure often feels like a skin over Java; an ergonomic library. Most visibly this is manifested in stack traces.

Clojure also wants to compile files, rather than read them.

There are good ideas in Clojure, but they lie around the parallelism abstractions, not around the implementation.

Socially, of course, the JVM has a huge mindshare.

Re:How to write Common Lisp in 2017 – an initiation manual by cutler on Tuesday March 28, 2017 @07:46PM (#13981958)
Much as I love Clojure I find the list vs seq abstraction goes against the lisp tradition.
Re:How to write Common Lisp in 2017 – an initiation manual by brudgers on Tuesday March 28, 2017 @11:19PM (#13983089)
Common Lisp has a sequence type that includes lists and vectors (and because strings are vectors, strings). Ordinary functions like sort, remove, find, reverse, and length operate on them.

Clojure's seq extends the abstraction to include maps and sets and other types implementing the interface.

Re:How to write Common Lisp in 2017 – an initiation manual by baggers on Wednesday March 29, 2017 @07:22AM (#13985033)
There are some other practical answers here so I'll take a different angle.

Fun! CL is a language to play in, after a day of wrangling Java & ObjC issues I love settling down to just play in an environment that lets blast some code out and play with ideas. Of course this applies to other languages too and this is dependent on your interests, so the case I want to put out there is:

Even if a language isn't suitable for your current business needs, see if it gives you joy. Languages have trades offs to meet their goals, evaluate languages for pleasure too.

Also come visit #lispgames on freenode sometime..most of us are procrastinating making engines but it's always nice to have new folks around.

Re:How to write Common Lisp in 2017 – an initiation manual by agentultra on Tuesday March 28, 2017 @03:31PM (#13979862)
I'll take a stab at this glib comment:

1. You've inherited an application written in Common Lisp

2. Common Lisp has features you find desirable that aren't available in another system

3. You like Common Lisp

4. Common Lisp helps you get the thing you're trying to do, done

Re:How to write Common Lisp in 2017 – an initiation manual by reinhardt on Tuesday March 28, 2017 @05:23PM (#13980853)
You can replace "Common Lisp" with any other language and these points still stand (at least in a tautological, nonsensical way).
Re:How to write Common Lisp in 2017 – an initiation manual by jimbokun on Wednesday March 29, 2017 @11:07AM (#13986959)
Those are the kind of answers "glib" questions tend to get in response.
Re:How to write Common Lisp in 2017 – an initiation manual by pekk on Tuesday March 28, 2017 @06:33PM (#13981439)
You're right that these arguments apply to many languages, but they're not tautological or nonsensical and the choice of Lisp (like many other choices) can be defended.
Re:How to write Common Lisp in 2017 – an initiation manual by AnimalMuppet on Tuesday March 28, 2017 @03:36PM (#13979904)
1. Because I was forced to? That's not why I'd want to.

2. Examples?

3. Fair enough. Though AlexCoventry's question probably shows that he does not (currently) like Common Lisp, so this answer doesn't give him a reason.

4. Sure, that's true for every language and tool. Choose it when it helps you, don't when it doesn't. But why would CL help me more than another language?

Re:How to write Common Lisp in 2017 – an initiation manual by TeMPOraL on Tuesday March 28, 2017 @03:54PM (#13980078)
To 2 and 4.

Better exception handling (conditions and restarts), advanced OOP capabilities, proper macros which are convenient to use (pretty much requires a language to be homoiconic), image-based development with ability to hot-swap any code in a running program, including but not limited to full class redefinitions without losing data. All that with resulting code able to achieve close-to-C++ performance thanks to very good (commercial and open-source) compilers. Not to mention the stability of the language thanks to the ANSI standard.

Re:How to write Common Lisp in 2017 – an initiation manual by agentultra on Tuesday March 28, 2017 @03:54PM (#13980066)
> 1. Because I was forced to? That's not why I'd want to.

You might find it pleasant. Who knows? Maybe you're a professional and you'd want to understand CL so that you can embrace and extend the system you've inherited.

> Examples?

Conditions and restarts. Incremental compilation. CLOS. Numerics.

> 4. Sure, that's true for every language and tool. Choose it when it helps you, don't when it doesn't. But why would CL help me more than another language?

CL is more like a system than a compile-and-run language. The compiler, debugger, standard library, and platform libraries all live in the image. You build the program as you go, incrementally, and can inspect it while it is running.

An error doesn't halt the entire process... instead condition handlers can either choose a restart (including asking the user what to do) and the execution continues. That's where you can attach to a remote image running on a server, notice that there's an error with a particular request, inspect the entire stack, fix the problem, and continue the request. No need to crash or anything like that. If a more hands-off approach is necessary then a handler can be written to choose an appropriate restart.

CLOS is great. You can change the class definition in a running image and the instances will incrementally update without recompiling and restarting the program (and rebuilding all of that state).

You can develop the language you need with these tools instead of using the language you've chosen (or inherited). Need an interactive prover? Try ACL2. Experimenting with sequent calculus? Want a language built around recursive fractals?

Re:How to write Common Lisp in 2017 – an initiation manual by Volt on Wednesday March 29, 2017 @01:35AM (#13983716)
>1. Because I was forced to? That's not why I'd want to.

Better than rewriting the whole thing in your pet language.

Re:How to write Common Lisp in 2017 – an initiation manual by phlakaton on Tuesday March 28, 2017 @06:13PM (#13981250)
This is a question that has been answered many times over the years. Search for "why common lisp" and you'll get a long list of them.

The answers now, IMO, are not substantially different than they were, say, ten years ago. The big differences, I think, are the new competitors in the LISP world: the rise of Clojure, and the rebranding and further development of PLT Scheme as Racket.

Re:How to write Common Lisp in 2017 – an initiation manual by lokedhs on Wednesday March 29, 2017 @05:15AM (#13984522)
I did a presentation about this some time ago where I try to explain how I develop Lisp software. Perhaps someone will find it informative:

https://engineers.sg/video/web-development-in-emacs-common-l...

Re:How to write Common Lisp in 2017 – an initiation manual by HeinzPanzer on Tuesday March 28, 2017 @06:13PM (#13981246)
Well then you are giving us a fantasy scenario. Because in reality, the alternatives are not great.