Data dodania Pytanie
2017-07-18 09:07 Comparable (Rankable / Sortable) enums in Common Lisp »
I wonder if there's any trick or library to get rankable enums in Common Lisp. In general I define a set of enums like this (deftype weekdays() ...
(1) odpowiedzi
2017-07-18 03:07 Need help presenting a list »
I need help about the way for present a list in Lisp. I have this list of names and different lenguages (setq l '((david spanish german) ...
(2) odpowiedzi
2017-07-17 19:07 LISP meaning of # symbol »
In my Lisp code I have the function (nfa-regex-compile), which creates a list of cons with the initial state, the transitions and the final state (rep...
(1) odpowiedzi
2017-07-17 11:07 Lispworks 7.0 load zeromq fail in Windows 10 »
I use the LispWorks7.0 to load the zeromq on my PC with windows 10, and got the error message as below: CL-USER 13 > (ql:quickload :zeromq) To...
(0) odpowiedzi
2017-07-16 17:07 Signing Requests & Timestamps »
Amazon has a handy-dandy tool for testing requests and confirming that you are signing requests correctly they call a 'scratchpad'. You hand it an un...
(1) odpowiedzi
2017-07-14 20:07 Is it reasonable to create large numbers of gensyms? »
I am considering using large numbers of gensyms to differentiate between objects in a system I'm building (like refs in erlang). Should I expect to r...
(1) odpowiedzi
2017-07-12 20:07 Variable not visible in if block »
(let ((x 21) (y 7)) (princ (/ x y)) (let z (/ x y) (if (eq z 3)(princ "Working")))) My intention for this program is to have "Workin...
(2) odpowiedzi
2017-07-12 11:07 Antik Iter unknown keyword matrix-element »
I'm using Antik, and consistently getting an error, "Unknown keyword MATRIX-ELEMENT": CL-USER> (defparameter m1 #m(1 2 3 grid:^ 0 6 8)) M1 CL-USER...
(1) odpowiedzi
2017-07-12 08:07 How to "cast" an instance to a subclass? »
I have an instance of class message I'll call "msg". I have defined a class "my-message" and would like instance "msg" to now be of that class. It so...
(2) odpowiedzi
2017-07-11 22:07 How to extract a certain atoms from a list in lisp »
I was wondering how can I define a function that extracts and delete certain atoms, which are passed as a parameter, from a list. For example: in this...
(0) odpowiedzi
2017-07-11 20:07 File not found in quicklisp »
I am installing cl-jupyter, there is a problem in quicklisp like this: $ sbcl --load ./cl-jupyter.lispThis is SBCL 1.3.1.debian, an implementatio...
(1) odpowiedzi
2017-07-11 07:07 How specify a parameter in a FORMAT control-string on Common Lisp as variable? »
What I can done: CL-USER> (format nil "~10:<foobar~>") " foobar" But I want pass 10 as parameter like: CL-USER> (format nil "~d:&lt...
(1) odpowiedzi
2017-07-10 19:07 Passing a function as an argument - lambda expression error? »
I am trying to create a function that accepts a list and a function as parameters and applies that function to each element in the List. Here is my at...
(2) odpowiedzi
2017-07-10 10:07 why there is a warning with a lexical variable »
I'm using the sketch library on this function: (defun init-plot (&optional (title "Plot Window") (x-size 250) (y-size 250)) ...
(0) odpowiedzi
2017-07-04 00:07 Can I pass a property list as &key arguments to a function? »
Is there's a way to pass to a function a property list as argument in a way similar to this: (defun sum (&key x y) (+ x y)) (sum '(:x 10 :y 20)) ...
(1) odpowiedzi
2017-07-02 17:07 Macros and how to trace them »
The trace macro is very useful for debugging. But it comes to a halt, when used upon any macro. Like if I try to do the following : CL-USER> (tra...
(2) odpowiedzi
2017-07-02 12:07 How to update a dependency with quicklisp? »
I have updated quicklisp to the lates version CL-USER> (ql:update-all-dists) 1 dist to check. You already have the latest version of "...
(1) odpowiedzi
2017-07-02 11:07 If there is no distinct between read, compile and runtime in Lisp, can someone give me some intuitive examples? »
As I read blog Revenge of the nerds, It says (in what made Lisp different section): The whole language there all the time. There is no real distin...
(2) odpowiedzi
2017-06-30 16:06 Emacs using Common Lisp with cl-lib.el »
I have been using ELISP for a while and now I have decided to use Common Lisp using cl-lib.el extension for Emacs. The question is does cl-lib.el prov...
(2) odpowiedzi
2017-06-28 23:06 How can I save the result of a dolist in a new list? »
I want to remove, with two given lists, the elements that aren't in both. The code that I am trying is: (defun remove_odd_ones(L1 L2) (cond ((or...
(0) odpowiedzi
2017-06-28 08:06 Count elements and return them »
I want to count the elements in a list and return a list containing the elements paired with them respective quantity Something like that: Input: (c...
(1) odpowiedzi
2017-06-27 10:06 Make ASDF3 available in Maxima's SBCL »
Maxima for Windoows is compiled with SBCL but somehow is missing ASDF3 support. Here is the output of *FEATURES* from Maxima: (QUICKLISP ASDF2 ASDF A...
(0) odpowiedzi
2017-06-25 00:06 Win10: ASDF can't load system (ASDF_OUTPUT_TRANSLATION error) »
Update 2 I think @faré is right, it's an output translation problem. So I declared the evironment variable ASDF_OUTPUT_TRANSLATIONS and set it to E...
(1) odpowiedzi
2017-06-23 23:06 Insert a Element1 before a Element2 »
I have two elements and a list. I have to insert the second element before the first element, every time that the first element appears, in the first ...
(2) odpowiedzi
2017-06-23 13:06 Neither a function nor a macro would do »
Consider this question. Here the basic problem is the code: (progv '(op arg) '(1+ 1) (eval '(op arg))) The problem here is that progv binds the ...
(1) odpowiedzi
2017-06-22 13:06 How do setf works under the hood? »
Currently learning common lisp, following Peter Seibel's Practical Common Lisp (i'm at chapter 11, about collections), i have difficulties to understa...
(2) odpowiedzi
2017-06-21 19:06 Common Lisp: relative path to absolute »
May be it is a really dumb question, but after playing around with all built-in pathname-family functions and cl-fad/pathname-utils packages I still c...
(3) odpowiedzi
2017-06-20 06:06 SYMBOL-VALUE of +,/ and * »
Consider the following code snippet: [1]> (symbol-value '+) NIL [2]> + (SYMBOL-VALUE '+) [3]> (symbol-value '/) ((SYMBOL-VALUE '+)) [4]> ...
(2) odpowiedzi
2017-06-20 03:06 Defining aliases for setf functions in Common Lisp »
According to this question, an alias to a function can be created like so: (defun some-function () ...) (setf (fdefinition 'sfunc) #'some-function) ...
(1) odpowiedzi
2017-06-18 11:06 Call to the next most specific method does not work »
Consider the class account : (defclass account () ((name :initarg :name :reader name) (balance :initarg :balance :initform 0.00 :accessor balanc...
(1) odpowiedzi
2017-06-17 15:06 Can't get AllegroServe / Ironclad to work »
(ql:quickload "aserve") fails I'm trying to install AllegroServe. According to http://quickdocs.org/portableaserve/ and to this SO thread the simples...
(1) odpowiedzi
2017-06-17 04:06 Dynamic Binding and Macros »
Consider the following code: CL-USER> (defmacro sum (a b) (+ a b)) SUM CL-USER> (let ((alpha 3) (beta -1)) (sum alpha b...
(2) odpowiedzi
2017-06-16 22:06 How to check if the result of a calculation is a natural number? »
For another Project Euler struggle (using SBCL 1.3.17) I want to test if a number is a pentagonal number. This can be easily tested if the result of ...
(1) odpowiedzi
2017-06-16 20:06 Use package shadowing symbols »
For instance I have this package definition which shadows COMMON-LISP:LISTEN : (defpackage :shadows (:use :common-lisp) (:shadow #:listen) (:ex...
(3) odpowiedzi
2017-06-16 17:06 How to get a file size (and other attributes) in Common Lisp? »
How do we get file attributes ? I primarily am looking to get the size, but also its last access time and other attributes. I only found (file-length...
(1) odpowiedzi