5 ms·
Does anyone here use Common Lisp for their day job? I'd like to try it out some time (and am currently working through Paradigms of AI Programming by Norvig) bu
by exdsq 6y ago
Does anyone here use Common Lisp for their day job? I'd like to try it out some time (and am currently working through Paradigms of AI Programming by Norvig) but it feels like the language is so bendable that it'd be a minefield for a large team.
- fidesomnes 6y agoI used to work at an AI firm that used it. Large Lisp codebases are a minefield with near impossible security and debugging issues. I still love it as a programming language tho.
- medo-bear 6y agoThere are a number of large companies that use CL quite effectively for safety critial purposes. Can you please give more details about your experience?
- exdsq 6y agoOut of interest can you give some examples?
- medo-bear 6y agosiscog in portugal is one example but there are others, historical and current. it is also used in quantum computing and financial markets. gramarly and google flights are perhaps the most famous current users of the software. edit: i adjusted my answer because i thought i was answering to parent
- abhinav22 6y agoI would love to hear more on the security challenges and debugging issues, if you have time. It’s not used as much in industry, so any insights are really very valuable. Also so cool that you worked in AI! That’s my dream field :)
- blacktriangle 6y agoI saw a fun debugging issue the other day on r/lisp that almost made me want to walk away from lisp for good. You have a function (defun my-val () "a string") Referentially transparent, easy to reason about right? Wrong. Lisp strings are mutable, and everything is a reference. So if you do something like this (replace (my-val) "b" :start1 0 :end1 1) (my-val) => "b string" I appreciate that CL doesn't force everything to be immutable, but it seems like at least strings would benefit from being treated as immutable values.
- abhinav22 6y agoInteresting example. Yes, it’s not a perfect language by any means :-) Some things are better in Lisp, some things are better in other languages as well for sure!
- kagevf 6y agoI remember that ... it was pretty surprising! I thought I could do (string "a string") to prevent it, but that didn't work. (concatenate 'string "a string") worked, though ...
- dreamcompiler 6y agoDestructive modification of literal objects is one of those things you're not supposed to do because the consequences are undefined [0]. Some CL implementations might let you get away with it; others might not. I agree that it would be better if immutability was required for literals. [0] http://www.lispworks.com/documentation/HyperSpec/Body/03_abac.htm http://www.lispworks.com/documentation/HyperSpec/Body/03_aba...
- blacktriangle 6y agoNice link. I'd be happy if an implementation just turned that into a compiler error. I can see use cases for reaching in and mutating like that, but also seems like dynamic scope is a better solution for when you want that kind of action at a distance.
- ska 6y ago> Large Lisp codebases are a minefield with near impossible security and debugging issues. Sounds about like most large codebases. Languages can't save you from this, it seems, only discipline can.
- mikelevins 6y agoI use it in my day job and have done so on and off for a little over thirty years. I've used it in team settings, as well as solo. It's a large force multipler solo and on small teams, but it can also be productive for larger teams. You want at least one experienced Lisper who can mentor the less experienced and build guard rails where needed. The good news is that it's unusually easy to build guard rails with Lisp because of that same "bendable" quality you mentioned. Another thing that is unusually easy with Lisp is building code-analysis tools. The source code is made of standard Lisp data structures that you can operate on with standard Lisp functions, and you can do it all interaactively in the live environment. That makes it much easier to build linters and other analysis tools than it is in most other languages. You need someone on the team who is experienced enough to know how to do these things, and team-oriented enough to want to do it. You also need to be aware that you probably don't know what guard rails and analysis tools you need when you're starting out. You'll discover them along the way. So you need project management with enough foresight to invest in prevention up front in order to save on cures down the road.
- abhinav22 6y agoWow - that’s awesome! We would all be really grateful for a blog of your experiences, if you have time one day. Which field do you use it in? I have a stereotype that it’s mostly used in scientific / quantitative fields
- mikelevins 6y agoI've used it for a long time, so forgive me if this reply gets long. I'm not the only or primary author of all of these; only a few of them. - Panels [Apple, circa 1988]: an experimental graphical UI framework with a built-in constraint solver and extensible event-handling system - GATE [Apple, circa 1989]: a knowledge-based, distributed, automated testing system used to discover and report thousands of application-compatibility bugs in Mac system software before release - bauhaus [Apple, circa 1991-1994]: an experimental Lisp OS for Newton. The Newton OS (except the microkernel) was written in Dylan back when it was basically Scheme+CLOS; the Dylan compiler and development tools were written in Common Lisp. - SK8 [Apple, circa 1995-1997]: rapid-application-development system sometimes referred to as "HyperCard on Steroids". - Reactivity Application Firewall [Reactivity, circa 1998-2004; later Cisco]: Reactivity's product was a complex application-in-a-box that provided rule-based application-level security and integrity for networks. Cisco bought our company and folded it into their product line. I used Common Lisp for several code-analysis and documentation tools used in development of the product. - Clozure Common Lisp [Clozure Associates, circa 2006-present]: I wrote documentation and code for Clozure Common Lisp and some associated tools - Secure Outcomes LS1100 [Secure Outcomes, circa 2010]: I wrote the bulk of the control system and GUI for the Secure Outcomes fingerprint livescanner product, using Lispworks. - Delectus [my own product, circa 2010-present]: Delectus 1, a simple personal data manager, was written mostly in Scheme. Delectus 2, a more capable, flexible, and portable version, is still under development and is written entirely in Common Lisp. - Confidential project [Confidential client; 2020-present]: a knowledge-based, reasoning-based neurosymbolic machine-control system. As I mentioned, it's confidential, but I can say that it's designed to monitor and orchestrate a variety of different kinds of robots with human supervision in real time. I've omitted several free libraries and other open-source Lisp software that I've written over the years.