common-lisp Questions

4

Solved

I have a problem in understanding the performance of a Common Lisp function (I am still a novice). I have two versions of this function, which simply computes the sum of all integers up to a given ...
Coupon asked 18/5, 2013 at 16:50

4

Solved

I'm looking for a possibly non-verbose portable way to initialize a hash table in Common Lisp. E.g. something that works for constant hash tables, but also to pre-load variable hashes. In CLISP I a...
Obscene asked 22/5, 2012 at 16:19

4

Solved

The Common Lisp HyperSpec says in the funcall entry that (funcall function arg1 arg2 ...) == (apply function arg1 arg2 ... nil) == (apply function (list arg1 arg2 ...)) Since they are somehow ...
Barren asked 5/10, 2010 at 9:30

5

Solved

Let's say I have the floating point number 1234.9 I want to format it as 1.234,90 Is there a format directive combination for that? ~D ,which can handle the grouping and the group char, handles o...
Ottoottoman asked 26/1, 2016 at 11:32

3

Solved

I have a directory name (as string) with a tilde: ~/projects. I want to get its fullpath: /home/user/projects. How do I do that ? The goal is to pass it to uiop:run-program, that doesn't seem to ...
Cyclostome asked 18/9, 2019 at 14:36

2

Solved

Is there a way to explore the current state of a Common Lisp image (i.e. the loaded packages, available symbols, etc.)? I know about the command (apropos "foo"), but I would like to see t...
Glans asked 2/7, 2021 at 7:9

3

Solved

I'm trying to convert a recursion problem written in Python (the 4th problem here see its repo page for details) into (Common) Lisp Here is the Python code which I've edited slightly for readabilit...
Dunton asked 25/6, 2021 at 21:12

2

Solved

I am reading the book Object Oriented Programming in Common Lisp from Sonja Keene. In chapter 2, the author says: The procedure for determining which methods to call and then calling them is calle...
Sphygmomanometer asked 9/6, 2021 at 1:30

1

Solved

I am trying to learn Common Lisp with the book Common Lisp: A gentle introduction to Symbolic Computation. In addition, I am using SBCL, Emacs, and Slime. By the end of chapter 10, the author discu...
Blocking asked 6/6, 2021 at 17:11

9

Solved

I've a question, how to return a list without the nth element of a given list? E.g., given list: (1 2 3 2 4 6), and given n = 4, in this case the return list should be (1 2 3 4 6).
Footworn asked 25/2, 2012 at 14:33

2

Solved

I attempting to use ECL to create a .o file with the intention of using its feature of compiling to C however I am receiving an error when trying to build a program as the documentation lists. I a...
Ryter asked 10/3, 2019 at 10:9

16

I understand the difference between LET and LET* (parallel versus sequential binding), and as a theoretical matter it makes perfect sense. But is there any case where you've ever actually needed LE...
Androgynous asked 16/2, 2009 at 23:5

7

In python it's possible to do this EMPTY, PAWN, KNIGHT, BISHOP, ROOK, QUEEN, KING, BPAWN = range(8) How would you do equivalent in lisp?
Doubleacting asked 3/6, 2012 at 13:38

4

Solved

I want to implement a simple double linked list in SBCL with the following key structure (defstruct element (value 0 :type fixnum) (next nil :type element) (prev nil :type element)) The problem...
Ogata asked 6/4, 2021 at 15:5

4

I wanted to tell sbcl that the following function will only be called with fixnum values for which the result fits in a fixnum: (defun layer (x y z n) (+ (* 2 (+ (* x y) (* y z) (* x z))) (* 4 (...
Clove asked 24/7, 2013 at 15:34

3

Solved

I've been trying to learn Common Lisp with SBCL and I've ran into issues executing my code. Everything works fine using sbcl --script exec.lisp (regardless of if I have specified a shebang line) bu...
Peptonize asked 11/3, 2019 at 7:58

2

Does anybody here have a experience with Common Lisp as a embedded language (using ECL)? If so, how good is ECL compared to Lua?
Litigant asked 11/7, 2010 at 15:35

3

Solved

I'm using an external package in Common Lisp for a project; I want to be able to use the package but alias it to a shorter name, similar to how in Clojure I could do (require '[unnecessarily-long-...
Byram asked 6/3, 2015 at 19:52

3

Solved

Prelude In Raku there's a notion called infinite list AKA lazy list which is defined and used like: my @inf = (1,2,3 ... Inf); for @inf { say $_; exit if $_ == 7 } # => OUTPUT 1 2 3 4 5 6 7 I'...
Clarinda asked 21/1, 2021 at 16:26

5

Solved

Peter Norvig's PAIP book contains this code as a solution to the permutation problem (some sections are removed for brevity) (defun permutations (bag) ;; If the input is nil, there is only one ...

3

I want to compile and run a lisp source code to parse peercoin blockchain so that i can get top 100 richest addresses. I am using lisp source code https://github.com/glv2/peercoin-blockchain-parser...
Luau asked 31/7, 2017 at 8:19

4

Solved

A claim that I recall being repeated in the Clojure for Lisp Programmers videos is that a great weakness of the earlier Lisps, particularly Common Lisp, is that too much is married to the lis...
Forsyth asked 18/1, 2021 at 20:24

4

Solved

The quasiquoted list `(1 ,@2 3) is invalid because 2 is not a list. However, `(1 2 ,@3) is valid and will return a dotted list: (1 2 . 3). I observe this result in Common Lisp and Scheme. Why is it...
Pasho asked 19/1, 2021 at 17:55

3

I am trying to get Emacs, SLIME and quicklisp to work together properly. I have the following environment set up: Installed Emacs Installed SLIME in Emacs Installed SBCL Installed quicklisp Run ...
Cas asked 7/10, 2015 at 23:13

1

Solved

I'm attempting to make a Lisp package with uiop/package:define-package. I'm using SBCL, and have confirmed that package-local nicknaming ought to be supported: * *features* (:QUICKLISP :ASDF3.3 :AS...
Ambulate asked 3/12, 2020 at 20:54

© 2022 - 2024 — McMap. All rights reserved.