Data dodania Pytanie
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
2016-12-26 14:12 How to compare symbols alphabetically in Common Lisp? »
I trying to compare a symbol to another alphabetically, but I can't do this. In particular, I've done this. CL-USER 1 > (string-lessp 'k 'a) NIL ...
(1) odpowiedzi
2016-12-26 12:12 LISP how to write this function without using LOOP »
i wrote this function but i have been told i can't use the loop inside of it, i have no idea how to modify it in order to remove the loop. any suggest...
(1) odpowiedzi
2016-12-26 11:12 SBCL changes EQness of a local bound function object, even though it is not set? »
Given this example code (from a Reddit /r/lisp question): (defun next (pos) (nth (1+ pos) '(0 1 2 3 4 5 6 7 8 9 10))) (defvar *next* (funct...
(2) odpowiedzi
2016-12-25 14:12 Package versus namespace versus module »
According to http://www.phyast.pitt.edu/~micheles/scheme/scheme29.html "It is worth mentioning that if you use a package system (like in Common Lisp)...
(2) odpowiedzi
2016-12-25 07:12 Common Lisp: Run function in the background »
What's the best way to run a function in the background, in Common Lisp? Specifically, I'm making a call like (trivial-shell:shell-command "<long a...
(2) odpowiedzi
2016-12-24 19:12 Common lisp: run shell command containing the string "\n" »
I'm trying to run something that simplifies to (trivial-shell:shell-command (concatenate 'string "echo -e " "one" "\n" "two")) And trying to get...
(2) odpowiedzi
2016-12-24 17:12 re-write without using set, setf or setq »
i need some help to re-write this function in common lisp without usin SET, SETF or SETQ (i can't also use loops), i hope some one can help me. here i...
(1) odpowiedzi
2016-12-23 19:12 Common lisp read from FIFO with timeout »
So I have some code like (let ((file (open cur-fifo :if-does-not-exist :create))) (format t "~A~%" (read-line file nil)) (close file)) Which as...
(1) odpowiedzi
2016-12-21 08:12 Difference between quote, list when used in equal »
I need to know what the difference between quote and a list. For example: cl-prompt> (equal (first (list * 1 2)) *) T cl-prompt> (equal (first...
(2) odpowiedzi
2016-12-20 20:12 Member function with multi-level list in Common Lisp »
I'm trying to understand how it works member function with list and list of lists. Here an example. (member '(A 6) '((A 7) (B 6) (E 6) (D 5)) :test...
(1) odpowiedzi
2016-12-20 08:12 Undefined function error inside LABELS in Common Lisp »
I have: (defun serve (&key (port 80) (handler #'IDENTITY)) (WITH-OPEN-SOCKET (socket :LOCAL-PORT port :LOCAL-HOST "localhost" :CONNECT :PASSIVE...
(2) odpowiedzi
2016-12-19 13:12 Minimum value of integer lisp »
I am tryin to retrieve the minimum value of integer in lisp. I found most-negative-fixnum variable that should represent the lowest possible numbe...
(2) odpowiedzi
2016-12-19 01:12 Behaviour of defparameter used with list »
So I encountered a rather strange behaviour that I couldn't explain/understand with what I googled so far nor the Gigamonkeys Book. I tracked my prob...
(0) odpowiedzi
2016-12-18 18:12 Common lisp workin with list »
my task is to count all element within a list, which have duplicates, eg ( 2 2 (3 3) 4 (3)) will result in 2 (because only 2 and 3 have duplicates) Se...
(1) odpowiedzi
2016-12-18 11:12 Strange results using quote, reversing a list with all sublists recursively »
I wrote a code to reverse a list and all its sublists recursively : (defun rev1( list final ) ( if ( eq list () ) final ( if ( atom...
(1) odpowiedzi
2016-12-18 01:12 How to create a macro with arbitrary parentheses which are asymetrical (not paired) »
I want to define a macro which encapsulates the frequent pattern below. The code is for FLI of lispworks. (fli:with-foreign-string ;; class name poin...
(0) odpowiedzi
2016-12-17 18:12 Mapping into a tree of nested sequences »
I've coded a function that aims to map into an arbitrary tree of nested proper lists, somewhat analogous to the common lisp function map-into: (defun...
(2) odpowiedzi