TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Running Lisp in Production

397 pointsby f00biebletchalmost 10 years ago

18 comments

white-flamealmost 10 years ago
We deploy distributed, multi-language, centrally Lisp&#x2F;SBCL servers as well. A few specifics that I&#x27;d point out:<p>Many of SBCL&#x27;s optimizations are fine grained selectable, using internal SB-* declarations. I know I was at least able to turn off all optimizations for debug&#x2F;disasm clarity, while specifically enabling tail recursion so that our main loop wouldn&#x27;t blow up the stack in that build configuration. These aren&#x27;t in the main documentation; I asked in the #sbcl IRC channel on FreeNode.<p>You can directly set the size of the nursery with sb-ext:bytes-consed-between-gcs, as opposed to overprovisioning the heap to influence the nursery size. While we&#x27;ve run in the 8-24GB heap ranges depending on deployment, a minimum nursery size of 1GB seems to give us the best performance as well. We&#x27;re looking at much larger heap sizes now, so who knows what will work best.<p>While we haven&#x27;t hit heap exhaustion conditions during compilation, we did hit multi-minute compilation lags for large macros (18,000 LoC from a first-level expansion). That was a reported performance bug in SBCL and has been fixed a while back. Since the Debian upstream for SBCL lags the official releases quite a bit, it&#x27;s always a manual job to fetch the latest versions, but quite worth it.<p>Great read, and really familiar. :-)
评论 #9788009 未加载
评论 #9788020 未加载
评论 #9789028 未加载
Grue3almost 10 years ago
Common Lisp&#x27;s macros and grammar go together like bread and butter. A grammar module in the app I built [1] uses macros to generate huge amounts of repetitive code.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;tshatrov&#x2F;ichiran&#x2F;blob&#x2F;master&#x2F;dict-grammar.lisp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tshatrov&#x2F;ichiran&#x2F;blob&#x2F;master&#x2F;dict-grammar...</a><p>I wonder if they&#x27;re still hiring Lispers. I once passed on the opportunity to work in their Kiev office, but I might give it a shot again.
评论 #9787401 未加载
评论 #9787012 未加载
评论 #9787781 未加载
orthecreedencealmost 10 years ago
Great article, and good reminder on using trace. Every time I rediscover trace, I can&#x27;t remember how I ever forgot to use it in the first place for most of my problems.<p>I used CL in a production environment a while back for a threaded queue worker and nowadays as the app server for my turtl project, and I still have yet to run into problems. It seems like you guys managed to push the boundaries and find workable solutions, which is really great.<p>Thanks for the writeup!
doomroboalmost 10 years ago
Slightly off-topic, but does anybody know of a kind of &quot;LISP Challange&quot; 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 functional programming? I read some of SICP but reading long form really puts a damper on my motivation&#x2F;excitement. Also there were a lot of exercises (with a lot of overlap in concepts) so I didn&#x27;t know what to do and what not to do, since I wasn&#x27;t about to do every single one. Any pointers would be much appreciated!<p>[0] <a href="http:&#x2F;&#x2F;cryptopals.com" rel="nofollow">http:&#x2F;&#x2F;cryptopals.com</a>
评论 #9789305 未加载
评论 #9789094 未加载
davexunitalmost 10 years ago
Awesome stuff. Articles like this are what we Lispers&#x2F;Schemers need to show that our languages can be used for &quot;real work&quot;(tm).
PuercoPopalmost 10 years ago
One of the things I would have liked to see on the article is how do they handle the deployment itself. Do they build an executable with build app? To they used sb-daemon? An home-grown solution using sb-posix:fork?
评论 #9787196 未加载
评论 #9787390 未加载
dfischeralmost 10 years ago
Is it worthwhile to explore Clojure for web-dev seriously or more as a toy?
评论 #9786481 未加载
评论 #9786537 未加载
评论 #9786475 未加载
评论 #9786563 未加载
评论 #9787092 未加载
评论 #9786589 未加载
jon-woodalmost 10 years ago
Apparently they use &quot;JVM languages&quot;, JavaScript, Python, Go, Lisp and Erlang in production.<p>I may be in the minority, but that would drive me mad. I assume they&#x27;re not routinely jumping between those stacks multiple times a day, but even so is there really that much benefit that it&#x27;s worth keeping track of how to do things in that many different environments?
评论 #9786808 未加载
评论 #9786656 未加载
评论 #9786652 未加载
评论 #9788577 未加载
评论 #9786582 未加载
BlanketLogicalmost 10 years ago
Very informative. Thank you.<p>Anyone here has any experience with the GCs of Allegro or LispWorks or any other commercial Lisp implementations?
评论 #9786509 未加载
评论 #9786464 未加载
outworlderalmost 10 years ago
Aw, now they have disclosed their secret weapon! [1]<p>[<a href="http:&#x2F;&#x2F;www.paulgraham.com&#x2F;avg.html" rel="nofollow">http:&#x2F;&#x2F;www.paulgraham.com&#x2F;avg.html</a>]
akssrialmost 10 years ago
&gt; but we value choice and freedom over rules and processes.<p>Which I exactly why I feel Lisp doesn&#x27;t see much use elsewhere :(
lkrubneralmost 10 years ago
Good lord, I would go insane if I ran into a bug like this:<p>&quot;We&#x27;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 allow us to enjoy quite fast generated code, but some of which require exponential time and memory resources. &quot;
评论 #9786933 未加载
评论 #9786539 未加载
评论 #9787229 未加载
评论 #9787214 未加载
评论 #9787223 未加载
评论 #9786559 未加载
评论 #9787049 未加载
welshguyalmost 10 years ago
I love it :0) I tried grammarly, and typed in a remembered poem. It informed me that it had detected significant plagiarism.<p>Edit: It&#x27;s still not advice I would pay for, though.
avodonosovalmost 10 years ago
Thanks, great post and lot of useful references.
zenogaisalmost 10 years ago
This was fantastic. Thank you.
mud_dauberalmost 10 years ago
Wow. I can&#x27;t ever remember reading about a consumer-facing app using Common Lisp. Ever.
评论 #9788643 未加载
评论 #9789185 未加载
jjawssdalmost 10 years ago
Once you go deep enough you are fucked no matter what language you choose. Might as well pick one that doesn&#x27;t beat you up too much.
eruditelyalmost 10 years ago
Why not racket?
评论 #9791359 未加载
评论 #9788045 未加载
评论 #9787686 未加载