9 ms·
excuse my ignorance, but other than emacs, what are the uses of LISP?
by 0wl3x 10y ago
excuse my ignorance, but other than emacs, what are the uses of LISP?
- TeMPOraL 10y agoAll of them, it's a family of general-purpose programming languages :). From older uses, you have Lisp in Gimp, Audacity, several AAA video games by Naughty Dog, in AutoCAD and few other recognizable places. Reddit was originally written in Common Lisp, later rewritten to Python. More recently, Clojure (a Lisp for JVM and CLR) is gaining popularity in the Java world, and a lot of startups are using it. Hacker News itself is written in Lisp, BTW.
- joncampbelldev 10y agoJava dev here, just to add that coding in clojure is bringing joy back to my daily working life. I've introduced it into a couple of projects, the simplicity and flexibility are an amazing productivity boost. Some of that comes from clojure specifically, but the lisp syntax and macros are a big part of it.
- blablabla123 10y agoI think this forum is written in some LISP dialect^^
- pkd 10y agoYes, made by Paul Graham. Called Arc. http://arclanguage.org/ http://arclanguage.org/
- gkya 10y agoThere are companies selling Common Lisp interpreters and IDEs. So certainly there are lots of users out there. Many major Lisps (CL, Clojure, Scheme, Racket) are general purpose languages, and in common they excell at metaprogramming, interactive programming and control flow/debugging (see CL restarts).
- eschaton 10y agoDon't say "interpreter" if you don't mean it. In the vast majority of cases, Common Lisp is a compiled language.
- gkya 10y agoIt's an interpreted one in the sense that one can continually interact with it during the life time of a program. Many of the popular interpreted languages nowadays do some compilation somewhere (Python, Perl, etc).
- zengid 10y agoI'm an amateur LISP hacker and not an expert, and I hope this thread doesn't turn into a flame war, but I can say that LISP is excellent for symbolic computations (a la lambda calculus, which Turing proved was equivalent to a Turing Machine) [1]. If you're more familiar with C languages, I like to think of LISP as the C of symbolic languages. It has practically no syntax, and LISP (as it exists today) has the neat feature that it's data structures are the same as its programs. Writing LISP code that modifies and generates other LISP code is relatively simple compared to doing the same in a syntax-rich language. LISP does all of this at its lowest level, just like how C manipulates the fundamental elements of a CPU (pointers, contiguous memory blocks, basic arithmetic / logic operations, etc). The way CPU's are designed revolves around the Von Neumann Architecture [2], and C exploits this design very well. Unfortunately, LISP doesn't quite match this architecture, so it has traditionally performed poorly compared to C. But CPU's could certainly be designed to operate around a LISP-like model[3], so the Von Neumann paradigm isn't the only way. [1] https://en.wikipedia.org/wiki/Lisp_(programming_language) https://en.wikipedia.org/wiki/Lisp_(programming_language) [2] https://en.wikipedia.org/wiki/Von_Neumann_architecture https://en.wikipedia.org/wiki/Von_Neumann_architecture [3] https://en.wikipedia.org/wiki/Lisp_machine https://en.wikipedia.org/wiki/Lisp_machine
- steinuil 10y ago> Unfortunately, LISP doesn't quite match [the Von Neumann] architecture, so it has traditionally performed poorly compared to C. Exactly. It has traditionally performed poorly compared to C, but this hasn't been the case for a lot of time. There's a number of misconceptions about what is and what is not a lisp. First of all, a lisp doesn't have to be interpreted or run in a virtual machine. While this is true for a lot of lisps, Common Lisp performs what you could call just-in-time compilation: you can even inspect the compiled code of a function by calling the `disassemble' macro on it, and optimize it based on the disassembly. A lisp doesn't have to be dynamically typed. There are many examples of statically typed lisps (Shen, Dylan, Typed Racket, Lux), and in other dynamically typed lisps such as Common Lisp you can add type annotations as needed to optimize functions. A lisp doesn't have to be garbage collected. It certainly is more convenient to have GC when you have such a dynamic language or want to program in a functional style; however, this is not required. Carp and GOAL[0] do not use garbage collection, and in Common Lisp you can generally give hints to the garbage collector to to make it run where you need it to. A lisp doesn't have to be functional! While lisps usually advocate a functional style to varying degrees (mutation in Scheme is usually marked with a ! in the name of the function (set!) but normally discouraged, Clojure is immutable by default IIRC), but very few are purely functional (only Lux comes to mind) and most are in fact very procedural (Common Lisp). Finally, Common Lisp has been designed to also be used as a systems language, and thus benefits from many optimizations targeting the Von Neumann architecture that can make it just as fast, if not faster, than C. This is a good post detailing some of the optimizations that you can perform in Common Lisp: https://chriskohlhepp.wordpress.com/advanced-c-lisp/convergence-of-modern-cplusplus-and-lisp/ https://chriskohlhepp.wordpress.com/advanced-c-lisp/converge... To answer 0wl3x's question, lisps can be used for just about anything; it's just a family of homoiconic languages that generally make heavy use of macros as fundamental abstractions. [0] http://www.codersnotes.com/notes/disassembling-jak/ http://www.codersnotes.com/notes/disassembling-jak/
- parfe 10y agoLisps can do anything other general purpose language can accomplish. People still overwhelmingly choose other languages.
- Retric 10y agoLisps != lisp programs. Lisp lets programmers treat their code as data to be edited at runtime. Which is a different model than say Java. The advantage is individual programmers can be more productive, but it becomes really hard to share code as every program evolves into it's own language.
- progman 10y agoWhen C++ and Java (the current industry standards) have adopted the last feature of Lisp then the world will realize that it actually wanted Lisp after all :-)
- malcolmstill 10y agoI'm writing a Wayland compositor in Common Lisp: https://github.com/malcolmstill/ulubis https://github.com/malcolmstill/ulubis
- zeveb 10y agoI'm really, really excited by that, BTW. Gonna wait a few months before I try to use it for real, but it'll be fun to have a new Common Lisp environment. As long as there's a tiling mode, I'm there:-)
- openfuture 10y agoRun guixSD with stumpwm and emacs. Guix (the package manager) is in guile lisp, Shepherd (the init system) is in guile as well iirc, stumpwm (window manager) is common lisp and emacs is elisp.
- imgabe 10y agoMuch of ITA's matrix software, which controlled airline ticket pricing, was written in Common Lisp. I don't know if that's still the case since Google bought it, but I imagine it would be pretty difficult to port a codebase that large and complex to a different language.
- DonaldFisk 10y agoOthers have already pointed out that this very forum's implemented in Arc, a Lisp dialect. Some large projects implemented in Lisp: Operating systems https://en.wikipedia.org/wiki/Genera_(operating_system) https://en.wikipedia.org/wiki/Genera_(operating_system) Travel industry software https://en.wikipedia.org/wiki/ITA_Software https://en.wikipedia.org/wiki/ITA_Software Computer games https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp https://en.wikipedia.org/wiki/Crash_Bandicoot https://en.wikipedia.org/wiki/Crash_Bandicoot Common sense reasoning https://en.wikipedia.org/wiki/Cyc https://en.wikipedia.org/wiki/Cyc and plenty more http://franz.com/success/ http://franz.com/success/ I'm using Lisp to implement a visual dataflow programming language http://web.onetel.com/~hibou/fmj/FMJ.html http://web.onetel.com/~hibou/fmj/FMJ.html
- crispytx 10y agoHacker News is written in LISP.
- kelvin0 10y agoYou should ask Paul Graham, and his (first?) successful startup he sold to Yahoo: http://paulgraham.com/avg.html http://paulgraham.com/avg.html So, pretty useful IMHO.