Questions tagged [common-lisp]

Common Lisp, or ANSI Common Lisp, is a standardized version of the Lisp programming language intended for production-strength power and libraries.

Filter by
Sorted by
Tagged with
0 votes
1 answer
123 views

Scheme's define in Common Lisp

In Common Lisp, we have to use the let form to declare a new lexically-scoped variable. This means that the code either looks like that written in C89 (all variables declared on top of scope), or ...
ndsrib's user avatar
  • 9
2 votes
0 answers
485 views

Using ftype to Declare Functions in Common Lisp

The Common Lisp Cookbook discusses how to use ftype to declare the inputs and outputs of functions. In compilers with a lot of type inferencing like SBCL, this would seem to offer a lot of support ...
davypough's user avatar
  • 137
2 votes
2 answers
621 views

Are multiple dynamic dispatch methods possible?

C++ only supports single dynamic dispatch methods. Indeed, the following program: #include <iostream> struct Shape { virtual void overlap(Shape* y) { std::cout << "Shape, Shape\n&...
Géry Ogam's user avatar
0 votes
1 answer
265 views

Simple tic-tac-toe GUI in Common Lisp: Avoid using Continuation Passing Style?

I've made a simple Tic-Tac-Toe game in Common Lisp using the Ltk library. One of the things I wanted to do was to support CPU vs CPU, human vs human, human vs CPU, and CPU vs human. Also, possibly ...
wlad's user avatar
  • 101
4 votes
1 answer
456 views

Best Practice - Where to declare variables in Common Lisp?

Generally in procedural/imperative languages, it's best practice to place variable declarations as close to usage as possible. This seems a little hazy in lisp, considering more code is used if there ...
Joel Lord's user avatar
3 votes
2 answers
190 views

Should I introduce a data format with limited expressivity or use the full expressiveness of lisp?

I'm developing a computer game. It is a single person hobby project. I will implement it in common-lisp. As proof of concept I'm trying to procedurally generate a scene by randomly selecting ...
Kasper van den Berg's user avatar
4 votes
1 answer
291 views

Use `labels` or nested `flet`?

I have a hierarchy of functions, many functions are called by a single function. There are three options: Use defun: i.e. all functions are global even the ones that are only intended for internal ...
Kasper van den Berg's user avatar
4 votes
1 answer
281 views

Lisp: circular structure printing through user-defined print methods: what are the requirements?

In a Lisp dialect, I've implemented ANSI-CL-like support for printing objects such that their circular and shared structure is encoded. This is enabled by the special variable *print-circle*. ...
Kaz's user avatar
  • 3,612
8 votes
2 answers
2k views

In which order should lisp functions be defined?

In which order should code in a single lisp file be organised? Is there any common style guideline that allows other lisp programmers to easily understand code? Googling for lisp style guideline ...
Kasper van den Berg's user avatar
3 votes
1 answer
587 views

What Lisp data structure to use?

I am studying different language games and trying to implement them in Common Lisp. Currently, I am studying a game which studies the relation between forms and meanings. An agent needs to store the ...
JNevens's user avatar
  • 133
4 votes
0 answers
538 views

Test-first iterative development in Common Lisp environment

Given: I want to practice proper test-first, continuous delivery-style software development in Common Lisp environment. Problem: How each red-green-refactor iteration of the process should look like?...
hijarian's user avatar
  • 159
22 votes
4 answers
3k views

What about LISP, if anything, makes it easier to implement macro systems?

I'm learning Scheme from the SICP and I'm getting the impression that a big part of what makes Scheme and, even more so, LISP special is the macro system. But, since macros are expanded at compile-...
Elliot Gorokhovsky's user avatar
6 votes
1 answer
2k views

`values` vs `list` for returning multiple values from Lisp form

What's the difference between using (values …) versus (list …) (or literally '(one two three …)) to return multiple values from a lambda (or other implicit progn)? Does it create some special glue to ...
RubyTuesdayDONO's user avatar
0 votes
3 answers
2k views

