Questions tagged [lisp]

Lisp is a family of general purpose programming languages, influenced by the lambda calculus, and with the ability to manipulate source code as a data structure.

Introduction

The name Lisp derives from "LISt Processor". It was originally created as a practical mathematical notation for computer programs. See Wikipedia for more information.

Hello World Program in Lisp

;;; Hello World in Common Lisp

(defun helloworld ()
  (print "Hello World!"))

Popular dialects

Free Lisp Programming Books

There is also a Stack Overflow chat room on Lisp.

6922 questions
65
votes
4 answers

What are "downward funargs"?

Jamie Zawinski uses that term in his (1997) article "java sucks" as if you should know what it means: I really hate the lack of downward-funargs; anonymous classes are a lame substitute. (I can live without long-lived closures, but I find lack of…
Hanno Fietz
  • 30,799
  • 47
  • 148
  • 234
64
votes
13 answers

Lisp and Erlang Atoms, Ruby and Scheme Symbols. How useful are they?

How useful is the feature of having an atom data type in a programming language? A few programming languages have the concept of atom or symbol to represent a constant of sorts. There are a few differences among the languages I have come across…
Muhammad Alkarouri
  • 23,884
  • 19
  • 66
  • 101
63
votes
7 answers

How does Lisp let you redefine the language itself?

I've heard that Lisp lets you redefine the language itself, and I have tried to research it, but there is no clear explanation anywhere. Does anyone have a simple example?
yazz.com
  • 57,320
  • 66
  • 234
  • 385
62
votes
7 answers

Examples of excellent Common Lisp code?

I've learned enough Common Lisp to be able to muddle my way through writing an application. I've read Seibel's Practical Common Lisp What libraries or programs should I be reading to understand the idioms, the Tao, of Common Lisp?
Frank Shearar
  • 17,012
  • 8
  • 67
  • 94
60
votes
6 answers

What exactly is a symbol in lisp/scheme?

For the love of the almighty I have yet to understand the purpose of the symbol 'iamasymbol. I understand numbers, booleans, strings... variables. But symbols are just too much for my little imperative-thinking mind to take. What exactly do I use…
dotnetN00b
  • 5,021
  • 13
  • 62
  • 95
60
votes
8 answers

Collection of Great Applications and Programs using Macros

I am very very interested in Macros and just beginning to understand its true power. Please help me collect some great usage of macro systems. So far I have these constructs: Pattern Matching: Andrew Wright and Bruce Duba. Pattern matching for…
unj2
  • 52,135
  • 87
  • 247
  • 375
60
votes
1 answer

In what sense are languages like Elixir and Julia homoiconic?

Homoiconicity in Lisp is easy to see: (+ 1 2) is both the function call to + with 1, 2 as arguments, as well as being a list containing +, 1, and 2. It is simultaneously both code and data. In a language like Julia, though: 1 + 2 I know we can…
user2666425
  • 1,671
  • 1
  • 15
  • 21
60
votes
16 answers

Lisp Web Frameworks?

What are the popular (ok, popular is relative) web frameworks for the various flavours of LISP?
jsight
  • 27,819
  • 25
  • 107
  • 140
59
votes
4 answers

setq and defvar in Lisp

I see that the Practical Common Lisp uses (defvar *db* nil) for setting up a global variable. Isn't it OK to use setq for the same purpose? What are the advantages/disadvantages of using defvar vs. setq?
prosseek
  • 182,215
  • 215
  • 566
  • 871
59
votes
6 answers

Lisp Executable

I've just started learning Lisp and I can't figure out how to compile and link lisp code to an executable. I'm using clisp and clisp -c produces two files: .fas .lib What do I do next to get an executable?
Alexander Stolz
  • 7,454
  • 12
  • 57
  • 64
58
votes
10 answers

How to live with Emacs Lisp dynamic scoping?

I've learned Clojure previously and really like the language. I also love Emacs and have hacked some simple stuff with Emacs Lisp. There is one thing which prevents me mentally from doing anything more substantial with Elisp though. It's the concept…
auramo
  • 13,167
  • 13
  • 66
  • 88
55
votes
9 answers

Is ECMAScript really a dialect of Lisp?

A friend of mine drew my attention the welcome message of 4th European Lisp Symposium: ... implementation and application of any of the Lisp dialects, including Common Lisp, Scheme, Emacs Lisp, AutoLisp, ISLISP, Dylan, Clojure, ACL2,…
Emre Sevinç
  • 8,211
  • 14
  • 64
  • 105
54
votes
12 answers

How to implement continuations?

I'm working on a Scheme interpreter written in C. Currently it uses the C runtime stack as its own stack, which is presenting a minor problem with implementing continuations. My current solution is manual copying of the C stack to the heap then…
Kyle Cronin
  • 77,653
  • 43
  • 148
  • 164
54
votes
15 answers

What's a good beginning text on functional programming?

I like to study languages outside my comfort zone, but I've had a hard time finding a place to start for functional languages. I heard a lot of good things about Structure and Interpretations of Computer Programs, but when I tried to read through…
OwenP
  • 24,950
  • 13
  • 65
  • 102
53
votes
3 answers

Clojure keyword arguments

In Common Lisp you can do this: (defun foo (bar &key baz quux) (list bar baz quux)) (foo 1 :quux 3 :baz 2) ; => (1 2 3) Clojure doesn't have keyword arguments. One alternative is this: (defn foo [bar {:keys [baz quux]}] (list bar baz…
Brian Carper
  • 71,150
  • 28
  • 166
  • 168