Skip to main content

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.

0votes
0answers
54views

Lisp Macro that can take Forth like order

I am studdying Lisp after many years of C like languages (C, C++, C#, Java, Javascript, Go, Haxe). I've written already some usefull programs with Lisp, and I feel already productive enough with it, I'...
Sam Washington's user avatar
1vote
2answers
298views

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
2votes
3answers
759views

Why are Lisp programs a sequence of S-expressions and not a single list?

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
4votes
1answer
517views

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

Why are functions in Emacs so large? [closed]

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
4votes
1answer
323views

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,672
11votes
7answers
3kviews

How can a compiler be written for a language that allows rewriting code at runtime (such as Lisp macros)?

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,887
4votes
3answers
620views

Can Lisp keywords be protected?

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

Are there any JSON based notations for Access Control Lists? (Alternative to S-Expression)

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
8votes
2answers
2kviews

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

Computer Architectures NOT based on arrays [closed]

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

Scheme : Lambda inside quoted list is unbound

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
3votes
2answers
527views

What is the equivalent of The Little Lisper project in Haskell?

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,859
12votes
1answer
2kviews

What practical problem results from lack of hygienic macros in Clojure?

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
3votes
1answer
641views

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

153050per page
close