Reference counting & GC in LISP [closed]

What is the main method for reclaiming the memory in LISP? Does LISP really need garbage collection? Would not reference counts suffice? I just wanted to know whether reference counts are enough or ...
mgokhanbakal's user avatar
4 votes
2 answers
1k views

Is there any practical use for the empty type in Common Lisp?

The Common Lisp spec states that nil is the name of the empty type, but I've never found any situation in Common Lisp where I felt like the empty type was useful/necessary. Is it there just for ...
Pedro Rodrigues's user avatar
13 votes
2 answers
1k views

Are types erased in Haskell?

Haskell has a notion of “generic functions” that has some apparent similarity with common lisp—having neither experience with Haskell nor with common lisp, I might be very approximative here. This ...
user40989's user avatar
  • 2,890
34 votes
2 answers
3k views

Which of these old criticisms of common lisp still apply today?

In A Critique of Common Lisp written by Rodney A. Brooks and Richard P. Gabriel from Stanford in 1984, some design decisions retained by the normalizing committee of Common Lisp are discussed. While ...
user40989's user avatar
  • 2,890
2 votes
3 answers
1k views

How does a chess engine decide what move to make?

I'm writing a simple chess engine in LISP. I actually know how the engine decide the move, it evaluates and reads some opening books. But that's not what i mean. This is my design. 57 58 59 60 61 62 ...
Lynob's user avatar
  • 129
3 votes
2 answers
983 views

SBCL development on Windows, including CFFI

I have been asked to automate the operation of a Windows (WinForms) application, performing some fairly complicated statistical analysis along the way. My first thought was the usual suspects: .NET, ...
Duncan Bayne's user avatar
8 votes
3 answers
1k views

Multiple Dispatch and CLOS

I have never written software in Common Lisp, but in Scheme and Clojure as well as C++ and Python. Yet I have had a look at the Common Lisp Object System (CLOS) in Common Lisp and Dylan. Now when ...
wirrbel's user avatar
  • 3,028
8 votes
4 answers
2k views

What makes Common Lisp "big"? [closed]

I've been learning both Common Lisp and Racket, and one thing that I consistently hear is that Racket is a much "smaller" language than Common Lisp. I was wondering what this really meant. As far as I ...
user avatar
7 votes
3 answers
1k views

What is the difference between a stock-hardware and a micro-coded machine in "A Critique of Common Lisp"?

I was reading this article: A Critique of Common Lisp and finding it hard to make out the precise definition of "stock-hardware machine" and its difference with "micro-coded" machines. I tried to ...
Bleeding Fingers's user avatar
10 votes
2 answers
2k views

Types in Lisp and Scheme

I see now that Racket has types. At first glance it seems to be almost identical to Haskell typing. But is Lisp's CLOS covering some of the space Haskell types cover? Creating a very strict Haskell ...
user2054900's user avatar
3 votes
2 answers
799 views

CLISP Common Lisp license - can it force my code to be released under GPL?

I came across this about CLISP: *"it all-but-forces your code to be released as GPL" here, when looking for a good Common Lisp implementation. How can a language force a license on your code? Is this ...
NeuronQ's user avatar
  • 221
6 votes
1 answer
4k views

Common Lisp Implementations - threading and multiplatform?

I'm learning Common Lisp, mostly as a "mind gym" hobby thing, but I want to end up with a set of skills that would also be usable "in real life", because when you learn a language you also accumulate ...
NeuronQ's user avatar
  • 221
48 votes
2 answers
22k views

Which Common Lisp implementation to use? [closed]

There seems to be an immediate problem with starting to develop in Common Lisp: choosing an implementation. What should one take into account, and how much weight should it bear when considering a CL ...
anonymous's user avatar
  • 597
116 votes
15 answers
147k views

Is LISP still useful in today's world? Which version is most used?

I try to teach myself a new programming language in regular intervals of time. Recently, I've read how Lisp and its dialects are at the complete opposite end of the spectrum from languages like C/C++, ...