Data dodania Pytanie
2017-10-19 17:10 Common Lisp Code Freezes or Needs to Be Optimized »
I am currently working on some problems from Project Euler as part of my Common Lisp learning routine. I shall not mention which problem it is in keep...
(1) odpowiedzi
2017-10-18 00:10 Common Lisp random dices »
I´m a beginner of c. Lisp and actually i´ve got some problems with my first code. The topic was a "dicegame" with random numbers. If you get two 1 y...
(1) odpowiedzi
2017-10-16 15:10 Remove from list from other list »
I have list witch contain other lists (2 levels only) ((S U S U R) (S U S R) (S U R)) How to remove the lists from list which contains some pairs, ...
(1) odpowiedzi
2017-10-16 02:10 Explicitly stack-allocated data »
I think in most implementations of Common Lisp cons cells are generally/always heap allocated (see Why is consing in Lisp slow?) Common Lisp does pro...
(1) odpowiedzi
2017-10-15 17:10 lisp quadratic equation imaginary and real parts »
I'm learning lisp and I can not understand this problem Modify the function that returns the roots of a quadratic equation so that it returns the rea...
(1) odpowiedzi
2017-10-14 01:10 How to enable CORS in Hunchentoot or Clack, or how to add a specific header? »
The question says it all. This tutorial: https://www.html5rocks.com/en/tutorials/cors/ says to, at the very least, add a Access-Control-Allow-Origin: ...
(1) odpowiedzi
2017-10-14 00:10 Managing Dependencies in Common Lisp »
I come to Lisp from the Python world, which essentially runs on virtualenv and pip as the way to create containers and manage dependencies. Currently...
(1) odpowiedzi
2017-10-12 09:10 Lisp function for duplicate elements »
I am beginner in LISP so I need to write a function (DUPLICATE-ELEMENTS L), which checks the repeated occurrence of an element (atom or list) in L. E...
(1) odpowiedzi
2017-10-12 05:10 Using Clisp on Git Bash »
This is just a quick question, but how do you run a "clisp" command in Git Bash. It works in Windows Powershell, but not in Git Bash. (The "clisp" co...
(1) odpowiedzi
2017-10-12 04:10 Get very first element of a multi bracket list in Lisp »
If I have a list as follows: (((X))) I want to get just X and not get the brackets In LISP, if I do CAR, I'll still get the brackets. Is there a...
(2) odpowiedzi
2017-10-10 12:10 Recursive function that returns unique items from list [Common Lisp] »
I'm new Lisp programmer and need some help. Given a list, I`m trying to copy elements that appear once in another list. I have done the following: ...
(1) odpowiedzi
2017-10-10 00:10 sbcl: muffle style-warning in defmacro »
In sbcl, I know I can muffle the anticipated messages when using both &optional and &key in defun, but that doesn't seem to work in defmacro. ...
(1) odpowiedzi
2017-10-09 23:10 Which Lisp and which GUI for a vector drawing application? »
I intend to write a vector drawing application in Lisp. I am most comfortable with Common Lisp SBCL and qtools looks fine to me. However, I am tempted...
(0) odpowiedzi
2017-10-09 04:10 SBCL error: "binding stack exhausted" when running Maxima on Linux machine »
I realize there are many places I can ask this question at but I thought I'd try here. I've already seemingly attained as much help as I can from the ...
(1) odpowiedzi
2017-10-06 17:10 Common Lisp Package and Module Management »
I am currently trying to understand how Common Lisp manages its packages and modules. Consider this code: (in-package :cl-user) (ql:quickload :cl-w...
(1) odpowiedzi
2017-10-06 02:10 Processing Parameters Passed to defmacro in Common Lisp »
While trying to solve a problem in Project Euler, I wrote the following function and macro: (defun digits (n &key (base 10)) ;; Returns a list wi...
(2) odpowiedzi
2017-10-06 01:10 Common Lisp Function Return vs Side Effect »
In Common Lisp, if one runs (print "Hello"), he gets this back: "hello" "hello" It is my understanding that one of these is a side effect of the p...
(0) odpowiedzi
2017-10-04 22:10 primep function in common lisp »
I am new to common lisp. I wrote the following predicate function implementing the trial-division algorithm. Is there still a shorter and lispier way ...
(2) odpowiedzi
2017-10-03 22:10 Error in running LISP code using JScheme in java »
Jar file PC location is mention below: cmd Command: javac -cp "C:\Users\Krishna\Downloads\jscheme-7.2.jar" sample\ABC.java java sample.ABC Sour...
(0) odpowiedzi
2017-10-03 16:10 Can functions do most of what macros do in Common Lisp? »
As I understand it, one difference between functions and macros in Common Lisp is that macros do not evaluate their arguments when called. However, wo...
(0) odpowiedzi
2017-10-03 15:10 Sort elements in list »
How to sort elements in list alphabetically ...
(0) odpowiedzi
2017-10-02 21:10 Checking if numbers are even or odd in lisp »
I need to write a recursive method in lisp that doubles the odd values and leaves the even values alone. So far i have: (defun MY-DOUBLE-ODD (n) ...
(1) odpowiedzi
2017-10-02 09:10 Building an executable with ECL: missing dependency or can not find make-build in asdf/interface »
I'm trying to build an executable with ECL. I looked at the doc and this other SO question, where we learn that with ECL v <= 16.1.3 we must add a ...
(2) odpowiedzi
2017-10-02 01:10 can anybody help to write a lisp code to find the first element which is satisfying the predicate in the list »
can any body help me to write the common lisp code? as following: create a find first predicate list function to return the first element which is sat...
(2) odpowiedzi
2017-10-01 23:10 Learning LISP. Why does NIL print out after end of function using if statement »
Hi newbie here trying to learn lisp and im confused as to why lisp prints out NIL at the end of my output? Is there a way for it to not print NIL or i...
(2) odpowiedzi
2017-10-01 22:10 how can I write the lisp function to use the predicate »
for example, what should I input is here finfirst #'oddp '(1 2 3), and it should find the first odd number return to the list, so what I think I need ...
(0) odpowiedzi
2017-09-30 06:09 "Hot" Debug and Swap in Common LISP »
One of the features that are unique to Common Lisp that is frequently mentioned is that of the "hot" debug. That is, it is the ability to debug, edit ...
(2) odpowiedzi
2017-09-29 21:09 Lazily generating prime in Common Lisp »
I'm trying to generate prime numbers in a pythonic way- that is, using generators. The python code would be more or less the following def divisor_i...
(1) odpowiedzi
2017-09-29 08:09 Using a macro to define functions computing the 10 Easter related based dates »
I'm currently learning lisp with Graham's book “ANSI Common Lisp” and as an exercise I am writing Julian-day based calendar calculations. As you k...
(1) odpowiedzi
2017-09-28 17:09 lisp: required argument to defun not a symbol »
When porting legacy code from clisp to sbcl, I encountered syntax which raised a problem illustrated by this code which runs without apparent error in...
(1) odpowiedzi
2017-09-28 17:09 Why does this program return a list of atoms? »
So I am learning Lisp at school and one of the programs I have to create is one that duplicates the functionality of remove-if-not by using mapcan. I ...
(1) odpowiedzi
2017-09-27 22:09 Lisp labels function deleted before used »
I'm trying to use a local function using labels to allow my function to recurse. This is the code: (defun my-replace (e1 e2 L) "Perform a deep r...
(1) odpowiedzi
2017-09-24 19:09 Why Terminal stop responding to Enter command and what I write? »
I have a list of lists "straight": (setq straight '( ("Arad" 366) ("Bucharest" 0) ("Craiova" 16...
(1) odpowiedzi
2017-09-20 19:09 Is there a way to change delimiters of documentation string in Common Lisp? »
I sometimes put examples of function calls and their output in the documentation string of a function definition. (defun js-[] (&rest args) "J...
(4) odpowiedzi
2017-09-19 12:09 SBCL optimization: function type declaration »
If I have a function that accepts function argument, for optimization purposes I can declare it to be a function, let's say (defun foo (f) (declar...
(0) odpowiedzi