Questions tagged [gnu-common-lisp]

GNU Common Lisp is the GNU project's Common Lisp compiler. It's compliant with CLtL1 standard.

25 questions
2
votes
1 answer

Create a list out of the output in the loop

We are tasked to print out the values in the pascal triangle in this manner (pascal 2) (1 2 1) (pascal 0) (1) I copied the code for the binomial thereom somewhere in the internet defined as follows: (defun choose(n k) (labels ((prod-enum…
Mestica
  • 1,489
  • 4
  • 23
  • 33
1
vote
2 answers

building a hash table with gensym and macrolet

I'm trying to build a hash table (among other actions) while reading. I don't want the hash table to have global scope (yet), so I'm doing this with a macro and gensym. Inside the macro x, I'm defining a macro s which is similar to setf, but…
Bill Evans at Mariposa
  • 3,590
  • 1
  • 18
  • 22
1
vote
2 answers

Argument not passed to lisp macro as intended

I feel as though I'm in the same ballpark as Basic Lisp Macro error but when I imagine how the code should look when expanded I don't see a problem and macroexpand isn't helping because it just doesn't want to output anything I can print;…
1
vote
1 answer

Get the right subsequence for the recursive call parsing a JSON string

I started writing the code below for a homework from university which consist on parsing a json-string in Common Lisp. The main issue that I'm facing right now is to get the right substring\subsequence to continue with the recursive call and parse…
Maxuel
  • 127
  • 10
1
vote
1 answer

Lisp: expand property name in macro

Consider this property list: (defvar *some-variable* (list :foo "fooval" :bar "barval")) This simple call: (getf *some-variable* :foo) yields "fooval" as expected. I define a macro which is supposed to do the same except that I can pass the name…
matt-pielat
  • 1,659
  • 3
  • 20
  • 33
1
vote
1 answer

Solving "n-rooks" with tail recursion

Im trying to solve the n rooks problem with tail recursion since it is faster than standard recursion, but am having trouble figuring our how to make it all work. I've looked up the theory behind this problem and found that the solution is given by…
1
vote
1 answer

Force garbage collection in GCL

I made a program in Maxima(translates it to lisp as it runs on top of lisp) that progressively solves equations. I wanted to show that in case it is not possible that all equations can be loaded in RAM and solved simultaneously, then few of them can…
Pankaj Sejwal
  • 1,605
  • 1
  • 18
  • 27
1
vote
1 answer

Is there a way to use quicklisp with GCL?

Installation/(load "/home/inaimathi/quicklisp/setup.lisp") both fail. This still-open task from 2011 tells me it's probably not getting fixed. Is there a workaround?
Inaimathi
  • 13,853
  • 9
  • 49
  • 93
0
votes
1 answer

Why does GCL immediately die when I try to start it?

Why does GCL (GNU Common Lisp) immediately die when I try to start it? user@host:~$ gcl Killed user@host:~$ How do I fix it?
interestedparty333
  • 2,386
  • 1
  • 21
  • 35
0
votes
1 answer

decimal floating point package

I understand the complexities when using binary (or binaryoid) floating point and representing the result in decimal: 1 (do ((numerator 1 (* 10 numerator))) 2 ((>= numerator 1000000000000)) 3 (let ((fred (list 'coerce (/ numerator 3) (quote…
Bill Evans at Mariposa
  • 3,590
  • 1
  • 18
  • 22
1
2