Data dodania Pytanie
2017-12-09 07:12 How to parse source code into english? »
What step I have to take to build such program. I want to have a program that take a simple (limited) java keyword into english human language. e.g ...
(1) odpowiedzi
2017-12-09 02:12 Fortran or Common Lisp for physics? »
I am a physics student and I would start making some codes for QM, I would like to know if there are any advantages to use Fortran over CL for numeric...
(0) odpowiedzi
2017-12-08 20:12 Is there a intersection function for vectors? »
Very often one finds statements that lists have a performance disadvantage compared to vectors because of consing and additional gc steps and some fun...
(1) odpowiedzi
2017-12-06 06:12 cmucl: run-program output process exited only »
I'm on debian stretch and install CMUCL from the stable reposetory. When trying the following (run-program "sh" '("ls") :output T) I get #<pr...
(1) odpowiedzi
2017-12-06 01:12 How to convert a list into a string in lisp »
How do you convert a list into a string? I am trying to use parse-int to take a list of numbers and convert them to decimal, but i end up getting an e...
(2) odpowiedzi
2017-12-05 23:12 Hunchentoot function timeout? »
I'm about to start writing an app that will be accepting uploads of large files. I want to make sure that Hunchentoot doesn't timeout if the upload ta...
(0) odpowiedzi
2017-12-05 08:12 How to compare integers to array values in LISP »
I'm trying to write a program that takes user input for a single integer, and then a list of integers, then outputs the indices where the values matc...
(0) odpowiedzi
2017-12-04 14:12 Common Lisp: Optimizing functions in SBCL »
For 2D graphics I need to optimize my functions, but in SBCL I get lots of comments about SBCL not being able to inline arithmetic operations. I tried...
(3) odpowiedzi
2017-12-04 01:12 How to control decimal point in Common Lisp format? »
How to pass a value to a function that control how many number in decimal point to print. I can do with $ or f, e.g (format t "~,3f" 3.141592) (for...
(1) odpowiedzi
2017-12-03 15:12 Is cl-http still usable and how to install it »
How to install fantastic beast (CL-HTTP) on SBCL (or ccl) if it is still usable and why people are not using it anymore (extra question)? ...
(0) odpowiedzi
2017-12-02 19:12 Common-LISP - Subtraction »
I have this function: (defun test (variable) (cond ((null variable) nil) ((< (- 12 (other-function variable) 3) 0) 1) (t (- 12 (othe...
(1) odpowiedzi
2017-12-01 23:12 Recursive Factorial Function in Common-Lisp »
Ok, I'm been learning COMMON LISP programming and I'm working on a very simple program to calculate a factorial of a given integer. Simple, right? He...
(4) odpowiedzi
2017-12-01 22:12 Lisp: labels or separate global functions? »
This is what my wason-deck produces: ((15 . D) (35 . H) (3 . B) (19 . K) (L . 15) (A . 16) (T . 23) (R . 53) (N . 13) (M . 7) (I . 52) (35 . Q) (S ....
(1) odpowiedzi
2017-11-30 03:11 Lisp: psetf not fully understood »
I'm trying this in SBCL to flip the dotted pairs in the list: (mapcar (lambda (x) (let ((num (random 2))) (if (= num 0) ...
(2) odpowiedzi
2017-11-30 01:11 How to load ASDF system defined in local source code into remote lisp? I use SBCL, Slime and Swank »
I have a simple ASDF system at my laptop. I can do "M-X slime-load-system ", and it loads. I can call a function exported by one of packages. When I ...
(1) odpowiedzi
2017-11-29 22:11 LISP - Replace values in a list »
I have a list of nils (NIL NIL NIL NIL) and i need to add two X in place of the two first NILs, so it becomes (X X NIL NIL). I have the following cod...
(2) odpowiedzi
2017-11-29 22:11 How can I return a string from a call to ffi:c-inline in ecl? »
How can I return a string constant from a call to ffi:c-inline? I've tried variations of the following without success (ORGANIZATION is a constant de...
(1) odpowiedzi
2017-11-29 17:11 Clojure vs. Lisp: Why not concrete dotted pair in Clojure? »
In this discussion, a poster (mikera) says There's no dotted pair in Clojure. A philosophical reason for this is that Clojure avoids the use...
(1) odpowiedzi
2017-11-28 13:11 if statement within loop for statement in lisp »
I'm getting an error trying to do the if statement within the loop for statement. Is it possible to put an if statement here? (princ "Enter a number...
(0) odpowiedzi
2017-11-28 04:11 undefined variable in loop for statement in lisp »
I'm getting compilation error for number in the for loop. It says that number is undefined here. How can I make a for loop for 2 to number? (princ...
(0) odpowiedzi
2017-11-27 22:11 Lisp: create random odd numbers »
I've got this: (let ((num 1)) (mapcar (lambda (x) (cons x (if (evenp (setf num (random 299))) (1+ num) ...
(2) odpowiedzi
2017-11-26 16:11 Common Lisp - Is there a built-in function to filter a plist by keys? »
I'm looking for a built-in function like the pfilter-by-keys below: (pfilter-by-keys '(:a :b) '(:c 10 :b 20 :a 4)) ;; => (:B 20 :A 4) Its code i...
(2) odpowiedzi
2017-11-25 10:11 In common-lisp is there a way to code an 'apply' equivalent for macros? »
I have a macro: mac1(&rest args) that accepts any number of arguments Since I cannot use apply with a macro, and since I have no control on the m...
(2) odpowiedzi
2017-11-23 10:11 Does mapcan in common lisp change the value of argument? »
I don't know what happened. (setf x '((a b) (c) (1 2 3))) x ;;=> ((A B) (C) (1 2 3)) (mapcan #'cdr x) ;;=> (B 2 3) x ;;=> ((A B 2 3) (C) (...
(2) odpowiedzi
2017-11-23 09:11 Avoiding float to pointer coercion in Common Lisp »
I use SBCL (64-bit v1.4.0) for numerical calculation. After enabling optimization, following compiler note appears: note: doing float to pointer coer...
(1) odpowiedzi
2017-11-21 15:11 Using anaphoric bindings within a loop macro »
I have a construct like this (loop :for c :in list-of-char-codes :if (gethash c hash-of-frequencies) :do (incf (gethash c hash-of-freq...
(3) odpowiedzi
2017-11-19 17:11 Car: 6 is not a list error »
I'm trying to write a program in CLisp which perfectly shuffles the two lists. Below is my program. When I gave the input to the program as (shuffle '...
(2) odpowiedzi
2017-11-19 15:11 Swapping list elements in Common Lisp »
I need to swap the elements of a list given two positions (i, j) to implement 2-opt heuristics for the TSP and found this question recommending the us...
(1) odpowiedzi
2017-11-18 04:11 Writing "when" as a macro function in lisp »
I'm trying to write a macro function that would function the same way as when in Common Lisp: (defmacro when2 (&rest args) `(if (car (quot...
(3) odpowiedzi
2017-11-16 17:11 LISP function that takes 2 lists as parameters »
After briefly talking about LISP in a past class, I have decided to jump in head first and try to learn CLISP (reading Seibel's PCL chpt 5). My questi...
(1) odpowiedzi
2017-11-16 09:11 How to get multiple query parameters in Caveman »
My code works well in REPL, but it does not get the second value in my web application. eg (?vehicle=bike&vehicle=car) what I tried when I do ...
(1) odpowiedzi
2017-11-15 23:11 What are the generic functions defined by the standard? »
In Common Lisp there are a few generic functions defined by the standard, for instance functions to manipulate sequences. However looking at Graham's...
(2) odpowiedzi
2017-11-14 11:11 SLIME on Emacs with paredit in repl - how to prevent execution of incomplete but balanced expressions? »
I use paredit on emacs with SLIME's repl. This means that at any point during my typing on the repl, my s-expressions are balanced. However, they ma...
(2) odpowiedzi
2017-11-13 22:11 How to launch a Common Lisp GTK app from a command line script (or cron)? »
I have written a program generating a simple tray icon using cl-cffi-gtk and Common Lisp called tray-icon.lisp which is defined in a ASDF system calle...
(1) odpowiedzi
2017-11-13 06:11 SBCL LISP read / write order »
I am just getting started with LISP / functional programming. The following code is what I am trying to run on SBCL running on macos (defun maxOfTwo ...
(0) odpowiedzi