top | item 16860646

Running Lisp in Production (2015)

138 points| tosh | 8 years ago |tech.grammarly.com | reply

68 comments

order
[+] sacheendra|8 years ago|reply
I like lisp as a programming language.

But, this article gives one of the reasons for avoiding its use in a high performance production environment. Provisioning a VM with over 25GB RAM for an application which requires about 4GB of it is a huge waste of resources.

While the common wisdom on HN is that for most applications, developer costs more than physical resources. Physical resources still cost money.

Initially list might be a good option for development velocity. But, over time as the application matures, adding features becomes more complicated and the velocity goes down anyway. Shifting to something which reduces costs by upto 6x might be worth it.

[+] ruricolist|8 years ago|reply
This is not so much a Lisp problem as an SBCL problem. SBCL just doesn't have a very good garbage collector. I nearly gave up on Lisp fighting with it, but ultimately switched to Clozure instead, and never regretted it: Clozure has a fantastic garbage collector. I run Clozure and Postgres side by side on one 4G Linode without a peep.
[+] orthecreedence|8 years ago|reply
I wrote some high-performance lisp applications in production. My main was was a threaded queue worker, driven off beanstalkd, that processed large volumes of data. This was highly successful and didn't require overly-provisioned servers (was using CCL/linux x64/linode VPS).

That said, I don't think I'll ever use lisp for front-facing web stuff again. I wrote cl-async, and afterwards and used it in production in a few places, then a bit later started using node heavily. The tooling for CL is just not there. Quicklisp is great, but not being able to pick and choose package versions is limiting, and having to rewrite every single thing for async was a pain (since CL doesn't have continuations, any sort of async that avoids CPS is impossible). I was hoping I would get more community support on cl-async, and I did get many hands helping, but eventually it just became too much to maintain. So if you're doing network stuff on CL, it's probably best to just use threaded, which IMO just doesn't handle the same amount of load evented does, at least when dealing with web APIs.

One thing I used lisp for briefly which I want to do again soon is game dev. Being able to redefine/fix portions of your program while it's running is fantastic, especially when you have huge amounts of state to deal with like you do in games. I wouldn't exactly call that running CL in production, though.

[+] cag_ii|8 years ago|reply
I don't necessarily disagree with you, but provisioning 16-32gb for a production server doesn't seem to be unusual these days and the cost negligible...

<Insert electron/slack joke here>

[+] cmrdporcupine|8 years ago|reply
> Provisioning a VM with over 25GB RAM for an application which requires about 4GB of it is a huge waste of resources.

Like pretty much every JVM-based application ever? For the last 15 years?

[+] wildster|8 years ago|reply
Yes, when Elixir runs amazing on a $5 a month digitalocean account.
[+] vseloved|8 years ago|reply
well, those 25 GB come bundled with the number of hyperthreads that we used (i.e. 8 for an AWS xlarge server), so we didn't bother to optimize for memory usage
[+] fao_|8 years ago|reply
I wonder if Chicken Scheme has the same memory problems as SBCL. It seems to me that it shouldn't.
[+] eecc|8 years ago|reply
You've never run a Tomcat from 2009 haven't you?
[+] outworlder|8 years ago|reply
What would that something be?

Most "mainstream" languages aren't any better.

[+] aeorgnoieang|8 years ago|reply
> While the industry waits for LightTable and similar tools to mature, Lisp programmers have been silently and haughtily enjoying such capabilities with SLIME for many years.

Were a significant number of Lispers really waiting for LightTable to be usable for them?

[+] JamesLeonis|8 years ago|reply
Clojure guy here, FWIW

The big deal with tools like LightTable is it's much easier for newcomers to start working on projects. I understand why a user wouldn't want to learn both a language and an editor. One huge issue we struggle with emacs/slime as the editor of choice. Personally I'm a VIM guy, so I got it working there, but that's after I spent some time deep in Vimscript and fiddling with plugins. It's a lot to ask for people that are new, or those that have an editor of choice that isn't supported.

[+] cup-of-tea|8 years ago|reply
I doubt many Lispers were because we already have emacs and SLIME. One of the most fun things I did was running a window manager called stumpwm and running swank in that image so it could be modified on the fly with emacs. That's also how you modify emacs itself. It's just so cool to use a tool to modify itself while it's running...
[+] KingMob|8 years ago|reply
If so, they will sadly be waiting forever, as LightTable is largely dead.

The creator, Chris Granger, abandoned it for his next project, Eve. After it became clear Chris had left, the community tried to pull together and continue, but it looks like it hasn't been updated in months.

[+] cag_ii|8 years ago|reply
Presumably "the industry" ≠ "lisp programmers"...
[+] mping|8 years ago|reply
Almost all clojure ide I have used have similar capabilities to lighttable (emacs, atom, sublime, intellij with plugin) because they know how to talk to the nRepl
[+] Lionsion|8 years ago|reply
> Fortunately, this obscure Stack overflow question helped [https://stackoverflow.com/questions/442556/spec-for-junit-xm...] — we ended up having to build this into our own testing library should-test.

> closed as off-topic by kleopatra, Martijn Pieters Jun 19 '15 at 19:55

All the best SO questions get closed.

[+] jimbokun|8 years ago|reply
And the reason given for closing it demonstrates zero understanding of the question being asked.

"Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam."

The question is asking how to find the specification for an XML format. This is very much a "only one correct answer" kind of question, not a "which X do you like best?" kind of question.

[+] Something1234|8 years ago|reply
Seems completely justified to be closed. Although this does seem to fall in scope as it would be very difficult to locate without knowing exactly what you are after.