Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

Questions tagged [lisp]

Lisp is a (family of) general purpose functional programming language(s), based on the lambda calculus, and with the ability to manipulate source code as a data structure.

Filter by
Sorted by
Tagged with
1 vote
2 answers
356 views

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
  • 19
2 votes
3 answers
836 views

This is quite basic question that started puzzling me recently while studying Lisp (and derivatives). I have read some Lisp books and web sites and this subject is somewhat obscured by other Lisp ...
Lj MT's user avatar
  • 31
4 votes
1 answer
553 views

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
1 vote
1 answer
412 views

I am a beginner in ELisp, but have programmed in C++ and a number of other programming languages before. My rule of thumb (and I think it is a common one) that a function should fit on the screen. ...
AlwaysLearning's user avatar
4 votes
1 answer
339 views

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,702
11 votes
7 answers
4k views

There are some programming languages, like the many dialects of Lisp, that allow for macro-metaprogramming: rewriting and altering sections of code before the code is run. It is relatively trivial to ...
Qqwy's user avatar
  • 4,947
4 votes
3 answers
655 views

Why aren't lisp keywords protected? For example, (define a 3) (define define +) #makes define useless (define a 1) #outputs 4, instead of assigning 1 to a. Is this flexibility so important? Or even ...
Quora Feans's user avatar
-1 votes
1 answer
792 views

I'm looking for a notation that is familiar to modern developers and can supersede s-Notation. (additional insight into Rivest's proposal of s-Expression is here) Is there any Swagger, JSON or other ...
makerofthings7's user avatar
8 votes
2 answers
3k views

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
9 votes
1 answer
346 views

Wadler's original paper on Monads for Functional Programming ( Haskell ) ,he says Another question with a long history is whether it is desirable to base programs on array update. Since so much ...
Asterisk's user avatar
  • 353
1 vote
1 answer
518 views

I'm programming a small lisp/scheme interpreter and I came across the following situation : When a quoted list contains lambdas, they are not parsed as lambdas. Here is a sample code (live on repl....
Julien__'s user avatar
  • 249
3 votes
2 answers
545 views

In the book The Little Lisper, you implement a minimal Scheme in 10 Chapters that is capable of interpreting any chapter in the book. To me it seems you could do the same for a 'minimal subset of a ...
hawkeye's user avatar
  • 4,849
12 votes
1 answer
2k views

I've heard that Clojure macros are easier to write but not as reliable as Racket's hygienic macros. My question has 2 parts: How does gensym differ from hygienic macros? What do Racket macros provide ...
Alex's user avatar
  • 284
3 votes
1 answer
662 views

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
1 vote
1 answer
986 views

