Data dodania Pytanie
2017-01-17 08:01 Why Doesn't Clojure provide standard library after creating new namespace? »
I came across this problem after creating a new namespace. Here is the code: (create-ns 'my-new-ns) => #object[clojure.lang.Namespace 0x7c7c8359 ...
(4) odpowiedzi
2017-01-16 18:01 Futures never resolve and deliver to promise »
I am reading a book to teach myself Clojure called Clojure for the Brave and True. Chapter 9 covers basic concurrent programming including delays, fu...
(1) 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
2017-01-13 09:01 CLISP Terminal error: Invalid byte sequence »
i have a problem while loading my source file inside terminal using clisp. if i execute the following command to load the file: (load #p "filename.l...
(1) odpowiedzi
2017-01-12 17:01 Exercise about substitution in nested lisp »
Morning everyones!!! I'm actually trying to make an exercise in Common Lisp but I have no idea of how to do it only using recursion. This is the pr...
(0) odpowiedzi
2017-01-12 04:01 Is there anyone who has completed all the exercises in the "Common Lisp - An Interactive Approach" book? »
Here’s the link to the book. I’m stuck in the exercises of the “Recursion on Trees” chapter (Pg 148, Prob 18.25). It involves redefining two...
(0) odpowiedzi
2017-01-11 22:01 Delete the first element of each sublist »
I am supposed to write a function which will delete the first element of each sublist. So if we are given (1 (2 (3 4) 5) 6), my function should retu...
(1) odpowiedzi
2017-01-11 04:01 Same results as "member" without using it (lisp) »
To complete an exercise, I need to check if an element is in a list or not. I know that there is the function member in lisp, but our instructor is ve...
(1) odpowiedzi
2017-01-10 14:01 Conditional "assignment" in functional programming »
I am programming something that doesn't have side-effects, but my code is not very readable. Consider the following piece of code: (let [csv_data (if...
(4) odpowiedzi
2017-01-09 14:01 How to transform this Prolog program into Lisp? »
I'm trying to learn Common Lisp, and I want to know how to make a parser similar to the Prolog for as-monomial and do not know where to start. as_mon...
(2) odpowiedzi
2017-01-08 18:01 Can't load "sdl2-ttf" or "sdl2-image" with quicklisp »
I'm trying to get the program "Sketch" (https://github.com/vydd/sketch) working. It "relies on SDL2 Image and SDL2 TTF", but I can't get them to load ...
(0) odpowiedzi
2017-01-08 07:01 Checking circularity in lisp - same variable through recursive function »
I'm trying to create a function that would test whether the given list is circular with a re-starting point being the beginning of the list. Expected...
(1) odpowiedzi
2017-01-07 04:01 how to implement monomials in common-lisp? »
i'm doing a project and i don't know how represent monomials. they must be represent in this form (m coefficient total-degree vars-n-powers). ...
(1) odpowiedzi
2017-01-05 20:01 Is the variable defined by a let mutable in Common Lisp? »
In, for example this let in Common Lisp (let ((a 5)) (print a)) Is a mutable as with defparameter, or is a constant as is the case with defvar? ...
(2) odpowiedzi
2017-01-05 00:01 Can't variables be used within generic function methods? (CLOS/LISP) »
I'm learning about generic functions in CLOS. Because of the type of examples I find in textbooks and online, I'm getting very confused. The example...
(2) odpowiedzi
2017-01-04 21:01 How to handle accents in Common Lisp (SBCL)? »
That's probably very basic, but I didn't know where else to ask. I'm trying to process some text information in an SLIME REPL from a file that are wri...
(1) odpowiedzi
2017-01-04 16:01 Explanation of a lisp code »
I start studying Lisp and I find a code on the book as example but I do not understand what is it for. Are you able to help me understanding that? I d...
(2) odpowiedzi
2017-01-04 01:01 What are those math functions end with apostrophe in Clojure? »
There are some functions(math fns) that their name end with apostrophe. Like: +', *', -' What is the difference between non-apostrophe and apostroph...
(1) odpowiedzi
2016-12-31 01:12 Why every? function returns true with empty vector in Clojure? »
I came across this weird behaviour: (every? true? []) => true (every? false? []) => true (every? odd? []) => true And list goes like tha...
(1) odpowiedzi
2016-12-28 17:12 Lisp: Collect multiple lists in loop »
I want to be able to collect multiple lists inside a loop. I know this can be done without a loop, however I was wondering whether this would be poss...
(2) odpowiedzi
2016-12-27 17:12 How to measure method efficiency in lisp? »
For example, in Prolog time/1 can be used in order to measure the amount of inferences a method call produces. Is there something similar in Lisp to ...
(1) odpowiedzi
2016-12-26 12:12 LISP how to write this function without using LOOP »
i wrote this function but i have been told i can't use the loop inside of it, i have no idea how to modify it in order to remove the loop. any suggest...
(1) odpowiedzi
2016-12-25 14:12 Package versus namespace versus module »
According to http://www.phyast.pitt.edu/~micheles/scheme/scheme29.html "It is worth mentioning that if you use a package system (like in Common Lisp)...
(2) odpowiedzi
2016-12-24 17:12 re-write without using set, setf or setq »
i need some help to re-write this function in common lisp without usin SET, SETF or SETQ (i can't also use loops), i hope some one can help me. here i...
(1) odpowiedzi
2016-12-21 15:12 Why does not Clojure allow us to write functions unordered? »
One of the things that I don't like in Clojure is that I need to define functions in order like this: (defn a [] 1) (defn b [] (+ 1 (a))) If Clo...
(1) odpowiedzi
2016-12-20 17:12 repl/source function does not work in Clojure »
I'm trying with files not REPL. Here is my clj file: tests.my-clj-file.clj (ns tests.my-clj-file (:require [clojure.repl :as repl])) (defn m...
(2) odpowiedzi
2016-12-19 13:12 Minimum value of integer lisp »
I am tryin to retrieve the minimum value of integer in lisp. I found most-negative-fixnum variable that should represent the lowest possible numbe...
(2) odpowiedzi
2016-12-19 01:12 Behaviour of defparameter used with list »
So I encountered a rather strange behaviour that I couldn't explain/understand with what I googled so far nor the Gigamonkeys Book. I tracked my prob...
(0) odpowiedzi
2016-12-18 11:12 Strange results using quote, reversing a list with all sublists recursively »
I wrote a code to reverse a list and all its sublists recursively : (defun rev1( list final ) ( if ( eq list () ) final ( if ( atom...
(1) odpowiedzi
2016-12-18 01:12 How to create a macro with arbitrary parentheses which are asymetrical (not paired) »
I want to define a macro which encapsulates the frequent pattern below. The code is for FLI of lispworks. (fli:with-foreign-string ;; class name poin...
(0) odpowiedzi
2016-12-13 14:12 Lisp: TAGBODY issue »
I am a beginner in LISP programming and I am unsure how to use tagbody in order to read numbers from the keyboard until I reach a negative number. I t...
(2) odpowiedzi
2016-12-11 13:12 Custom sort in lisp »
I have a structure which represents a monomial like this: (M coefficient monomial-degree vars) So the following monomial 3 * x * y^2 should be ...
(0) odpowiedzi
2016-12-10 17:12 Sort polynomials Common Lisp »
I'm trying to sort a list of polynomials written in this format: (M [coefficient] [total degree] [Variable List]). example: ((M 1 1 ((V 1 A))) (M 1 ...
(1) odpowiedzi
2016-12-09 19:12 Cannot do sum in lisp with do loop »
(defun suma (L) (setq var 0) (do ((i 0 (+ i 1))) ((= i (length L))) (+ var (nth i L))) var) Why does it always returns 0? Sh...
(2) odpowiedzi
2016-12-09 04:12 Member and structs in Lisp »
I know how to check if an item is in a list: (when (member item list :test #'equalp)). If I have a list of structs book : (defstruct book name a...
(1) odpowiedzi