Live data from Hacker News

Running Lisp in Production

tech.grammarly.com

91–100 of 119 posts

Re: Running Lisp in Production

#91
post #19
post #6

Is it worthwhile to explore Clojure for web-dev seriously or more as a toy?

Is there a Clojure/Clojurescript tutorial similar to the Hartl Rails tutorial? I have amassed quite a few Clojure books, but find the easiest way to learn is to build.

this might be a good starting point if you're looking for a simple example http://www.luminusweb.net/docs

Re: Running Lisp in Production

#92

We deploy distributed, multi-language, centrally Lisp/SBCL servers as well. A few specifics that I'd point out: Many of SBCL's optimizations are fine grained selectable, using internal SB-* declarations. I know I was at least able to turn off all optimizations for debug/disasm clarity, while specifically enabling tail recursion so that our main loop wouldn't blow up the stack in that build configuration. These aren't…

That's interesting. Did you know you can create an infinite loop in C++ using while(true)? You don't even have to exhaust documentation and ask an IRC channel guru.

Re: Running Lisp in Production

#93
post #49

Earlier quoted context omitted.

I don't know how they do it, but I have run several Lisp production systems. I use CCL, which has a really fast compiler. So I just load the code from source. The deployment process then becomes: git pull, quit and restart Lisp. (The ccl-init file loads the code.)

And in that case how do you handle the monitoring of the system?

This is why I switched from running daemons in tmux to having them start a slime listener; I can monitor them from any standard process monitor that will log errors and restart (I use daemontools with a run-script that sends me an e-mail to notify me of the restart).

Re: Running Lisp in Production

#94
post #10

Very informative. Thank you. Anyone here has any experience with the GCs of Allegro or LispWorks or any other commercial Lisp implementations?

LispWorks has a lot of features in its GC. Years ago it was used in a demanding telco application, an ATM switch. It was also used on a space mission experiment. Generally the runtime is very very nice. Franz Inc uses Allegro CL in a large database. They tuned the GC quite a bit for that. But there were also other GC demanding applications on Allegro CL, for example in CAD and 3D design. They are now working on a con…

Who used lispworks in an ATM switch? My very first job was working on ATM/IMA switches.

Re: Running Lisp in Production

#95

Slightly off-topic, but does anybody know of a kind of "LISP Challange" set? I recently started the Matasano challenges[0] and I found them really well-suited to my style of learning (learning by doing and expanding by reading relevant material, enabled by my own internal motivation). Is there anything like that that has a relatively small set of condensed yet rich challenges that demonstrate key elements from LISPy…

Hi, I don't know if it fits what you want. But there is something like that for clojure[0] . I liked the language a lot. I didn't have the chance to use it in production yet. Another option is hacker rank with challenges [1] [0]https://www.4clojure.com/ [1]https://www.hackerrank.com/

Re: Running Lisp in Production

#96

Apparently they use "JVM languages", JavaScript, Python, Go, Lisp and Erlang in production. I may be in the minority, but that would drive me mad. I assume they're not routinely jumping between those stacks multiple times a day, but even so is there really that much benefit that it's worth keeping track of how to do things in that many different environments?

Since "proper service encapsulation" is mentioned, it may be that each team uses whatever they like, and as long as your component speaks http you don't have to look at what other components are doing.

That makes sense, having spent the last five years on a development team that has only recently grown to four people I can forget that not every team needs all their developers to be able to work on any project!

Re: Running Lisp in Production

#98
post #15

Good lord, I would go insane if I ran into a bug like this: "We've built an esoteric application (even by Lisp standards), and in the process have hit some limits of our platform. One unexpected thing was heap exhaustion during compilation. We rely heavily on macros, and some of the largest ones expand into thousands of lines of low-level code. It turned out that SBCL compiler implements a lot of optimizations that a…

I dont really understand the downvotes... I agree with you would go nuts. My two cents, if your macro is expanding to thousands of lines of code, your doing something wrong I think. I would expect Macros to expand out to a few lines of code which might have function calls that themselves may contain however many lines of code... but expanding to thousands of lines INLINE via macros seems wrong.

You're getting a lot of pushback on this, but I think it's a legitimate question at the very least. In this situation I would wonder whether some procedural abstractions could be introduced to cut down the size of the expansions.

And before anyone jumps on me -- I have 35 years of Zetalisp and Common Lisp experience and have written some pretty hairy sets of macros. There might turn out to be no easy way to make the expansions smaller, but there's nothing wrong with asking the question.

Re: Running Lisp in Production

#99
post #83

Earlier quoted context omitted.

Yes, exactly. (And no worries about rookie questions. That's how people become non-rookies.) In my case, I run the REPL using screen so I can go back to it for debugging if I need to. But you can also run "headless", without a REPL at all if you want.

How do you deal with existing connections to the Lisp service when you want to deploy? e.g. remove from load balancer, wait up to n minutes for connections to drain?, git pull, quit, restart Lisp, re-add to load balancer. ?

Yep, pretty much. I've only ever dealt with low-load applications so there was no load balancer. You just put the Lisp server in a state where it refuses new connections (serves up a "temporarily down for mx" page, or reconfigure the ngingx front end to do that), wait for existing connections to finish, and then restart. It's no different from any other server.

Re: Running Lisp in Production

#100
post #64

Earlier quoted context omitted.

I don't understand the question. Once it's running, it's like any other server, and you monitor it like you would any other server written in any other language.

Speculation here, but based on the context, I think the question is: Some daemon-izer solutions will monitor the daemon and e.g. restart it if it's unresponsive. How do you handle this slash how is this handled in the Common Lisp world?

As a last resort, if Lisp becomes totally unresponsive, you kill the process and restart, same as any other language. But it's pretty rare to lose the REPL, so usually you can fix any unexpected problems through that.
Post reply on HN