Data dodania Pytanie
2017-11-16 09:11 How to get multiple query parameters in Caveman »
My code works well in REPL, but it does not get the second value in my web application. eg (?vehicle=bike&vehicle=car) what I tried when I do ...
(1) odpowiedzi
2017-11-15 23:11 What are the generic functions defined by the standard? »
In Common Lisp there are a few generic functions defined by the standard, for instance functions to manipulate sequences. However looking at Graham's...
(2) odpowiedzi
2017-11-14 11:11 SLIME on Emacs with paredit in repl - how to prevent execution of incomplete but balanced expressions? »
I use paredit on emacs with SLIME's repl. This means that at any point during my typing on the repl, my s-expressions are balanced. However, they ma...
(2) odpowiedzi
2017-11-13 22:11 How to launch a Common Lisp GTK app from a command line script (or cron)? »
I have written a program generating a simple tray icon using cl-cffi-gtk and Common Lisp called tray-icon.lisp which is defined in a ASDF system calle...
(1) odpowiedzi
2017-11-13 06:11 SBCL LISP read / write order »
I am just getting started with LISP / functional programming. The following code is what I am trying to run on SBCL running on macos (defun maxOfTwo ...
(0) odpowiedzi
2017-11-12 23:11 DYNAMIC-EXTENT ignored in CLISP? »
I read here that "it is permissible for an implementation to ignore" the dynamic-extent declaration in Common Lisp, and I was wondering if it is in fa...
(3) odpowiedzi
2017-11-12 13:11 LISP MAKE-PATHNAME: Illegal :DIRECTORY argument »
I download Semantic Network Processor project: http://digital.cs.usu.edu/~vkulyukin/vkweb/software/snp/snp.html and following it's read me, By using ...
(1) odpowiedzi
2017-11-11 22:11 Collect AND do something under a condition inside a Common Lisp loop »
I need to execute an instruction in addition of "collect" under a condition in a loop and I can't figure out a working syntax... For instance I'd lik...
(3) odpowiedzi
2017-11-10 18:11 get the elements from a nested list in LISP »
I am trying to figure out how to access the elements in a nested list in LISP. For example: ((3 (1 7) (((5)))) 4) If I use dolist, i run into the br...
(0) odpowiedzi
2017-11-10 12:11 Using CLISP and recursion »
create a list or an array of random integers (e.g., between [0, 50]) and a target number (e.g., 60), then find all subsets of the integers of the list...
(1) odpowiedzi
2017-11-09 13:11 SBCL pass param from command line »
In bash if I do "foo.sh x", then x can be used in bash by calling $1. If I want to do the same with lisp, "script.lisp x" what can I use/call to get ...
(1) odpowiedzi
2017-11-09 09:11 auto-generate key for hash table in common lisp »
I would like to generate sequential keys that I can use across a number of hash tables. I will call them 'id1','id2' etc. If ht is my hash table then ...
(2) odpowiedzi
2017-11-09 05:11 What are the various differences in package systems between CL implementations? »
Upon using (make-package 'test) (in-package test) in SBCL and CCL implementations, I've noticed that SBCL requires (cl:defun foo () (...)) or (cl:desc...
(1) odpowiedzi
2017-11-08 22:11 Integer division in Common Lisp »
I tried to do division in Lisp. When I do (/ 5 2), the result is 5/2, but what I need is 2. How can I do that? ...
(1) odpowiedzi
2017-11-06 04:11 Creating a custom reverse of list »
I'm trying to create a custom reverse of list in Lisp. I'm pretty new to Lisp programming, and still struggling with syntax. This is my code so far (...
(2) odpowiedzi
2017-11-05 22:11 Why doesn't set work with lambda in Common Lisp? »
I am writing a lisp interpreter (in C), and am at the point of implementing lambda functions and the set language features. In my interpreter the foll...
(0) odpowiedzi
2017-11-05 19:11 Tetranacci sequence using LISP, without recursion »
Write a lisp program that computes the Tetranacci numbers using: a) an iterative approach b) a recursive approach The recursive part is pretty straig...
(0) odpowiedzi
2017-11-04 17:11 How to erase all the properties of a symbol in Common Lisp? »
How can I completely erase from memory a property list? Ex.: (setf (get 'book 'title) "Gone with the Wind") (setf (get 'book 'author) "Margaret Miche...
(2) odpowiedzi
2017-11-03 07:11 How to convert a string to a list of symbols? »
I am not sure if I am missing something very basic here, but I want to read in a string from a file and use it in my later program as a list of symbol...
(1) odpowiedzi
2017-11-02 19:11 Calling flet or labels functions in clisp »
I new to common lisp (clisp-2.49) Can I call an flet or labels function from a different outside function? If so, how? (In a source file) This code ...
(1) odpowiedzi
2017-11-02 19:11 Read the proper input to a variable »
I would like to have a variable containing an integer, that came from an input of a user. It can't accept strings neither decimal numbers. I would l...
(1) odpowiedzi
2017-11-01 22:11 What is recommended Common Lisp library for reading emails from IMAP server? »
I found only mel-base and Cloning. Both seems unmaintained more than seven years, and both have no tests. I've tried mel-base, but found a bug – it...
(0) odpowiedzi
2017-11-01 06:11 Peter Norvig's use of asterisks in PAIP arrays »
In Peter Norvig's PAIP, section 18.12, pg. 643 (unfortunately not part of the Google Books preview), he includes 2D arrays like: (/ (aref '#2A((.1 ....
(1) odpowiedzi
2017-11-01 06:11 Will cffi:with-foreign-object free array elements? »
Here's what I'm trying to do: (defun do-some-fun-stuff (string-list) (let ((n (length string-list))) (cffi:with-foreign-object (array :string n...
(0) odpowiedzi
2017-10-31 23:10 apply in Common Lisp: is the function called once, or once for every element of the list? »
I am trying to fully understand the way apply works, but cannot find a clear enough explanation... Given this: http://clhs.lisp.se/Body/26_glo_a.htm#...
(1) odpowiedzi
2017-10-31 19:10 Understanding lisp syntax »
I have an example function definition that I am not understanding (defun new-paths (path node end net) (let ((new-path ())) (catch 'check ...
(1) odpowiedzi
2017-10-31 15:10 How to make """this text""" witch in Python in Common Lisp? »
Python has: """ line1 line2 line3 """ How can I do this in Common Lisp? ...
(1) odpowiedzi
2017-10-30 00:10 LISP function which, given a number and a list, returns the first even number greater than n »
I'm having trouble finding my error. This keeps returning nil: (even-greater-n 5 '(1 2 3 4 5 6 7)) (defun even-greater-n (n L) (cond ((null L) ni...
(3) odpowiedzi
2017-10-29 06:10 More than one argument for predicate in delete-if »
Suppose I want to delete one step (element) from the states list. (defparameter *states* '((:top nil nil) (:subjects nil nil))) ;predicate (defun eq...
(1) odpowiedzi
2017-10-28 22:10 Parameterizable return-from in Common Lisp »
I'm learning blocks in Common lisp and did this example to see how blocks and the return-from command work: (block b1 (print 1) ...
(2) odpowiedzi
2017-10-28 13:10 Refactoring a "show-list" function in lisp »
I have written a function called "show-list" which passes all the tests below (defun show-list (l) (cond ((atom l) (format t "~s" l)) ...
(1) odpowiedzi
2017-10-28 04:10 Occurrence of symbol A found anywhere in L. LISP »
Here is my function (defun freq (symbol_A List_L) (cond ((atom (car List_L)) (cond ((eq (car List_L) symbol_A) t (+ 1 (freq symbol_A (c...
(2) odpowiedzi
2017-10-27 20:10 Variations in invocation of defpackage and in-package »
In Graham's book “ANSI Common Lisp” (1996) p. 137 the example illustrating the use of defpackage and in-package goes like (defpackage "MY-APPLICA...
(2) odpowiedzi
2017-10-27 18:10 Discovering the "Core" Entities and Macros of Common Lisp »
While reading Peter Seibel's "Practical Common Lisp", I learned that aside from the core parts of the language like list processing and evaluating, th...
(2) odpowiedzi
2017-10-27 18:10 Quote Behavior With Vectors and Complex Numbers in Common Lisp »
After playing with vectors and complex numbers in Common Lisp, I became curious about something. Namely, how does the quote operator relate to these d...
(0) odpowiedzi