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
53
votes
10 answers

Best Common Lisp IDE

I've used Slime within Emacs as my primary development environment for Common Lisp (or Aquamacs on OS X), but are there other compelling choices out there? I've heard about Lispworks, but is that [or something else] worth looking at? Or does anyone…
Brendan Foote
  • 1,378
  • 2
  • 12
  • 22
53
votes
10 answers

Functional Programming: what is an "improper list"?

Could somebody explain what an "improper list" is?
jldupont
  • 93,734
  • 56
  • 203
  • 318
52
votes
2 answers

What's difference between defvar, defparameter, setf and setq

I found a Similar question. But I don't quite understand that explanation. So I'm trying to run clisp with the following example: [1]> (defvar a 5) A [2]> (+ a 1) 6 [3]> (defparameter b 5) B [4]> (+ b 1) 6 [5]> (setf c 5) 5 …
sam
  • 2,049
  • 3
  • 20
  • 27
51
votes
10 answers

What is your opinion on Clojure?

What do you guys think about Clojure? I'm thinking of learning it next, currently using Erlang and in general happy with it except the records fiasco... Is Clojure as powerful as LISP?
deepblue
  • 8,426
  • 13
  • 48
  • 60
51
votes
6 answers

Why should I use 'apply' in Clojure?

This is what Rich Hickey said in one of the blog posts but I don't understand the motivation in using apply. Please help. A big difference between Clojure and CL is that Clojure is a Lisp-1, so funcall is not needed, and apply is only used to apply…
unj2
  • 52,135
  • 87
  • 247
  • 375
51
votes
5 answers

Can I use Common Lisp for SICP or is Scheme the only option?

Also, even if I can use Common Lisp, should I? Is Scheme better?
akway
  • 1,738
  • 4
  • 21
  • 20
50
votes
8 answers

How do purely functional languages handle index-based algorithms?

I have been trying to learn about functional programming, but I still struggle with thinking like a functional programmer. One such hangup is how one would implement index-heavy operations which rely strongly on loops/order-of-execution. For…
AaronC
  • 653
  • 5
  • 10
50
votes
5 answers

Lazy Evaluation vs Macros

I'm used to lazy evaluation from Haskell, and find myself getting irritated with eager-by-default languages now that I've used lazy evaluation properly. This is actually quite damaging, as the other languages I use mainly make lazily evaluating…
Louis
  • 2,442
  • 1
  • 18
  • 15
50
votes
3 answers

How do I access the contents of the current region in Emacs Lisp?

I want to access the contents of the current region as a string within a function. For example: (concat "stringa" (get-region-as-string) "stringb") Thanks Ed
Singletoned
  • 5,089
  • 3
  • 30
  • 32
50
votes
14 answers

How far can LISP macros go?

I have read a lot that LISP can redefine syntax on the fly, presumably with macros. I am curious how far does this actually go? Can you redefine the language structure so much that it borderline becomes a compiler for another language? For…
Mike Stone
  • 44,224
  • 30
  • 113
  • 140
49
votes
16 answers

Fast Prime Number Generation in Clojure

I've been working on solving Project Euler problems in Clojure to get better, and I've already run into prime number generation a couple of times. My problem is that it is just taking way too long. I was hoping someone could help me find an…
MBCook
  • 14,424
  • 7
  • 37
  • 41
49
votes
21 answers

What is the most impressive Lisp application?

I know that this is subjective and all, but still, can you provide some list of serious applications that were written in Lisp (perhaps along with what Lisp it is)?
Bartosz Radaczyński
  • 18,396
  • 14
  • 54
  • 61
49
votes
5 answers

Dynamic and Lexical variables in Common Lisp

I am reading the book 'Practical Common Lisp' by Peter Seibel. In Chapter 6, "Variables" sections "Lexical Variables and Closures" and "Dynamic, a.k.a. Special, Variables". http://www.gigamonkeys.com/book/variables.html My problem is that the…
George
  • 15,241
  • 22
  • 66
  • 83
48
votes
17 answers

Can a language have Lisp's powerful macros without the parentheses?

Can a language have Lisp's powerful macros without the parentheses?
andi
  • 981
  • 2
  • 11
  • 18
48
votes
13 answers

Lisp Parentheses

Why do Lispers format their code like shown in sample 1 instead of as shown in sample 2? To me (and I guess, to most others coming from different programming backgrounds than Lisp), the formatting shown in sample 2 would be easier to read. Is there…
Kremlin Yocepf
  • 1
  • 1
  • 2
  • 6