Data dodania Pytanie
2017-01-17 06:01 How to create a single word from macro arguments in Common Lisp? »
I have: (defmacro test (a b c) `'(,a ,b ,c)) Running (test apple banana cuba) gives (APPLE BANANA CUBA) as expected. How do I make the macro p...
(2) odpowiedzi
2017-01-14 17:01 How to define a function locally in lisp? »
I need to define a function inside a let and be able to immediately use it, like this: (let ((test (lambda () (print "ha")))) (test)) However,...
(3) odpowiedzi
2017-01-14 16:01 Spawning multiple processes to handle many socket based connections in Clozure Common Lisp »
I have the following: (defun serve (&key (port 80) (handler #'IDENTITY)) (WITH-OPEN-SOCKET (socket :LOCAL-PORT port :LOCAL-HO...
(1) odpowiedzi
2017-01-13 09:01 CLISP Terminal error: Invalid byte sequence »
i have a problem while loading my source file inside terminal using clisp. if i execute the following command to load the file: (load #p "filename.l...
(1) odpowiedzi
2017-01-13 07:01 Mutiple value bind in do loop in Common Lisp »
How do you bind multiple values returned from a function, inside a do loop? The following is obviously very wrong, but is something like this possible...
(3) odpowiedzi
2017-01-12 17:01 Exercise about substitution in nested lisp »
Morning everyones!!! I'm actually trying to make an exercise in Common Lisp but I have no idea of how to do it only using recursion. This is the pr...
(0) odpowiedzi
2017-01-12 04:01 Is there anyone who has completed all the exercises in the "Common Lisp - An Interactive Approach" book? »
Here’s the link to the book. I’m stuck in the exercises of the “Recursion on Trees” chapter (Pg 148, Prob 18.25). It involves redefining two...
(0) odpowiedzi
2017-01-12 03:01 Franz LISP to Common LISP conversion questions »
I'm reviving an old LISP program from the early 1980s. (It's the Nelson-Oppen simplifier, an early proof system. This version was part of the Ford Pa...
(1) odpowiedzi
2017-01-11 22:01 Delete the first element of each sublist »
I am supposed to write a function which will delete the first element of each sublist. So if we are given (1 (2 (3 4) 5) 6), my function should retu...
(1) odpowiedzi
2017-01-11 04:01 Same results as "member" without using it (lisp) »
To complete an exercise, I need to check if an element is in a list or not. I know that there is the function member in lisp, but our instructor is ve...
(1) odpowiedzi
2017-01-11 00:01 How to set 80 columns in LispWorks? »
I'm very new with Common Lisp and LispWorks so please describe all the steps. I want to set 80 columns, how can I do? I'm using LispWorks Personal. ...
(1) odpowiedzi
2017-01-10 18:01 Access CLOS-object slots from used external package »
I am learning to structure my CL programm and now having trouble to use the CLOS while programming in the large with packages. package.lisp (defpack...
(3) odpowiedzi
2017-01-09 20:01 How can *standard-input* and *standard-output* be redirected to another PTY, FIFO or socket? »
I was wondering if it's possible to redirect ECL's Linux stdio so that it does not share streams with the application that it's embedded in. My probl...
(0) odpowiedzi
2017-01-09 15:01 Dependent types/Parametric polymorphism in Common Lisp? »
I want to write some generic code dealing with reflection groups, and therefore need to set up some types which reflect mathematical structures (vecto...
(2) odpowiedzi
2017-01-09 14:01 How to transform this Prolog program into Lisp? »
I'm trying to learn Common Lisp, and I want to know how to make a parser similar to the Prolog for as-monomial and do not know where to start. as_mon...
(2) odpowiedzi
2017-01-08 18:01 Can't load "sdl2-ttf" or "sdl2-image" with quicklisp »
I'm trying to get the program "Sketch" (https://github.com/vydd/sketch) working. It "relies on SDL2 Image and SDL2 TTF", but I can't get them to load ...
(0) odpowiedzi
2017-01-08 07:01 Checking circularity in lisp - same variable through recursive function »
I'm trying to create a function that would test whether the given list is circular with a re-starting point being the beginning of the list. Expected...
(1) odpowiedzi
2017-01-07 04:01 how to implement monomials in common-lisp? »
i'm doing a project and i don't know how represent monomials. they must be represent in this form (m coefficient total-degree vars-n-powers). ...
(1) odpowiedzi
2017-01-06 14:01 Portable way to show the contents of the current directory »
I want to provide additional information to the user during a restart-case for missing input files. Is there a portable way to print out the files i...
(2) odpowiedzi
2017-01-06 10:01 Handling an exception in a thread »
One of my threads entered the debugger. I want to switch to it, expect that stacktrace, choose a restart, etc... How can I do that? I am using bordea...
(1) odpowiedzi
2017-01-05 20:01 Is the variable defined by a let mutable in Common Lisp? »
In, for example this let in Common Lisp (let ((a 5)) (print a)) Is a mutable as with defparameter, or is a constant as is the case with defvar? ...
(2) odpowiedzi
2017-01-05 13:01 Save a CL image without exiting the environment »
I want to save a "snapshot" of the current environment so I can play with it later without consequences for messing it up. (Essentially creating a san...
(1) odpowiedzi
2017-01-05 00:01 Can't variables be used within generic function methods? (CLOS/LISP) »
I'm learning about generic functions in CLOS. Because of the type of examples I find in textbooks and online, I'm getting very confused. The example...
(2) odpowiedzi
2017-01-04 21:01 How to handle accents in Common Lisp (SBCL)? »
That's probably very basic, but I didn't know where else to ask. I'm trying to process some text information in an SLIME REPL from a file that are wri...
(1) odpowiedzi
2017-01-04 16:01 Explanation of a lisp code »
I start studying Lisp and I find a code on the book as example but I do not understand what is it for. Are you able to help me understanding that? I d...
(2) odpowiedzi
2017-01-04 08:01 How to unshadow symbol in a Common Lisp »
I've shadowed 'and symbol doing some experiments: MATCHERS> (package-shadowing-symbols *package*) (AND) Neither (setf (package-shadowing-symbols...
(1) odpowiedzi
2017-01-03 03:01 compile error common lisp »
I am trying to compile "my-project" common-lisp, this is the relevant sections, which breaks while compiling: (ql:quickload :cffi-grovel) (ql:quic...
(1) odpowiedzi
2017-01-02 16:01 Delete occurences of item from non-linear list »
I am trying to delete all occurrences of an element from a list, from any levels of the list. I am required to use a map function though. I am using C...
(1) odpowiedzi
2017-01-01 12:01 How to write similar functions in Common Lisp? »
I'm learning Common Lisp from Practical Common Lisp. It has an example of helper functions for reading and writing binary files in Chapter 24. Here's ...
(2) odpowiedzi
2016-12-30 10:12 ignore-error on Common Lisp »
I'm trying to handle errors in Common Lisp easily, but I have some problems. In particular, I have this function. (defun function1 (m) (ignore-erro...
(1) odpowiedzi
2016-12-29 12:12 How to get a Stream from a Bit Vector in Common Lisp? »
I have a bit vector - #*10010010001001... I'd like to use READ-BYTE to read off octets from the vector. But it needs a binary stream object. I ca...
(1) odpowiedzi
2016-12-28 21:12 List position mapping in common lisp »
I have 3 lists, where the first 2 lists have the same size and the third one is a sublist of the first. Lets say list1 is '(X Y Z W), list2 is '(1 2 3...
(1) odpowiedzi
2016-12-28 17:12 Lisp: Collect multiple lists in loop »
I want to be able to collect multiple lists inside a loop. I know this can be done without a loop, however I was wondering whether this would be poss...
(2) odpowiedzi
2016-12-27 17:12 How to measure method efficiency in lisp? »
For example, in Prolog time/1 can be used in order to measure the amount of inferences a method call produces. Is there something similar in Lisp to ...
(1) odpowiedzi
2016-12-27 12:12 How do I catch the socket error in the TCP server of cl-async package? »
How do I catch the unexpected disconnection of the TCP socket with cl-async tcp-server? For example the server below cannot handle the situation when...
(0) odpowiedzi