37 points · by floater · 16y ago · 58 comments
The main difference between Lisp and most other languages out there is that Lisp has been designed for computing with symbolic data.
(+ a b) is a Lisp expression
'(+ a b) is Lisp data
This enables the easy manipulation and computation with symbolic expressions that stand for Lisp programs, algebra terms, theorems, logic expressions, rules, frames, music compositions, ... and many more.Some languages have similar capabilities that can be used easily (Prolog, Mathematica, ...). Some have it in difficult variants, where one has to deal with complex representations. Others simply represent programs as strings and not more.
Perhaps by 2059, we'll have languages with macros and regular syntax.
Boo has macros ... http://boo.codehaus.org/Language+Guide (at the end, under 'advanced features'.
The implicit other stuff is "everything else."
Yesterday we saw an awesome game.
The sound of the new stereo is awesome.
The view from that skyscraper is awesome.
If I compare something I'd say: Yesterday I saw the most awesome game.
etc.A DSL family based on a flexible core (with a lispish intermediate language even) might be a viable approach.
In many situations, simplicity and restrictions (constraints) in DSLs is better than flexibility and expressiveness in a general purpose language, because it can offer new possibilities for domain specific optimizations due to domain specific constraints.
Just like new notations in math led to breakthroughs in many math branches, new syntax can bring new life to software in many specific domains.
The key to such systems seems to be making DSLs easy to build and optimize using a suite of common building blocks (human (cs people) friendly intermediate languages (like lisp as opposed to VM byte codes) and libraries.)
Examples for "high-level" languages on top of Lisp:
Macsyma, Axiom, Refine, AP5, RacerPro, CycL, NESL, Reduce, PVS, the original ML, ...
For a Lisp-like example see PDDL (Planning Domain Definition Language):
(define (domain hanoi-domain)
(:requirements :equality)
(:predicates (disk ?x) (smaller ?x ?y) (on ?x ?y) (clear ?x))
(:action move-disk
:parameters (?disk ?below-disk ?new-below-disk)
:precondition (and (disk ?disk)
(smaller ?disk ?new-below-disk)
(not (= ?new-below-disk ?below-disk))
(not (= ?new-below-disk ?disk))
(not (= ?below-disk ?disk))
(on ?disk ?below-disk)
(clear ?disk)
(clear ?new-below-disk))
:effect (and (clear ?below-disk)
(on ?disk ?new-below-disk)
(not (on ?disk ?below-disk))
(not (clear ?new-below-disk)))))
Tools like these are widely used in logistics domains, one of the domains where Lisp has been widely used. There is a competition between planning systems and PDDL is being used to describe the problems.For a non-s-expression domain specific language on top of Lisp see for example PWGL. It uses a graphical language. Also Macsyma/Maxima, and many many many others.
From the outside, my interpretation of that is "I don't value my own opinion enough to make it accessible to users of other extremely common browsers."
I assume you blog because you feel like you have something to say that's worth reading. Making that content inaccessible to a very large segment of the browsers/users in the world works contrary to that. (I do sympathize with the PITA factor.)
I've got a few places where I simply block IE with stylesheets myself.
<!--[if IE]>
<link rel="stylesheet" href="http://atomized.org/wp-content/themes/atomized2/ie.css type="text/css" media="screen">
<![endif]-->
I find it pretty hilarious, myself. The site is quite nice in firefox, but I would have immediately turned away if I were using ie. He must be making some assumptions about his readers.switch (var) {
case "foo":
printf("foo block.");
break;
case "bar":
printf("bar block.");
break;
default:
printf("Default case")
}$ cat foo.c
#include <stdio.h>
main() {
const char *foo = "bar";
switch (foo) {
case "foo":
printf("foo\n");
}
}
$ gcc -pedantic -std=c99 foo.c -o foo foo.c: In function ‘main’:
foo.c:4: error: switch quantity not an integer
foo.c:5: error: case label does not reduce to an integer constantI'm aware that you can't do this.
I guess my sarcasm didn't translate:)
XML is full of prefix, nested syntax.
[1]: http://www.lispworks.com/documentation/HyperSpec/Body/m_case...
This article is a pretty nice down to earth point by point explanation why list is so cool. My question is: is that it ? lambdas, data is code, dynamic programing.. I mean those features are cool, but could someone post some more clear examples of why lisp is awesome?
The claim is that Lisp is a language at a higher level of abstraction. You will have to study hard to be able to appreciate that level, but it cannot be explained in another way.
Imagine explaining Calculus to a high school Physics student. You're likely to get back: "But I can find the acceleration of an object by using normal algebra and subtracting its position at two different times!" Calculus is hard, its benefits are not clearly better than approximation or high school algebra until you reach a level at which you brain thinks of Calculus as fundamental and sees the old equations as merely derived, less-powerful versions.
Why would you expect a mind-expanding language to be any easier to explain?
http://www.defmacro.org/ramblings/lisp.html
"""What would you rather do? Learn 16 different languages and frameworks in order to do "simple" log-file and configuration-file processing? Or just buckle down, learn Lisp, and have all of these problems go away forever?"""