I must implement , in Lisp , a depth-search algorithm in an implict graph (namely a graph where I have the starting node, the goal node, and the successor function ,f, that give a node create his ...
Nick's user avatar
  • 11
22 votes
4 answers
4k views

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
3k views

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

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
7 votes
1 answer
2k views

Quick background: I am designing a Pythonic language that I want to be as powerful as Lisp while remaining easy to use. And by "powerful", I mean "flexible and expressive". I've just been introduced ...
Gavin D. Howard's user avatar
1 vote
1 answer
761 views

I'm currently writing a LISP parser that iterates through some AutoLISP code and does its best to make it a little easier to read (changing prefix notation to infix notation, changing setq assignments ...
Archibald's user avatar
  • 133
1 vote
1 answer
544 views

I am engaged in a project that works mainly in AutoCAD to design and manufacture prefabricated building components such as roofing trusses. One of our goals is to redesign a program that was written ...
Archibald's user avatar
  • 133
37 votes
7 answers
17k views

I have seen many CS curriculums and learning suggestions for new programmers that call for the aspiring programmer to study a Lisp interpreter that is specifically written in Lisp. All these sites ...
Ma-at's user avatar
  • 481
5 votes
1 answer
2k views

I've been thinking about trying to get through the SICP again, this time well-armed with a better idea of what the SICP is meant to accomplish, and being older and wiser than my first attempt back in ...
Elf Sternberg's user avatar
26 votes
1 answer
2k views

I am trying to write a branch and bound search on the set of all functions f: D -> R, where the domain size is small (|D| ~ 20) and the range is much bigger (|R| ~ 2^20). Initially, I came up with the ...
Balagopal Komarath's user avatar
7 votes
1 answer
3k views

(define ls1 '((1 . 2) 1 . 2)) (set-car! (car ls1) 6) ls1 (define ls2 (cons '(1 . 2) '(1 . 2))) (set-car! (car ls2) 6) ls2 After set-car!ing, ls1 will be ((6 . 2) 1 . 2) and ls2 ((6 . 2) 6 . 2). It ...
yanpengl's user avatar
  • 731
6 votes
2 answers
731 views

I couldn't find any links or books claiming that Lisp is the first programming language to adopt structured programming (actually, most of them don't even mention Lisp at all), but if conditionals ...
alice's user avatar
  • 187
4 votes
1 answer
2k views

I am starting to learn Lisp, using the SICP book. The authors mention that a procedure (i.e. function) can be recursive or iterative. Additionally, the process those procedures will generate will also ...
Daniel Scocco's user avatar
7 votes
0 answers
1k views

I am about to start a new project and I cannot decide if I should pick OCaml or Lisp for the project. My main concern is about the difference of productivity — if any. I program OCaml since 1998 ...
user40989's user avatar
  • 2,950
3 votes
3 answers
2k views

I am fascinated to Lisp as it is simple yet powerful. I am just a beginner and I know there have been lots of discussions on removing parentheses from Lisp and its dialects. Yet I request Lisp ninja's ...
user115126's user avatar
0 votes
3 answers
3k views

Lisp and Fortran were the trunks of two separate evolutionary trees, one rooted in math and one rooted in machine architecture. I see this in Hackers and Painters: Big Ideas from the Computer Age....
CLS's user avatar
  • 29
2 votes
3 answers
1k views

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
20 votes
5 answers
5k views

When looking Python decorators someone made the statement, that they are as powerful as Lisp macros (particularly Clojure). Looking at the examples given in PEP 318 it looks to me as if they are just ...
Profpatsch's user avatar
6 votes
1 answer
705 views

Since the GNU project is celebrating its anniversary, and the initial announcement for GNU is linked to (http://www.gnu.org/gnu/initial-announcement.en.html) all over the place, I reread it and I ...
wirrbel's user avatar
  • 3,088
4 votes
3 answers
581 views

I'm playing with the idea of learning Scheme but I have a few misgivings. From what I understand Lisp makes heavy use of macros that allow programmers to drastically change the language itself. I ...
user2820561's user avatar
17 votes
5 answers
23k views

I had a look at XSLT for transforming one XML file into another one (HTML, etc.). Now while I see that there are benefits to XSLT (being a standardized and used tool) I am reluctant for a couple of ...
wirrbel's user avatar
  • 3,088
41 votes
3 answers
29k views

I know Lisp and Haskell are logic and functional programming languages respectively, but what exactly does this mean? How do they differ from other languages? I've heard that learning these will make ...
Logan545's user avatar
  • 635
34 votes
6 answers
7k views

Does Lisp still have any special feature which has NOT been adopted by other programming languages? By Lisp, I mean all the Lisp programming languages as a whole. I've been told how amazing Lisp is ...
iceX's user avatar
  • 711
3 votes
3 answers
2k views

I've read recently that macro support in Scala is now official. I checked the documentation page and they are reminiscent to the LISP ones. In one of his essays Paul Graham writes that when "you add ...
Adam Arold's user avatar
  • 1,190
12 votes
3 answers
2k views

C++ is a great language in many ways, but some things in particular are cumbersome to write without an IDE. As a VIM user, it would be very interesting if I had access to a higher level language which ...
MaiaVictor's user avatar
  • 5,860
8 votes
3 answers
2k views

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,088
4 votes
2 answers
1k views

Using macros readers, it's possible to interpret JavaScript, and have it compiled just like normal Common Lisp code. Hence getting the benefits of Lisp implementations, notably their performance. ...
Florian Margaine's user avatar
6 votes
1 answer
2k views

Experimenting with various lisps lately (clojure especially) i have wondered if there are any s expression based representations of (subsets) of c, so you could use lisp/closure to write macros and ...
wirrbel's user avatar
  • 3,088
8 votes
4 answers
3k views

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
2 votes
1 answer
366 views

Similar question here (but not the same) because I am interested in which specific algorithms work particularly well in Lisp. Lisp tutorials always give the example of finding factorials, but wanting ...
Phil Braun's user avatar
13 votes
2 answers
4k views

As mush as FP has done, in the end, all our programs are structured. That is, it doesn't matter how pure or functional we make a them - they are always translated to assembly, so what actually runs ...
MaiaVictor's user avatar
  • 5,860
14 votes
2 answers
5k views

I am trying to learn Lisp and looking at all the Lisps out there and their differences. I see that in some implementations of Scheme, you can use square brackets interchangeably with round brackets ...
mydoghasworms's user avatar
2 votes
2 answers
1k views

Given a number n, find a permutation of the numbers 1...n such that all adjacent entries sum up to primes. If such a permutation does not exist, throw an error. Is there a purely-functional way to do ...
ithisa's user avatar
  • 237
27 votes
5 answers
12k views

I was wondering about the origins of the "let" used in Lisp, Clojure, and Haskell. Does anyone know which language it appeared in first?
carinmeier's user avatar
4 votes
4 answers
3k views

I spent couple of months learning Scala and got overwhelmed by number of different constructs it had, After looking at partial functions, partially-applied functions, pattern matching, actor syntax, I ...
Amogh Talpallikar's user avatar
7 votes
3 answers
1k views

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