Data dodania Pytanie
2017-02-05 02:02 Find position of atom - return nil if not present »
I am trying to find the position of an atom in the list. Expected results: (position-in-list 'a '(a b c d e)) gives 0 (position-in-list 'b '(a b c ...
(3) odpowiedzi
2017-02-04 02:02 Inversion of a bit »
I haven't been able to find a common-lisp function (or macro) that simply inverts a bit. There are functions that operate on bit arrays, and logical f...
(1) odpowiedzi
2017-02-04 02:02 how are functions defined in the lisp dialect used in the little lisper 1974 edition »
The first function definition in the 1974 edition of the Little Lisper appears as follows: (ISLAT (LAMBDA (L) (COND ((NULL L) T) ((ATOM (...
(1) odpowiedzi
2017-02-03 21:02 How to load non-standard characters from file using SBCL Common Lisp? »
Trying loading contents of file containing one line with word: λέξη (with-open-file (s PATH-TO-FILE :direction :input) (let ((a (read-line s)))...
(1) odpowiedzi
2017-02-03 18:02 What is alexandria:ensure-symbol for? »
It seems to do what intern does. Maybe (intern (read sym)). But what is it for? I see it being used like: (if (keywordp x) (alexandria:ensure-symbo...
(1) odpowiedzi
2017-02-03 04:02 How can I list all of the defined functions and global variables that are active in common lisp »
Is it possible to determine what the current environment has defined (in the common lisp image), from the running system itself? I am running SBCL 1....
(1) odpowiedzi
2017-02-02 14:02 Charsets in Common Lisp »
I've been working on a common lisp program that parses through two XML files and combines them in a custom way to make a third XML. Unfortunately, lis...
(1) odpowiedzi
2017-02-02 05:02 Error: "Should be a lambda expression" »
I am new to Lisp and this is the first function I have written. I am trying write a lisp function (without using the remove lisp function) that takes ...
(0) odpowiedzi
2017-02-01 11:02 using COND on optional arguments in common lisp »
I'm having some problem writing a LISP function. The function is defined as (defun foo (arg1 &optional cont)) (cond ((null arg1) nil) ...
(1) odpowiedzi
2017-01-31 18:01 Brainf**k implemented in Common Lisp »
I tried implementing Brainf**k in Common Lisp, SBCL. I have encountered some problems. (defparameter *tape* (make-array '(1) :adjustable t)) (defpara...
(1) odpowiedzi
2017-01-30 17:01 Debugging Quicklisp »
What's your general approach when quickload fails? I guess I'd like to know the line that provoked the problem, but all I'm given is a backtrace with ...
(0) odpowiedzi
2017-01-28 23:01 Getting ECL symbol name as string in C++ »
I'm working on embedding Embeddable Common Lisp into a library and I've been writing utility functions to convert ECL's cl_object to various C/C++ typ...
(1) odpowiedzi
2017-01-27 19:01 Is there any difference between the "for" and "as" keywords in the loop macro? »
In Common Lisp, in the loop macro, the and and as keywords appear to function identically: (loop for i from 1 to 3 do (print i)) (loop as i from 1 to...
(1) odpowiedzi
2017-01-27 18:01 Why does (probe-file #P"/") return nil? »
This seems like it could be a bug in ECL's implementation -- or due to some detail in the standard: > (probe-file #P"/usr") #P"/usr/" ...
(0) odpowiedzi
2017-01-27 03:01 LISP function to print out fibonacci sequence up to N amount of numbers »
I have to write code that computes N Fibonacci numbers (where N is the function parameter). I'm new to LISP and am struggling with the syntax. This is...
(3) odpowiedzi
2017-01-26 21:01 Is there an inverse of 'pathname-directory'? »
I wonder if there's a function such that: (equal path (some-function (pathname-directory path))) ...
(1) odpowiedzi
2017-01-26 04:01 Common Lisp - Platform for Number Crunching »
I have been using GNU Clisp on Windows 10 (on an ASUS Laptop) and ran into memory problems when creating a matrix with millions of entries. After a l...
(0) odpowiedzi
2017-01-25 16:01 Why when I convert a string to a symbol using intern is the accesror function for structures returning an error? »
I am by most standards a novice lisp programmer, however, I don't feel what I am trying to do is particularly complex and I do not understand why it i...
(1) odpowiedzi
2017-01-25 05:01 How can I find the asdf system that contains a lisp form? »
Is there a way to determine what asdf system contains a piece of code? Obviously: (let ((p *package*)) (defun get-package () p)) Getting the ...
(0) odpowiedzi
2017-01-25 04:01 Flattening lists (while removing 'nil' and keeping atoms after " . ") in lisp »
I want to create a function that would flatten a list and remove all potential nil inside. Expected behavior, example 1: (myfunc '(a (b (c) (d)) (e ...
(1) odpowiedzi
2017-01-24 21:01 Concise access to generalized variables »
Common-lisp seems to provide "generalized variables" to allow programmatic access to places in addition to names (of variables). As a simple example, ...
(0) odpowiedzi
2017-01-24 18:01 HTTPS with Clack »
I have written a small server with Ningle, which in turn is using Clack to start a web server such as Hunchentoot or Woo. How can I handle HTTPS requ...
(1) odpowiedzi
2017-01-24 11:01 Partially Shared data structures common lisp »
Say I wanted to have two lists(setq x '(1 2 3)) and (setq y (list 1 (cadr x) 3) but I wanted (cadr y) to actually point to (cadr x) so that after (set...
(2) odpowiedzi
2017-01-23 21:01 Common lisp: How to implement reduce »
I've been looking for this for days, basically I need to implement a function that does the same thing that the system function reduce does. This is w...
(2) odpowiedzi
2017-01-23 02:01 Should error reporting bind *print-circle* to T? »
When CL reports an error, it often prints objects which caused the error. Should CL bind *print-circle* (or *print-length*/*print-level*) when printi...
(1) odpowiedzi
2017-01-22 23:01 Clisp "Program stack overflow. RESET" on a (cadr). How? »
I'm (still) porting code from Franz Lisp to Common LISP. Now I seem to have pushed the interpreter into a strange corner where it blows up. [11]>...
(1) odpowiedzi
2017-01-21 01:01 Why do some lisps put the function name outside of the argument list in a function definition? »
common lisp and clojure do (defn function-name (arg1 arg2) (body)) racket/scheme does (defn (function-name arg1 arg2) (body)) The latter makes m...
(3) odpowiedzi
2017-01-20 20:01 Extendable Vector Type »
How does one properly specify the common-lisp type of an extendable vector (ie, acceptable to vector-push-extend), so it can be copied. For example, i...
(2) odpowiedzi
2017-01-20 08:01 Clisp error message: an object cannot start with #\). What does this mean? »
Please see this example. I am using GNU CLISP 2.49. (defparameter *pudding-eater* 'henry') ;; output: READ from #<INPUT CONCATENATED-STREAM #<...
(3) odpowiedzi
2017-01-19 03:01 Franz LISP to Common LISP conversion 2 - macros which generate macros »
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 Pas...
(2) odpowiedzi
2017-01-19 01:01 how to remove an element from a nested list lisp »
could you please help me to solve a tricky homework about nested list? Basically anytime the predicate evenp is true , I should remove the element fr...
(1) odpowiedzi
2017-01-18 16:01 LISP FUNCTION - Return the count of numbers of the list that are bigger of the first element »
I want to solve a lisp function that returns a NUMBER(count) of numbers which are greater than the first number in the list.The list is a linear list ...
(2) odpowiedzi
2017-01-18 15:01 Read in data from the user in a loop »
For a little game I am working on, I want to read in the names of the players. I have two solutions so far which I find both a bit cumbersome. Version...
(1) odpowiedzi
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