Data dodania Pytanie
2017-03-03 15:03 &optional parameter in lisp macros: Why does this variable behave like this? »
I'm trying to create a lisp macro that has an &optional parameter with a default value. Unfortunately the parameter is processed differently depen...
(1) odpowiedzi
2017-03-02 23:03 How to run Windows shell commands from Lisp with asdf uiop:run-program under sbcl »
We would like to invoke Windows shell commands from within Lisp, using sbcl and asdf uiop:run-program. What we have done under emacs/slime on Windows...
(1) odpowiedzi
2017-03-02 13:03 Common Lisp: CLOS and packages / how to import and merge generics »
Suppose we have two packages, each defines a class and exports symbols for slots/generic methods with identical names. (defpackage pkg1 (:export _cla...
(2) odpowiedzi
2017-03-01 20:03 Common Lisp type vs. class distinctions »
In the post at Common Lisp class hierarchy, Rainer Joswig & Joshua Taylor carefully distinguish some of the differences between built-in Common Li...
(3) odpowiedzi
2017-03-01 01:03 Breaking up a list into groups of 3's and interjecting symbols »
Im trying to create a function which will take a integer argument and returns those integers with their position within the number spelled out. For ex...
(1) odpowiedzi
2017-02-28 18:02 Hunchentoot dispatcher »
I'm relatively new to Common Lisp (SBCL) and Hunchentoot (using Quicklisp). Can someone tell me how I can get this to work? I'm trying to wrap an Hunc...
(1) odpowiedzi
2017-02-28 17:02 Common Lisp class hierarchy »
Greg Pfeil's Class Hierarchy diagram provides a comprehensive picture the Common Lisp type system. But I'm trying to better understand the class relat...
(2) odpowiedzi
2017-02-28 16:02 Access https page in Common Lisp error »
Right now when I am trying in Common Lisp to connect to an https site with dexador I get this error: SSL verify error: 20 X509_V_ERR_UNABLE_TO_GET...
(0) odpowiedzi
2017-02-27 22:02 How do I encode booleans using yason? »
I'm trying to use the yason library to encode some data for an API endpoint. Some parts of the return value here are going to be booleans. The problem...
(1) odpowiedzi
2017-02-26 17:02 How is the defun macro implemented in lisp? »
I'd like to learn more about lisp macros and I want to create a simple implementation of the defun macro. I'm also interested in lisp's source code in...
(2) odpowiedzi
2017-02-26 09:02 Lisp- "[Function name] Is not a Number" »
So I have this simple expression to evaluate and list the two roots of a quadratic equation: (defun QUADRATIC (A B C) (list (/ (+ (- B) (sqrt(- (*...
(1) odpowiedzi
2017-02-25 18:02 Immutable lisp objects »
Peter Seibel in Practical Common Lisp Ch 6. Variables, footnote 4, mentions that integers and characters are immutable. (To this short list, sds at No...
(1) odpowiedzi
2017-02-24 19:02 How do I create SHA256 HMAC using Ironclad in Common Lisp? »
There is a python function I am trying to port to Common Lisp: HEX(HMAC_SHA256(apiSecret, 'stupidstupid')) How do I go about this with Ironclad? T...
(1) odpowiedzi
2017-02-24 03:02 Passing by parameters by value in lisp »
The problem I am having is that I can't get around the fact that lisp passes arrays by value not by reference. When I researched this problem, the so...
(1) odpowiedzi
2017-02-23 01:02 The copy-symbol function »
Common Lisp provides a number of functions for copying objects; namely, copy-list, copy-alist, copy-seq, copy-structure, copy-tree, and copy-symbol. H...
(1) odpowiedzi
2017-02-22 15:02 lisp different length two list »
I'm having difficulties with two lists of different lengths. (f '(8 1 2 3 23 12) '(2 9 4 6)) should return (1 2 3 4 6 8 9 12 23) This is my trying c...
(1) odpowiedzi
2017-02-21 18:02 Nondestructive setf? »
Common Lisp seems to go to great lengths to provide both nondestructive functions (like subst & remove) and destructive functions and modify macro...
(2) odpowiedzi
2017-02-21 07:02 What is the meaning of adoc mode? »
The adoc minor mode automatically appear whenever I open Common Lisp extension file *.lsp. I have done a search on Google, as well on Emacs help itse...
(1) odpowiedzi
2017-02-21 00:02 Installing CLOCC & packages »
The comment by sds at Saving CLOS objects provides a reference to a Common Lisp Open Code Collection (CLOCC) file (closio.lisp) for printably reading ...
(1) odpowiedzi
2017-02-20 15:02 Lisp recursive square use one variables »
This is Trying code (defun f (a n) (if (zerop n) 1 (* a (f a (- n 1))))) (f 3) should return 27, (f 4) should return 256 I tri...
(5) odpowiedzi
2017-02-20 00:02 Saving CLOS objects »
Saving any Common Lisp structure object to a file (readably) seems relatively straightforward with something like (defun save-structure-object (objec...
(1) odpowiedzi
2017-02-20 00:02 Advice on how to tackle this lisp function. »
I have written a function called my_rotate that takes a number from a user and creates a list up to five numbers. my_rotate then, pops off the first e...
(1) odpowiedzi
2017-02-19 01:02 Why is my lisp function giving me this output? »
I am writing a function that will take a list from a user and will flatten this list into one simplified list. The function seems to only return the f...
(1) odpowiedzi
2017-02-18 20:02 Evaluation of setf forms »
This question is about the Common Lisp setf macro, and how it evaluates its argument forms (and subforms)--namely, only once if they happen to appear ...
(1) odpowiedzi
2017-02-18 17:02 trying to use cl-lexer on a file containing "{" and "}" »
Using the file "test-lexer.lisp", I have very slightly modified lex to be (defparameter *lex* (test-lexer "{ 1.0 12 fred 10.23e12")) and increased...
(1) odpowiedzi
2017-02-18 09:02 Number of atoms in a tree »
I don't understand the following paragraph: (COUNT-ATOMS ’(A (B) C)) should return five. A, B, and C and two NILs in the tree. Write a...
(2) odpowiedzi
2017-02-17 17:02 What is the best way of combining &key and &rest in a lisp macro's lambda list? »
I implemented Heap's algorithm using a macro. It's working OK, but I would like to tweak it so it will generate anaphoric or non-anaphoric code on dem...
(1) odpowiedzi
2017-02-17 15:02 Group the elements of a set into disjoint subsets using iteration instead of recursion »
I came across Pascal Bourguignon's solutions of the 99 Lisp problems and was wondering if his recursive solution of problem 27 using a nested mapcan-m...
(0) odpowiedzi
2017-02-17 13:02 Searching an item in a k-d tree »
I am developing a k-d tree in Lisp. I am writing a function that allows me to search a node in the k-d tree. This function is defined as follows: (de...
(3) odpowiedzi
2017-02-16 23:02 What does DECODE-UNIVERSAL-TIME do in half-hour time zones? »
In Common Lisp, the decode-universal-time function returns several values, one of which is the time zone in hours. What does this time zone contain in...
(1) odpowiedzi
2017-02-16 03:02 Why is Common Lisp's print output preceeded by a newline and followed by a space? »
The Common Lisp Hyperspec page for print mentions this: print is just like prin1 except that the printed representation of object is preceded by a...
(2) odpowiedzi
2017-02-15 18:02 Using get-setf-expansion »
In a previous post at Simplifying complex setf expressions, @sds suggested using the get-setf-expansion macro for implementing place modification, as ...
(0) odpowiedzi
2017-02-15 14:02 A safe way to transpose a list of of lists in lisp? »
Transposing a list of lists is easy but comes with a caveat that you must not exceed the call-arguments-limit. http://www.lispworks.com/kb/4fbc798cb1...
(1) odpowiedzi
2017-02-14 10:02 Reload components list »
Here is my workflow: I have a running REPL in my emacs and I create a new system. When I try to test the system with (asdf:test-system :system) I get ...
(1) odpowiedzi
2017-02-14 07:02 how to deal with `&rest` args in common lisp »
I am new to common lisp, when I see &rest in function arguments declaration, I thought it is similar to *args in ruby. And I started to write a fu...
(1) odpowiedzi