Data dodania Pytanie
2017-04-26 17:04 LISP: with predicate as parameter »
I want a predicate as a parameter of a function. (DEFUN per (F L) (cond ((F L) 'working) (T 'anything))) (per 'numberp 3) as res...
(1) odpowiedzi
2017-04-25 17:04 In emacs, how do I bind C-l to clear screen in slime? »
Is there a way to bind C-l in SLIME to clear the screen? Thank you! ...
(1) odpowiedzi
2017-04-25 03:04 How do I call a Lisp function from Javascript »
I wrote a program in Common Lisp (CLISP 2.49) to play connect 4 against a human player. I am using javascript and jquery for the GUI. I want to call t...
(2) odpowiedzi
2017-04-23 15:04 the function to list number in a list »
I have a question need your help. Writing a recursion function named list-number to list every number in list. For example, (list-number '(2 a 4 b...
(1) odpowiedzi
2017-04-23 01:04 In common lisp, what is a function that returns the most specific supertype of two objects? »
I am most interested in the applicability to SBCL, but am curious about other implementations of Common Lisp as well. In Common Lisp we have the type...
(1) odpowiedzi
2017-04-22 15:04 How to find variable in package using string and change it? »
I have package with some variables: (in-package #:pack) (defparameter *a* "foo") (defparameter *b* "bar") Variables *a* and *b* are exported. My...
(1) odpowiedzi
2017-04-21 18:04 Clisp can't find package »
I have been running a lisp program with allegro common lisp for a couple of days. I need to use clisp now but when I try to compile it I get: SYSTEM:...
(1) odpowiedzi
2017-04-21 11:04 *= operation in Common Lisp »
I wonder if there is some function/macro in Common Lisp has similar function as *= or /= operation in C/C++. incf and decf in Common Lisp can be cons...
(2) odpowiedzi
2017-04-21 00:04 How to use cl-annot in Slime (to define another view in Lucerne) »
How to compile a function that uses a cl-annot annotation ? Use case: Lucerne uses it to define routes: @route app "/profile/:username" (defview pr...
(0) odpowiedzi
2017-04-20 00:04 Conditional branching on multiple variables »
There is a coding situation that seems to come up fairly often, for which I have difficulty organizing a consistent approach. It typically involves se...
(0) odpowiedzi
2017-04-19 20:04 Running Common Lisp on ideone.com? »
I have been teaching computer science for a long time. The languages most often taught are C#, C++, Java, Python, etc. I add in examples from other ...
(2) odpowiedzi
2017-04-17 13:04 Store list from file input stream, in a variable in LISP »
I have lets say the following list in a .txt file (5 3 1) All i am trying with following source code is to store the above list in a variable in LI...
(1) odpowiedzi
2017-04-16 17:04 SETFable vs place (CLHS) vs location (Norvig) »
Is a setfable the same as a place in CLHS and a location in Norvig's PAIP? I'm trying to figure out what exactly a place is in Common Lisp but to me ...
(1) odpowiedzi
2017-04-16 15:04 Concatenate List of Characters Recursively in Common LISP »
So I'm attempting to implement a Caesar cipher in LISP recursively, and I've got the basic functionality working. The problem is it returns a list of ...
(2) odpowiedzi
2017-04-15 20:04 How to iterate through a vector of vectors? »
I have a data structure like this: (defparameter *test* #(#(3) #(7 4) #(2 4 6) #(8 5 9 3))) which represents a triangle of integers a...
(3) odpowiedzi
2017-04-14 19:04 Why is there no generic operators for Common Lisp? »
In CL, we have many operators to check for equality that depend on the data type: =, string-equal, char=, then equal, eql and whatnot, so on for othe...
(2) odpowiedzi
2017-04-14 14:04 Write a function that takes a number as its argument and construct a list »
I start learning LISP, and I have a question need your help. Write a function NEW-LIST that takes a number as its argument and constructs a list o...
(1) odpowiedzi
2017-04-13 19:04 Compiler optimization of structure or class definitions »
What is the potential impact on compiler optimization to defining a Common Lisp structure (or class) like (defstruct person (age nil :type (or null in...
(1) odpowiedzi
2017-04-13 11:04 Whats 'T' at the end in SBCL »
I am new at SBCL programming and I ran a simple Addition program: (defvar a) (defvar b) (defvar c) (defvar d) (write-line "Enter ...
(1) odpowiedzi
2017-04-12 22:04 Lisp - Logical operators »
I am new to Lisp so this might be so simple but I am curious to know about this in any case. I am familiar with logical operators like AND and OR but...
(2) odpowiedzi
2017-04-12 01:04 Recurring with anonymous functions Common Lisp vs. Scheme »
I'm working through the Little Schemer and I'm trying to convert all of the answers into Common Lisp. In chapter 8, anonymous functions are discussed,...
(2) odpowiedzi
2017-04-11 00:04 How to store lispbuilder-sdl:colors in a list? »
I trying to store two colors in list: (defparameter *colist* '(sdl:*black* sdl:*red*)) Printing sdl:color will return color in sbcl console (print...
(1) odpowiedzi
2017-04-10 17:04 Choosing/evaluating macro argument forms »
The Common Lisp case macro always defaults to eql for testing whether its keyform matches one of the keys in its clauses. I'm aiming with the followin...
(1) odpowiedzi
2017-04-10 16:04 Unable to extract informations from p12 file in Common Lisp »
I'm trying to extract informations from a client certificate encrypted in PKCS#12 in Common Lisp. I've tried with the following steps: Load the giv...
(0) odpowiedzi
2017-04-10 15:04 How can I get the range between the smallest number and the second smallest number in Common Lisp? »
I am making a function which represents the largest number and the range between the smallest number and the second smallest number in Common Lisp. T...
(3) odpowiedzi
2017-04-07 18:04 How can I write a MEMBER function using the DO macro in Common Lisp? »
I am trying to make a function which works like MEMBER function in Common Lisp. So, I want to make this function work like this : (my-member 2 '(1 4 ...
(1) odpowiedzi
2017-04-07 10:04 Trying to get a binary file »
I would like to automate my torrent downloading, however the attempts to do it with drakma failed. Can anyone please help me out? The code goes a...
(1) odpowiedzi
2017-04-07 07:04 Step Eval Common Lisp »
I have been trying to find a method to do a "step" eval. Where I call the a function and it evaluates the most nested list for common lisp. For examp...
(2) odpowiedzi
2017-04-06 20:04 Generic macros? (as extension of generic functions) »
Paul Graham in On Lisp, Ch 18, presents a number of interesting macros for destructuring various objects, extending the basic tree destructuring offer...
(0) odpowiedzi
2017-04-06 20:04 Converting misspelled text to integer in Common Lisp? »
I am totally new to Common Lisp and Lisp in general. I have a task to write using Common Lisp and can't even figure out how to begin. My program will ...
(1) odpowiedzi
2017-04-06 10:04 SBCL common lisp, using pmap within a loop »
I've been recently dealing with a nested for loops in SBCL. I discovered, that operations, which can be reduced to map, can easily be made parallel us...
(1) odpowiedzi
2017-04-05 14:04 Choosing between recursion or iteration »
I am currently trying to solve this task in Common Lisp : -Make a function that when given three parameters (u r n) returns the average of the "n" fi...
(1) odpowiedzi
2017-04-05 12:04 Splitting a string by whitespace in SBCL »
I've been trying to split a simple whitespace-delimited string into individual parts, for example: I have: "test 123 test2 test3" ...
(2) odpowiedzi
2017-04-05 10:04 Common lisp reading a gzipped stream line by line »
I am currently dealing with a problem, where I have to read a zipped file line by line, and further on process each line and do something with it. I ...
(1) odpowiedzi
2017-04-04 16:04 Quoting match clause in CASE »
Update I think I understand what's going on. Lisp percieves only the ' part of the match clauses '(1 2 3) and '(41 42 43) as the key (because they bo...
(2) odpowiedzi