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
3 answers

Looking for a recommendation for an AutoLisp / VisualLisp book

Can anyone recommend a good introductionary book dealing with AutoLisp and VisualLisp? I found some general Lisp books out there, but I'm uncertain how much Lisp variants differ. I haven't found any in the old questions in here, either.
Rook
  • 60,248
  • 49
  • 165
  • 242
5
votes
13 answers

In what languages can you dynamically rewrite functions on the fly?

I recently had the necessity of rewriting a javascript function in javascript, dynamically. The ease with which I did it, and how fun it was, astounded me. Over here I've got some HTML:
Tom Ritter
  • 99,986
  • 30
  • 138
  • 174
5
votes
1 answer

xappings, xectors, xets

In the old *Lisp on the connection machine there was an interface to vectors, sets etc. that allowed computation over collections in a way similar to MapReduce (with alpha and beta as the apply and reduction respectively). Are there resources on…
5
votes
2 answers

How do I convert a string to a symbol for use as a key in the Lisp "assoc" function?

I have this association-list in Common Lisp: (defvar base-list (list (cons 'a 0) (cons 2 'c))) I have to call assoc when my argument is of type string. For the pair (A . 0) I have to convert "a" to a symbol, and for the pair (2 . C) I have to…
זאבי כהן
  • 317
  • 6
  • 16
5
votes
1 answer

set-car! and let in scheme language

I am little bit confused by the result of this example: (define mk-q (lambda () (let ([l '(x)]) (cons l l)))) (define q (mk-q)) q => ((x) x) (set-car! (cdr q) 'y) => ((y) y) I am wondering why both x atoms have been replaced by…
user1453428
  • 185
  • 2
  • 8
5
votes
1 answer

Struct difference between common lisp and emacs lisp

The code below works in common lisp, but in emacs lisp, it complains "(error "Unknown class type orc in method parameters")". Why and how can i fix it in emacs lisp? Thanks. (defun randval (n) (1+ (random (max 1 n)))) (defstruct monster (health…
louxiu
  • 2,830
  • 3
  • 28
  • 42
5
votes
2 answers

Why must 'require' be evaluated in a separate expression to use of the package

I have some lisp initialisation code: (eval-when (:compile-toplevel :load-toplevel :execute) (require 'asdf)) (eval-when (:compile-toplevel :load-toplevel :execute) (push #p"c\:\\lisp\\clsql-4.0.4\\" asdf:*central-registry*)) Why does that…
John McAleely
  • 1,929
  • 2
  • 18
  • 35
5
votes
3 answers

Intermediate representation for a Lisp / Clojure DSL

I'm designing a DSL in Clojure which is used to drive a code generator (in this case for procedural image synthesis - clisk) and am having trouble working out the best representation for intermediate values. Originally the DSL consisted of functions…
mikera
  • 105,238
  • 25
  • 256
  • 415
5
votes
2 answers

How does scope generally affect the use of nested functions?

I think I have this down, but I'd like to confirm. With dynamic scope, it doesn't matter whether one uses a nested function or a separate function, as the variables simply depend on the call stack. With only pure functions involved, it also doesn't…
Ericson2314
  • 133
  • 7
5
votes
2 answers

Is there a relationship between untyped/typed code quotations in F# and macro hygiene?

I wonder if there is a relationship between untyped/typed code quotations in F# and the hygiene of macro systems. Do they solve the same issues in their respective languages or are they separate concerns?
soc
  • 27,983
  • 20
  • 111
  • 215
5
votes
4 answers

How to add a dynamic touch to emacs macros and or query replaces?

I often find myself needing to do several query and replace operations in a row because, for example I want to change all occurences of 23 to 24 in a line, then 24 to 25 in the next line, and so on (usually because i write an expression in a line…
Palace Chan
  • 8,845
  • 11
  • 41
  • 93
5
votes
1 answer

Emacs syntax highlighting of nested regular expressions

I'm trying to write an Emacs major mode for working with biological sequence data (i.e. DNA and peptides), and I want to implement syntax highlighting where different letters are colored differently. Since the mode needs to be able to differentiate…
Mike B
  • 153
  • 2
  • 6
5
votes
2 answers

Emacs Lisp: make newly-created buffer visible before the function returns?

In the following function in emacs Lisp, (defun show-life () (interactive) (switch-to-buffer "*Life-Window*") ; show how life goes on while living (live)) ; it takes 70 years to finish and return! I'd like to create the buffer "Life-Window",…
Yu Shen
  • 2,770
  • 3
  • 33
  • 48
5
votes
1 answer

Issue of quicklisp with clisp on Windows 7

I installed quicklisp/slime/clisp on windows 7. When I started slime with M-x slime, I got this error message. I could enter 'continue' to start the clisp/slime, but this message pops up whenever I start slime. What's wrong with this? How can I fix…
prosseek
  • 182,215
  • 215
  • 566
  • 871
5
votes
6 answers

Will a Lisp dialect that works with Apache Tomcat?

Is there an application server like Apache Tomcat that I can use with a Lisp like web language? I've been playing a little bit with Arc/Anarki and Clojure lately. But what I really miss is something like mod_arc or mod_clojure for Apache. What I…
Smutt
  • 81
  • 3
1 2 3
99
100