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
5
votes
1 answer

Deleting a type in Common Lisp

Does Common Lisp provide a facility for undefining types created with deftype? I've not found anything in the Hyperspec about it.
Lex
  • 388
  • 2
  • 8
5
votes
2 answers

Ruby: how to splice an array into a list Lisp-style?

This is something I find myself wanting to do occasionally. Say I have a list of arguments. In Lisp, I can go like `(imaginary-function ,@args) in order to call the function with the array turned from one element into the right number of…
TG-T
  • 2,174
  • 3
  • 19
  • 20
5
votes
3 answers

Emacs: the code in the body of a defun or defmacro cannot refer to surrounding lexical variables?

Update 2013 May: As of GNU Emacs 24.3.1, (let .. (defun..)) bytecompiles just fine without warning and the bytecompiled code works the same as not-compiled code. Just don't forget to add the file variable lexical-binding: t to the file to be…
Jisang Yoo
  • 3,670
  • 20
  • 31
5
votes
2 answers

In Emacs, How to export Links to a clickable link, when htmlize emacs buffer?

BACKGROUND I using great htmlize.el to export my org-mode buffer contents with font hi-lock. Emacs org-mode has a Link format. PROBLEM For Example, here is a org-mode file with contents: [[http://hunmr.blogspot.com][blog]] When I Using Htmlize.el…
whunmr
  • 2,435
  • 2
  • 22
  • 35
5
votes
2 answers

Lisp: CHAR is neither declared nor bound

I have decided to learn (Common) Lisp a few days ago and I realize that this is quite a newbie question and it is probably extremely trivial to someone with at least a bit of experience. So basically what happens is that I load up Emacs + Slime (via…
Tamas Czinege
  • 118,853
  • 40
  • 150
  • 176
5
votes
4 answers

Why isn't let* the default let?

As probably all experienced elispers have found at some point, code like is broken: (let ((a 3) (b 4) (c (+ a b))) c) One should use the let* form instead when referring to a just-binded variable within the binding clauses. I just…
deprecated
  • 5,142
  • 3
  • 41
  • 62
5
votes
3 answers

valid characters for lisp symbols

First of all, as I understand it variable identifiers are called symbols in common lisp. I noted that while in languages like C variable identifiers can only be alphanumberics and underscores, Common Lisp allows many more characters to be used like…
Roy Lamperado
  • 101
  • 1
  • 5
5
votes
1 answer

The relationship between quotation, reification and reflection

I recently get confused with quotation, reification and reflection. Someone could offer a good explanation about their relationship and differences (if any)?
day
  • 2,292
  • 1
  • 20
  • 23
5
votes
1 answer

What is the difference between procedure and #'procedure in Lisp/Clojure?

What is the difference between the evaluation of double and #'double in Clojure/Lisp? 1:2 user=> double # 1:3 user=> #'double #'clojure.core/double
unj2
  • 52,135
  • 87
  • 247
  • 375
5
votes
2 answers

clojure 101 combining vectors into a map

I'm very new to Clojure and can't seem to find a way to do something that I'm sure is trivial. I've looked at the assoc function as I think this might be the answer, but can't make it work. What I have: keys => [:num, :name, :age] people => [ [1,…
rooftop
  • 3,031
  • 1
  • 22
  • 33
5
votes
2 answers

Run a very old InterLisp program

I have some proprietary data (civil engineering models) stored in binary files. There's also some InterLisp sources and a core dump file (I guess this is what Lisp compiles to ... for some reason). I'm told that program is a GUI for manipulating the…
Lincoln
  • 749
  • 1
  • 7
  • 13
5
votes
1 answer

How to export slots and accessors from Lisp classes?

This is my class's package: (in-package :cl-user) (defpackage foo (:use :cl) (:export :bar)) (in-package :foo) (defclass bar () (baz)) I can create an instance of bar in package cl-user. CL-USER> (defvar f) F CL-USER> (setf f (make-instance…
Jan Deinhard
  • 19,645
  • 24
  • 81
  • 137
5
votes
1 answer

The purpose of Lisp syntax to model AST

Lisp syntax represents AST as far as I know, but in high level format to allow human to easily read and modify, at the same time make it easy for the machine to process the source code as well. For this reason, in Lisp, it is said that code is data…
Amumu
  • 17,924
  • 31
  • 84
  • 131
5
votes
1 answer

How to enable rainbow parentheses in SLIME?

I am an Emacs and Common Lisp novice. I have successfully installed SLIME in my Emacs, but I noticed it does not have rainbow parentheses (which comes as a surprise). How do I enable this feature? Thanks in advance.
missingfaktor
  • 90,905
  • 62
  • 285
  • 365
5
votes
1 answer

Why the highlight.js ignores the language classes?

I'm using the Highlight.js library for syntax highlighting of code in Blogger and it refuses to highlight Lisp code properly. In the article on Blogger:

  (coerce (average 1 2 3 4) 'float)
  > 2.5
In the…
hijarian
  • 2,159
  • 1
  • 28
  • 34