43

Is LISP still practiced/used in todays world, or is it a legacy language Yes, it is, but you have to know where to look. People who use LISP don't tend to shout too loudly about it but there's a handful of examples of a few high-profile startups having used it to great effect over the last 20 years. It is also very popular with small companies in Europe. ...


31

The paper is interesting in many ways. The most interesting part is this: the authors falsified the paper from 1984 just two years later in 1986 themselves. Brooks and Gabriel developed a highly optimizing Lisp compiler and sold it commercially very successful for several years: Lucid Common Lisp (PDF). Maintenance for this Lisp compiler is still available ...


29

Many Lispers will tell you that what makes Lisp special is homoiconicity, which means that the code's syntax is represented using the same data structures as other data. For example, here's a simple function (using Scheme syntax) for calculating the hypotenuse of a right-angled triangle with the given side lengths: (define (hypot x y) (sqrt (+ (square x) (...


27

Can't really speak for all Lisps but Clojure is definitely a hot and relevant language at present. A London Clojure User Group I went to earlier this week had over 100 attendees.... I've found it to be a very enlightening experience to learn Lisp in the form of Clojure over the past year (after a lot of experience with Java and C#). Main reasons for this ...


25

It depends on your specific needs, and the strenghts and weaknesses of the particular implementations. That said, here is what first comes to my mind when thinking about different implementations: SBCL is pretty fast, and good at number crunching. So, if you depend on heavy numerical computation, that might be the right implementation for you. Also, it has ...


23

A dissenting opinion: Lisp's homoiconicity is far less of a useful thing than most Lisp fans would have you believe. To understand syntactic macros, it's important to understand compilers. The job of a compiler is to turn human-readable code into executable code. From a very high-level perspective, this has two overall phases: parsing and code generation....


22

Dan Weinreb (unfortunately he passed away last year) wrote an overview: Lisp Survey There are many differences between the CL implementations. It is not possible to cover all different needs (speed, size, license, price, compatibility, operating system support, ...) of users for a Lisp system in one implementation. One has to find a local optimum by using ...


21

When this paper was written in 1984, a computer having 1 megabyte of RAM and a 20 megabyte hard drive, capable of sitting on your desk, was a big deal. Naturally, disputes will arise over the practicality of a language as high-level as Lisp is on hardware that spartan. The advances in both hardware and compiler technology that have taken place since then ...


16

The answer so far is misleading. There needs to be made a distinction between "parametric" and "ad-hoc overloading" polymorphism. Parametric means "behaves uniformly for all types a", whereas "ad-hoc" -- what Simon refers to as polymorphic -- changes implementation based on the type. Examples of both are reverse :: [a] -> [a], which is parametric, and ...


15

In the context of the paper you linked, the words "micro-coded machine" would almost certainly refer to a Lisp Machine. At the time Lisp was beginning to get a foothold, it was hoped that it would be run (in the general case) on machines that were designed specifically to execute Lisp instructions, rather than computers with a more general instruction set ...


11

Stock hardware basically means "not customized," as you surmised. Which customizations it refers to depends on the context. In the context of the paper, it means a computer which is not micro-codable. Micro code is to machine code as assembly is to a high-level language. It breaks down each instruction into smaller parts. On most processors, the ...


9

Maybe an objective (if indirect) measure would be useful here. Consider the sizes of the specifications for the languages. Racket is basically an implementation of R6RS Scheme. The R6RS specification is 90 pages long, total. Of that, about 25 pages are devoted to the language proper, and about 30 more are devoted to its standard library. Along with that, ...


9

Reference counting is basically never sufficient for managing memory due to cycles. If a language has mutation we can essentially create a structure like ------------------- | | | | Head | Tail | | | | ------------------- | | | | +-------+ | 1 <+ I put way too much effort into this lousy ...


8

If you want to learn Lisp today, I'd have a look at either racket, which is a fast scheme implementation (well, it actually departed a little from scheme, so it is its own dialect now) or clojure, which benefits from the JVM it runs on (so gazillions of libraries are available, plus you can make it interact with your own Java code). Even if you don't learn ...


8

This question has been already answered on SO: values function in Common Lisp. Briefly, multiple values is a facility to return many objects without allocating extra memory. E.g. floor must return two values - quotient and remainder. It can return a list (or a pair) or it can return two values. In the former case it will have to allocate a cons cell on each ...


6

It appears that the FindingLisp statement may be incorrect, or at least oversimplified. It says "Like I said previously, I really like CLISP, and I use it for developing on Windows, but the license is not suitable for all code since it all-but-forces your code to be released as GPL." However, the CLISP Summary says, in part: "You may distribute commercial ...


6

Disclaimer: I'm a (minor) contributor to SBCL, but I was a user first. As a happy user of CLISP, CMUCL, and SBCL, here's why SBCL is my "go to" CL implementation: Steel Bank Common Lisp meets the criteria you mention: Runs on MacOS, Windows, and Linux (among other platforms) Provides an identical API for threading and concurrency control on all of these ...


6

Type declarations and static analysis Since no value typed as NIL can exist, the use of the NIL type is mostly relevant for static analysis. T and nil respectively represent the top (⊤) and bottom (⊥) types and might be used when inferring the type of expressions. Consider the following example: (defun the-thing () (length (1+ (read)))) The type of (read) ...


6

Your approach is correct: we bind (rather than declare, as in other languages) variables exactly where we need them. (In your case, however, you are using h-offset in the 1st half of your function, just without naming it). The rationale is the same - code readability. Note that you do not need to bind a single use variable, you can just write (dotimes (i (...


5

There are now several languages which support multiple dispatch. There are extensions for some. Perl/Moose, Dylan, Julia, ... Single dispatch object-oriented language have some things which can be seen as an advantage: a class can be a namespace. In CLOS classes are not namespaces. methods can be in a class namespace. In CLOS methods are not in a class ...


5

CL type system is more expressive than the Haskell one, e.g., you can have a type (or (integer 1 10) (integer 20 30)) for a value 1,2,...9,10,20,21,...,30. However, Lisp compilers does not force their understanding of type safety down your throat, so you can ignore their "notes" - at your own risk. This means that you can write Haskell in Lisp (so to speak)...


5

Typically I would use some embedded relational store for that. Some kind of Prolog in Lisp might do. A self-written data structure could be like this: a CLOS class for the triple: meaning, form, score a hash-table mapping from a meaning to a list of triples a hash-table mapping from a form to a list of triples The lists of triples could be sorted by score....


5

For Common Lisp I'm using something like this: files are organized in systems and subsystems (see for example ASDF as a tool for that) you can put everything in one file, but that takes some care larger pieces of Lisp are organized in systems of files (see above) and are usually compiled with the file compiler using compile-file, a file is a compilation ...


4

Is LISP still practiced/used in todays world, or is it a legacy language like FORTRAN/COBOL ? I mean, apart from maintaining existing code, is it used on new projects at all ? I know several guys who do Lisps in some startups in Silicon Valley, and I know that Amazon.com has been using Lisp since the beginning (though I've heard they're replacing it with C++...


4

Typed Racket is very different from Haskell. Type systems in Lisp and Scheme, and indeed type systems in traditionally untyped language ecosystems in general, have a fundamental goal that other type systems do not - interoperating with existing untyped code. Typed Racket for example introduced whole new typing rules to accommodate various Racket idioms. ...


4

Common Lisp has a large standard library. Then again, so does Racket. The main difference is that Racket separates everything out into modules, so that programs that don't use all of the standard library don't have to see it. You just import the bits you want to use, and the rest is neatly hidden away.


4

Imagine you've got a function that evaluates the game board and returns a score, where large positive scores mean you're doing well and large negative scores means you're doing badly. Now imagine that for each possible position that a piece can move to, for each piece on the board, you calculate what the score would become and choose the move that results ...


4

Actually Common Lisp is no longer very big compared to several other languages. If you look at the spec of Common Lisp, then you see that the pages are very long and often about one construct. The Scheme standard for example describes a dozen features on a single page, where Common Lisp uses one page. Languages like R6RS + Libraries + SRFI, Racket or R7RS ...


3

Single dispatch is somewhat easier to implement, and multiple dispatch is rather rarely needed in practice according to research by Muschevici et al. You can find more information in the Wikipedia article on multiple dispatch; for instance, it also explains why the CLOS method of defining multimethods may be a better fit for Lisp's extremely uniform syntax, ...


3

This is a little late, but as of about 2 months ago (05/2018) I found this project called Portacle which bundles SBCL, Emacs, Quicklisp, and more into a single package for Windows 10. All you have to do is double click the portacle.exe file and you have a full blown Common Lisp IDE to work with. See https://portacle.github.io/ and https://github.com/...


Only top voted, non community-wiki answers of a minimum length are eligible