10 ms·
Running Lisp in Production (2015)
- jgwil2 6y agoFrom 2016
- deleted 6y ago[deleted]
- phoe-krk 6y agoPrevious discussions: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=Running%20Lisp%20in%20Production%20grammarly&sort=byDate&type=story https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
- dang 6y agoYou can add "comments>0" to get the ones with comments: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=Running%20Lisp%20in%20Production%20grammarly%20comments%3E0&sort=byDate&type=story https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
- deleted 6y ago[deleted]
- capableweb 6y agoInteresting, seems the "comments>0" op is undocumented, couldn't find it anywhere on the algolia page. Is there a page with all the different operators you can use?
- dang 6y agoIt's documented here: https://hn.algolia.com/help https://hn.algolia.com/help. You have to click 'help' at the bottom of the search page, I guess. Another option I use, which doesn't appear on that page, is storyText=none, if you want to exclude matches from text posts. That one has to go in the URL, though. Note the difference between the link in my GP comment vs. this one: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=Running%20Lisp%20in%20Production%20grammarly%20comments%3E0&sort=byDate&type=story&storyText=none https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que... The latter creates much cleaner search results if you want to match just on title and URL.
- naveen99 6y agoFinally read the reference on lisp reader macros : http://www.lispworks.com/documentation/HyperSpec/Front/X_Mast_9.htm http://www.lispworks.com/documentation/HyperSpec/Front/X_Mas... Now I sort of get what #+unix means...
- reikonomusha 6y ago#+foo A B This says if the Lisp supports “foo” as a “feature” (a precise term in Common Lisp), the A will be included. Otherwise A will be treated as a comment. B will be included regardless. It’s roughly equivalent to #ifdef foo A #endif B The opposite is #-. #-unix A B is roughly #ifndef unix A #endif B So you can write portable source code this way. (defvar path-separator #+unix "/" #+windows "\\" #-(or unix windows) (error "idk")) This will define a variable called PATH-SEPARATOR which is / for UNIX, \ for Windows, and a compile-time error otherwise. The rabbit hole goes deep on this. There’s a reason it uses ‘#’, and as you pointed out, it has to do with built-in (dispatching) reader macros.
- lisper 6y ago#+ is only one of many, many standard reader macros (as you can see from that link). You can also define your own, which makes Lisp syntax almost infinitely malleable. For example, it's possible to change the Lisp reader so that it natively reads infix syntax. See: http://flownet.com/ron/lisp/djbec.lisp http://flownet.com/ron/lisp/djbec.lisp for an example. Scroll down to the definition of xpt-add.
- jlarocco 6y agoFor the benefit of everybody else, #+ does feature checking. The Common Lisp standard defines a standard "special variable" (kind of like a global) named * features * (shouldn't be spaces, but HN italicizes it otherwise), and #+ (and #-) take a "feature expression" and conditionally execute the expression that immediately follows it when the feature expression is true. If the feature check is false, the next expression is ignored. For example: #+freebsd(print "This is FreeBSD") #+(not (and 64-bit linux))(print "This is not 64-bit Linux.") #+quicklisp (ql:quickload :some-library) The CL standard lists a few standard features (:common-lisp, :ieee-floating-point, etc.) but for the most part implementations and libraries define their own. It's not perfect, but works well enough in practice.
- codersfocus 6y agoThis is officially the hardest I've laughed at a grammar mistake. At the end of the third line, there's a missing space between "years." and "We". Petty, I know, but I expect a grammar company who took over my Youtube ads earlier about writing perfect emails and blog posts to have perfect blog posts.
- dirtydroog 6y agoEarlier? I still get them
- dirtnugget 6y agoI seriously don’t get why lisp is so popular on HN, it’s basically unreadable to very most of developers. It’s an ivory tower.
- fetbaffe 6y agoI think you answered your own question.
- dirtnugget 6y agoThere is no good reason to use an esoteric language in production except in order to make yourself irreplaceable.
- dirtnugget 6y agoAnd that’s the epitome of selfishness
- dirtnugget 6y agoRemember Rick: https://link.medium.com/iRs4xvGXK6 https://link.medium.com/iRs4xvGXK6
- bluefox 6y agoHere you go https://plaster.tymoon.eu/view/678 https://plaster.tymoon.eu/view/678
- capableweb 6y agoI wouldn't say Common Lisp is a esoteric language. Esoteric makes me think Brainfuck and other similar languages. Common Lisp and lisps in general are languages you can be productive in, in a "building a product" sense, which you cannot say about most esoteric languages.
- 6y ago
- dang 6y agoSee also: 2019 https://news.ycombinator.com/item?id=20814511 https://news.ycombinator.com/item?id=20814511 2018 https://news.ycombinator.com/item?id=16860646 https://news.ycombinator.com/item?id=16860646 and https://news.ycombinator.com/item?id=16679963 https://news.ycombinator.com/item?id=16679963 Discussed at the time: https://news.ycombinator.com/item?id=9785944 https://news.ycombinator.com/item?id=9785944 Edit: also https://news.ycombinator.com/item?id=23231701 https://news.ycombinator.com/item?id=23231701 from a few days ago.
- faq125 6y agoThank you for the links, what a nice discussion back in 2015. Everything has gotten more corporate. I hardly dare to make a Lisp comment now, because people from $BIGCORP would jump on it.
- dang 6y agoReally? Please dare. I don't think $BIGCORP is so dominant here, or that things have changed so much since 2015. Most changes that people notice on HN are random fluctuation. Note that I don't say all changes—just most. The trouble is that it's hard to figure out which ones are vs. aren't, and none of us really tries. We just notice the data points we notice (which, btw, are the ones we're primed to notice—usually whatever we dislike the most) and connect the dots with material from our imagination. It's an amazing thing! Randomness plus cognitive bias equals narrative. There's a thread about this on the front page right now: https://news.ycombinator.com/item?id=23293462 https://news.ycombinator.com/item?id=23293462. I've been saying the same thing about people's interpretations of HN for years: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=by%3Adang%20notice%20dislike&sort=byDate&type=comment https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que... https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=by%3Adang%20narrative%20random&sort=byDate&type=comment https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
- rusabd 6y agoBack in Amazon I found some ancient code written in Common Lisp. Doubt any production services left, but I updated the build system to support Clozure CL. My contribution in $BIGCORP :)
- ken 6y agoWas it the "You may also be interested in:" box on product pages? I remember going to a tech talk, many years ago, by the person who wrote that.
- rusabd 6y agoNah, I implemented a simple wrapper around an internal tool for auto-translating Oracle PLSQL to SparkQL. Data Engineers liked that a lot
- deleted 6y ago[deleted]
- fardeem 6y agoThis is so cool
- ngcc_hk 6y agoFor normal small team it might be hard to get advise. More diverse users in other eco-system. Even clojure is hard. At least the code is easier to read.
- emit_time 6y agoMy previous job was all common lisp. I really enjoyed writing it. The REPL was definitely a job, and having a dynamic runtime environment.
- lerax 6y agoOn reddit I found that following questions. I would be glad for some possible answers. --------- That was a good post. I wonder if the tech stack still uses Common Lisp after these 5 years, considering all other languages described in the post? Are there any new lessons learned after running Common Lisp for another 5 years, if it is still actively used? Would you pick up Common Lisp again or something else, if you can go back in time and get a chance to start fresh? Thanks!