Data dodania Pytanie
2017-02-12 19:02 Destructive place-modifying operators »
The CLtL2 reference clearly distinguishes between nondestructive and destructive common-lisp operations. But, within the destructive camp, it seems a ...
(2) odpowiedzi
2017-02-12 02:02 Error: Lambda list with dots are only allowed in macros, not here : LIST? »
I am writing a function called flatten that is supposed to take the list that have embedded list and returns a simplified version of it . When I try t...
(2) odpowiedzi
2017-02-11 23:02 Why is my lisp function returning 'NIL' »
I am writing a lisp function, that will determine if a word is a palindrome without using the 'reverse' function. I am fairly new to lisp and I am sti...
(1) odpowiedzi
2017-02-11 21:02 Comma is illegal outside of backquotes? »
I am writing a function that is supposed to take in two values. The first value is supposed to create a list up to five numbers, based on the value en...
(1) odpowiedzi
2017-02-11 02:02 Why am I getting variable 'list' has no value? »
I am trying to understand why I am getting this error, as I am fairly new to lisp. I want to create a function that takes a number n from the user and...
(2) odpowiedzi
2017-02-10 23:02 Alexandria Lisp Manual & Implementation »
The ALEXANDRIA package seems to be widely-used in the common-lisp community. However, the only documentation I've found is a draft version of a manual...
(1) odpowiedzi
2017-02-08 23:02 Representation of a binary variable »
How would you find out how SBCL (and perhaps other common-lisp compilers) represents a typed variable. For example, SBCL translates a variable typed ...
(1) odpowiedzi
2017-02-08 15:02 Recursion in SBCL »
I am having an issue with SBCL (on linux) which might be related to tail recursion (not that I'm entirely sure what that is). I am adding the code th...
(1) odpowiedzi
2017-02-08 02:02 How does read-line work in Lisp when reaching eof? »
Context: I have a text file called fr.txt with 3 columns of text in it: 65 A #\A 97 a #\a 192 À #\latin_capital_letter_a_with_grave 224 ...
(1) odpowiedzi
2017-02-07 22:02 Simplifying complex setf expressions »
For rapid prototyping purposes in common-lisp it would be convenient to be able to easily function-modify an object in an arbitrary data structure. Th...
(1) odpowiedzi
2017-02-07 08:02 Why the expression is illegal when call the function »
I have define a function. (defun my-func (v0) (lambda (v1) (+ v0 v1))) Then input the expression in the slime command line. ((my-func 1) 5) ...
(0) odpowiedzi
2017-02-06 17:02 Lisp: IF condition using AND operator »
I making this function. (f 3 4) (sum = 7) (f 'a 'b) (not num!) My problem is how can I make if condition using and operator. I try.... (IF (a...
(1) odpowiedzi
2017-02-06 05:02 Implement Lisp function to compute the distance between two cities x and y »
I am trying to learn lisp and code the above problem as in the map in the image. I have gone through the aima code below to understand how it works....
(2) odpowiedzi
2017-02-06 02:02 How can I run a lisp buffer in slime and see its output in emacs? »
I have the following code in a buffer (file ~/firsts.lsp): (defun firsts (l) (cond ((null l) ()) (T (cons (car (car l)) (firsts (cdr l)))))...
(1) odpowiedzi
2017-02-05 21:02 Is defun or setf preferred for creating function definitions in common lisp and why? »
What is the fundamental difference in the functions defined using defun and setf as below and is one method preferred over another outside of style co...
(1) odpowiedzi
2017-02-05 02:02 Find position of atom - return nil if not present »
I am trying to find the position of an atom in the list. Expected results: (position-in-list 'a '(a b c d e)) gives 0 (position-in-list 'b '(a b c ...
(3) odpowiedzi
2017-02-04 02:02 Inversion of a bit »
I haven't been able to find a common-lisp function (or macro) that simply inverts a bit. There are functions that operate on bit arrays, and logical f...
(1) odpowiedzi
2017-02-04 02:02 how are functions defined in the lisp dialect used in the little lisper 1974 edition »
The first function definition in the 1974 edition of the Little Lisper appears as follows: (ISLAT (LAMBDA (L) (COND ((NULL L) T) ((ATOM (...
(1) odpowiedzi
2017-02-03 21:02 How to load non-standard characters from file using SBCL Common Lisp? »
Trying loading contents of file containing one line with word: λέξη (with-open-file (s PATH-TO-FILE :direction :input) (let ((a (read-line s)))...
(1) odpowiedzi
2017-02-03 18:02 What is alexandria:ensure-symbol for? »
It seems to do what intern does. Maybe (intern (read sym)). But what is it for? I see it being used like: (if (keywordp x) (alexandria:ensure-symbo...
(1) odpowiedzi
2017-02-03 04:02 How can I list all of the defined functions and global variables that are active in common lisp »
Is it possible to determine what the current environment has defined (in the common lisp image), from the running system itself? I am running SBCL 1....
(1) odpowiedzi
2017-02-02 14:02 Charsets in Common Lisp »
I've been working on a common lisp program that parses through two XML files and combines them in a custom way to make a third XML. Unfortunately, lis...
(1) odpowiedzi
2017-02-02 05:02 Error: "Should be a lambda expression" »
I am new to Lisp and this is the first function I have written. I am trying write a lisp function (without using the remove lisp function) that takes ...
(0) odpowiedzi
2017-02-01 11:02 using COND on optional arguments in common lisp »
I'm having some problem writing a LISP function. The function is defined as (defun foo (arg1 &optional cont)) (cond ((null arg1) nil) ...
(1) odpowiedzi
2017-01-31 18:01 Brainf**k implemented in Common Lisp »
I tried implementing Brainf**k in Common Lisp, SBCL. I have encountered some problems. (defparameter *tape* (make-array '(1) :adjustable t)) (defpara...
(1) odpowiedzi
2017-01-30 17:01 Debugging Quicklisp »
What's your general approach when quickload fails? I guess I'd like to know the line that provoked the problem, but all I'm given is a backtrace with ...
(0) odpowiedzi
2017-01-28 23:01 Getting ECL symbol name as string in C++ »
I'm working on embedding Embeddable Common Lisp into a library and I've been writing utility functions to convert ECL's cl_object to various C/C++ typ...
(1) odpowiedzi
2017-01-27 19:01 Is there any difference between the "for" and "as" keywords in the loop macro? »
In Common Lisp, in the loop macro, the and and as keywords appear to function identically: (loop for i from 1 to 3 do (print i)) (loop as i from 1 to...
(1) odpowiedzi
2017-01-27 18:01 Why does (probe-file #P"/") return nil? »
This seems like it could be a bug in ECL's implementation -- or due to some detail in the standard: > (probe-file #P"/usr") #P"/usr/" ...
(0) odpowiedzi
2017-01-27 03:01 LISP function to print out fibonacci sequence up to N amount of numbers »
I have to write code that computes N Fibonacci numbers (where N is the function parameter). I'm new to LISP and am struggling with the syntax. This is...
(3) odpowiedzi
2017-01-26 21:01 Is there an inverse of 'pathname-directory'? »
I wonder if there's a function such that: (equal path (some-function (pathname-directory path))) ...
(1) odpowiedzi
2017-01-26 04:01 Common Lisp - Platform for Number Crunching »
I have been using GNU Clisp on Windows 10 (on an ASUS Laptop) and ran into memory problems when creating a matrix with millions of entries. After a l...
(0) odpowiedzi
2017-01-25 16:01 Why when I convert a string to a symbol using intern is the accesror function for structures returning an error? »
I am by most standards a novice lisp programmer, however, I don't feel what I am trying to do is particularly complex and I do not understand why it i...
(1) odpowiedzi
2017-01-25 05:01 How can I find the asdf system that contains a lisp form? »
Is there a way to determine what asdf system contains a piece of code? Obviously: (let ((p *package*)) (defun get-package () p)) Getting the ...
(0) odpowiedzi
2017-01-25 04:01 Flattening lists (while removing 'nil' and keeping atoms after " . ") in lisp »
I want to create a function that would flatten a list and remove all potential nil inside. Expected behavior, example 1: (myfunc '(a (b (c) (d)) (e ...
(1) odpowiedzi