Data dodania Pytanie
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
2017-09-19 08:09 SBCL returns handle-win32-exception »
I wanna call c++ function from SBCL using cffi. I tried to call the following very simple function. #include <stdio.h> void print1() { printf(...
(0) odpowiedzi
2017-09-17 12:09 sbcl: additional documentation for (for example) #'sb-ext:string-to-octets »
I recently asked a question about sbcl for which a response mentioned two functions of which I wasn't aware: #'sb-ext:string-to-octets and #'sb-ext:oc...
(1) odpowiedzi
2017-09-17 07:09 Running scripts with special conditions in Atom »
I used to use the build system in Sublime text where I could add my own customize build systems. For example, for CLisp, I created a build system as s...
(1) odpowiedzi
2017-09-17 05:09 sbcl: encoding and decoding characters without actual I/O »
In sbcl, when encoding a string using, say, :utf-8, is there a way to encode it to a byte vector without doing actual I/O, similar to clisp's (EXT:CO...
(2) odpowiedzi
2017-09-16 22:09 CLISP Recursive function returning at ATOM if it is a MEMBER of a list »
I need help figuring out what I have wrong with my code, this is the problem assigned: write a recursive function named MYMEMBER that takes an ATOM (...
(1) odpowiedzi
2017-09-14 21:09 "DO" macro variable-definition not being bound »
I have written a function using the DO macro (using Peter Seibel's book as reference) but for some reason, when I compile my function: (defun test (...
(1) odpowiedzi
2017-09-14 18:09 Lisp, instructions not working in defun »
I'm trying to make a function that changes infix input to prefix eg : (x + 1) as input outputted as (+ x 1). So here is my code for the moment : (s...
(1) odpowiedzi