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.
-1
votes
0answers
50 views
- Clojure - I get an error when I run this fibonacci function, any idea what's wrong? [migrated]
I picked up clojure a few hours ago and am trying to get a Fibonacci function working
Here is the function I'm defining
(defn fib [x]
(if (or (= x 1) (= x 2))
((inc 0))
((+ (fib (- x 1)) ...
2
votes
3answers
391 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 ...
1
vote
4answers
341 views
Why languages that compile to C/C++ generate unreadable, cryptic code?
I'm willing to compile certain language to C or C++ for some speedups. My idea was, though, to generate readable code and use structures such std::vector and similar wherever I can, expecting CLANG to ...
8
votes
4answers
318 views
Python decorators and Lisp macros
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 ...
6
votes
1answer
190 views
The Lisp in Gnu
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 ...
4
votes
3answers
224 views
Obscurity of Lisp in collaborative projects [closed]
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 ...
1
vote
1answer
176 views
Is it possible to buy a LispMachine-style processor as a development board? [closed]
Reading this http://www.loper-os.org/?p=46 makes me wonder. Surely there are some enthusiasts somewhere, plotting a Kickstarter project or similar to get a native Lisp-in-hardware processor made?
6
votes
5answers
469 views
XSLT and possible alternatives [closed]
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 ...
10
votes
3answers
1k views
What are the advantages of using LISP and Haskell? Will they make me a better programmer? [closed]
I know Lisp and Haskell are functional and logic programming languages respectively, but what exactly does this mean? How do they differ from other languages? I've heard that learning these will make ...
26
votes
6answers
2k 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 in a whole.
I've been told how amazing Lisp is and know that many languages have been inspired by Lisp. But, I wonder if Lisp still has any ...
2
votes
3answers
329 views
Does macros support make Scala a Lisp dialect?
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 ...
9
votes
3answers
708 views
Is it possible to compile a higher level language to readable C++? [closed]
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 ...
2
votes
3answers
154 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 ...
4
votes
2answers
330 views
Is it technically possible to write a JS interpreter using Lisp macro readers, in the browser?
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. ...
3
votes
1answer
217 views
s expression representation for c
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 ...
6
votes
4answers
556 views
What makes Common Lisp “big”?
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 ...
2
votes
1answer
201 views
Which algorithms typify Lisp's power? [closed]
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 ...
0
votes
1answer
170 views
Lisp or a Lisp dialect for a newbie programmer? [closed]
After python, people recommend beginners should learn a functional language like Lisp. I didn't learn Python as my first language. Instead, I did Java like most CS students (currently in 2nd year of ...
7
votes
2answers
690 views
Could we build a functional computer?
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 ...
2
votes
3answers
364 views
Is there a way to use a higher level language in a competition that only has C, C++ and Java by default? [closed]
On that competition, you gain access to a system with gcc, vim, emacs and Java. You can't take any file with you and there's no internet access, but you can do whatever you want inside that system. ...
6
votes
2answers
501 views
Are square brackets and curly braces in Clojure still S-expressions?
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 ...
3
votes
1answer
336 views
Online courses focussed on learning LISP for beginners? [closed]
I'm looking for an online course that I can use to learn programming using Lisp (especially Scheme), from scratch. I didn't find anything similar on Coursera/Udacity - the only resource I found was on ...
2
votes
2answers
317 views
Ring of numbers where adjacent entries sum up to a prime
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 ...
10
votes
4answers
1k views
In what programming language did “let” first appear?
I was wondering about the origins of the "let" used in Lisp, Clojure, and Haskell. Does anyone know which language it appeared in first?
2
votes
4answers
801 views
What are the practical benefits of LISP like syntax which Clojure uses over Java like syntax of Scala?
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 ...
8
votes
3answers
478 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 ...
11
votes
3answers
475 views
Byte code weaving vs Lisp macros
I have been reading about the libraries people have written for languages like Java and C# that make use of byte code weaving to do things like intercept function calls, insert logging code, etc. I ...
4
votes
1answer
526 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 ...
20
votes
2answers
2k views
Which Common Lisp implementation to use?
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 ...
0
votes
1answer
331 views
How to translate Lisp to Javascript [closed]
I have some legacy code, which uses Lisp as it's scripting language. To broaden, ease and accelerate scripting I'd like to replace Lisp by Javascript.
In order to be able to built on all present ...
4
votes
3answers
280 views
Is Reading the Spec Enough? [closed]
This question is centered around Scheme but really could be applied to any LISP or programming language in general.
Background
So I recently picked up Scheme again having toyed with it once or twice ...
12
votes
5answers
3k views
What is a recent programming language of choice for the AI?
For a few decades the programming language of choice for AI was either Prolog or LISP, and a few more others that are not so well known. Most of them were designed before the 70's.
Changes happens a ...
2
votes
2answers
414 views
Is eval the defmacro of javascript?
In Common Lisp, defmacro basically allows us to build our own DSL.
I read this page today and it explains something cleverly done:
But I wasn't about to write out all these boring predicates ...
17
votes
19answers
3k views
Programming languages with a Lisp-like syntax extension mechanism [closed]
I have only a limited knowledge of Lisp (trying to learn a bit in my free time) but as far as I understand Lisp macros allow to introduce new language constructs and syntax by describing them in Lisp ...
1
vote
5answers
1k views
Compiler design in LISP
With some googling, I could easily find some documents in compiler design in C/Java/C# and even in Haskell, but not in LISP except implementing SCHEME/LISP in LISP.
Is LISP not so popular in ...
3
votes
2answers
658 views
How stable is Common LISP as a language?
I have been reading a bit about Common Lisp and I am considering trying to learn it (I only know very basic concepts) or even using it for some project.
Question: how stable is Common Lisp as a ...
3
votes
3answers
440 views
Does this happen in Common Lisp?
From Steve Yegge's "Lisp is Not an Acceptable Lisp":
Lisp has a little syntax, and it shows up occasionally as, for instance, '(foo)
being expanded as (quote foo), usually when you least expect it.
...
2
votes
3answers
209 views
When are multimethods useful in practice?
The Common Lisp Object System (CLOS) supports multiple dispatch (multimethods). When is this a useful feature in practice? I'm not just looking for an example of hypothetical functionality that ...
6
votes
1answer
224 views
Lisp Macros: A practical approach
On my way to learn Lisp I have discovered the all powerful and feared so called Macros, then after spending a hard time trying to understand them and their usefulness I said to myself, I FINALLY GOT ...
17
votes
2answers
576 views
What are the typical applications of Lisp macros?
I am trying to learn some LISP and I have read a lot about the importance of LISP macros so I would like to get some working experience with them.
Can you suggest a practical application area that ...
5
votes
2answers
196 views
Can the Clojure set and maps syntax be added to other Lisp dialects?
In addition to create list using parentheses, Clojure allows to create vectors using [ ], maps using { } and sets using #{ }.
Lisp is always said to be a very extensible language in which you can ...
1
vote
2answers
584 views
According to Paul Graham in 2002, languages can be ranked in power order and Lisp is the first on that ranking. Is this still accurate? [closed]
His arguments are based on the premise a programmer can see when a language is less powerful than that he is using because the lack of an essential key feature, and that Lisp's macros is a key feature ...
2
votes
2answers
292 views
Why does Scheme r5rs have no module system
With all the controversy surrounding scheme r6rs, I stuck with r5rs and I am wondering why the designers decided to not implement a module system. How does one organize code in this?
2
votes
3answers
205 views
Implementing `let` without using a macro
I'm learning Lisp, and I've just gotten to let, which I don't quite understand (the implementation of).
A common definition for it is given in terms of lambda as a macro. However, nowhere have I ...
2
votes
2answers
398 views
What are examples of Lisp's accomplishments? [closed]
I've more than once heard that sometimes a few individuals come up with great accomplishments from using Lisp. What are those refering to? What are concrete examples of people using Lisp to create ...
3
votes
2answers
402 views
What is a dotted pair's analogy in other Lisp implementations?
What is Scheme's dotted pair construct analogous to in other Lisp implementations? I can make a vector or list quite easily, and understand those in Clojure, even though the syntax is a little ...
-2
votes
2answers
456 views
Where are functional languages used? [duplicate]
Possible Duplicate:
Functional Programming in Commercial Software
Which problems domains are more suited to functional programming solutions
I just wonder where do functional programming ...
5
votes
6answers
340 views
Do non-pure interpreters still make the guarantees of functional programming?
I am assuming the implementations/compilers/generated C code (referred to hereinafter as generic, 'interpreter') for most functional programming languages are written in non-pure functional languages. ...
4
votes
5answers
496 views
Why is the empty list used as the list terminator in Lisp?
It seems to me that the list terminator in Lisp could be any arbitrary value. For example, the string terminator in C is the null pointer. Is there a philosophical reason why the empty list was chosen ...
8
votes
5answers
1k views
Data structures in functional programming
I'm currently playing with LISP (particularly Scheme and Clojure) and I'm wondering how typical data structures are dealt with in functional programming languages.
For example, let's say I would like ...