lisp

Audacity Nyquist Plugin

I am playing around with Audacity and have been trying to generate tones with harmonics. Audacity does not seem to support it directly, but you can write a plugin to do it. The plugins are written in Nyquist (a variant of lisp) and there a small tutorial here. I do not have any experience with lisp and just want to write something simili...

Why does let require a vector?

I never really thought about this until I was explaining some clojure code to a coworker who wasn't familiar with clojure. I was explaining let to him when he asked why you use a vector to declare the bindings rather than a list. I didn't really have an answer for him. But the language does restrict you from using lists: => (let (x 1...

In Lisp, how do I fix "Warning: Assumed Special?"

In this file I get 9 warnings of "assumed special". They are ;;;*** Warning in CHECK-ROW: CHECKARRAY assumed special in SETQ ;;;*** Warning in CHECK-ROW: RESULT assumed special in SETQ ;;;*** Warning in CHECK-ROW: CHECKARRAY assumed special ;;;*** Warning in CHECK-ROW: CHECKARRAY assumed special ;;;*** Warning in CHECK-ROW: CHECKARRAY a...

defmacro with defclass

Hi, I have a class in Common Lisp: (defclass my-cool-class() ((variable1 :initarg :variable1 :accessor variable1 :initform (error "Must supply value to variable1")) (variable2 :initarg :variable2 :accessor variable2 :initform (error "Must supply value to variable2")) I wanted to create a macro that would ...

lisp program for hexadecimal to decimal

how to write a lisp program to convert given hexadecimal number into decimal. can somebody give me a clue. thank you ...

LISP development kit

could someone please name some LISP development kit ...

capturing cl-fad:walk-directory output for finding files

I've wrestled with this for hours I'm trying to write a find file function similar to the unix command. The long and short of it boils down not understanding why I can't return a proper value from the cl-fad:walk-directory function as a list (cl-fad is here http://weitz.de/cl-fad/). I'm trying something like this: (cl-fad:walk-director...

How to interpret full programs in Ready Lisp?

I've just downloaded Ready Lisp and am playing around with the REPL. What I want to know is, how do I write a long program, interpret it and get the output? Sort of like what PLT Scheme has. I'd like to do this with a minimal amount of hassle if that's possible. Just want to get on with the book I'm reading. Thanks. ...

Are there easy way of installing lisp library such as rubygem(ruby) or easy_install(python)?

I find easy_install extremely useful for programming with Python, and the same as rubygem with Ruby. Does Lisp have similar feature? I understand that there are many Lisp implementations (clisp, sbcl, clozure cl ...), but I just wanted to know what would Lispers do when they need to find and use Lisp library functions. ...

Critique my Lisp, please.

Dear all, I have created a nice little routine: (defun unzip (seq) "Takes an even-length list and breaks it apart by evens/odd index" (let ((oddresult '()) (evenresult '())) (loop for n from 0 to (- (length seq) 1) do (if (oddp n) (push (nth n seq) oddresult) (push (nth n seq) evenresult))) (list...

In Lisp (Clojure, Emacs Lisp), what is the difference between list and quote?

From reading introductory material on Lisp, I now consider the following to be identical: (list 1 2 3) '(1 2 3) However, judging from problems I face when using the quoted form in both Clojure and Emacs Lisp, they are not the same. Can you tell me what the difference is? ...

Fixing GC error in Mac Common Lisp 5.0

Hi all, I'm fairly new to Lisp, and I'm trying to run an algorithmic music application on the original MCL 5.0 (not the RMCL version). The program works by incrementally inputting textual representations of music, and learning from the user via an association net. Unfortunately, shortly after I begin inputting the text, I begin to see t...

Is cl-opengl glut mature?

I want to create my own editor to code in, at first I was going to use ncurses to make a terminal editor. Not working, the library has no documentation and it's mail list is completely empty. I'm probably going to make it with a gui library instead. I'm thinking of just using glut from cl-opengl, but I can't find any info on how develope...

lisp delete list

I am having a bit problem on how to extract inside a list of a list. (defun delete (a l) (cond ((null l) nil) ((eq (car l) a) (delete a (cdr l))) (t (cons (car l) (delete a (cdr l)))))) it deletes whatever is 'a' in a list l but if l consists of another list and a is in that inner list then my program cudnot ...

What is wrong with this Lisp Function?

This function is a CLisp function, this is part of a homework problem, but which is supposed to be written in this different format (the second function). (defun range (m M) (cond ((> m M) '() ) ((= m M) '() ) ((< m M) (cons m (range (+ m 1) M ) ) ) ) ) (define (range m M) (cond ((> m M) '() ) ((= m M) '() ) ((< m M) (co...

What would be an example of an anaphoric conditional in Lisp?

Please explain the code as well. Thanks! ...

Question about SICP chpt 4.1 : How does (analyze expr) help speed up eval?

I'm reading the following section of SICP http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-26.html#%_sec_4.1.7 According to the text, the following transformation of eval will improve offers a performance improvement, since an expression that gets evaluated many times will only be analyzed once? (define (eval exp env) ((analyz...

What programming languages have the most easily-implemented interpreters?

I need to implement an interpreter for a programming language as part of a project I'm working on. I don't think the details of this project are too relevant, except that it requires me to implement an interpreter from scratch, I can't use an existing programming language (the requirements include supporting portable delimited continuat...

Checking whether every list in a list is null in Common Lisp

I know that I can check whether a list of lists only contains null lists like this CL-USER> (null (find-if (lambda (item) (not (null item))) my-list)) where my-list is a list of lists. For example: CL-USER> (null (find-if (lambda (item) (not (null item))) '(nil (bob) nil))) NIL CL-USER> (null (find-if (lambda (item) (not (null item)...

How to find the longest path between two nodes in Lisp?

Hi, I need to program a Lisp function that finds the longest path between two nodes, without revisiting any nodes. Though, if the start and end node are the same, this node can be revisited. The function needs to be both recursive and depth-first-search. I've been trying to get at this for hours, and cannot come up with a solution. I kn...