News for hackers. Stuff that matters.
Re:Is Lisp a Blub Language? by programnature on Monday April 26, 2010 @05:59AM (#1294502)
What is ' other than a special mode? The fact is that symbols are treated more systematically in Mathematica, and that makes it easier to assemble and dissemble symbolic structures of all sorts.

Sounds like a case of blub. You look at Mathematica and see some weird stuff that is probably equivalent in power to multimethods or whatever, I look at Lisp and think how can I possibly live without civilized pattern matching.

As far as Lisp-based AI goes, its in fact very easy to miss it, but this is probably not the thread to get into Lisp's cultural issues.

Re:Is Lisp a Blub Language? by lispm on Monday April 26, 2010 @06:55AM (#1294562)
Symbols are not treated more systematically in Mathematica.

QUOTE is a special operator in Lisp that causes the evaluator to return its argument unevaluated.

     (quote a) -> a
     (quote (+ 1 2)) -> (+ 1 2)
     (quote "abc") -> "abc"
Mathematica has a different strategy for computation, one that is based on rewrite rules. Expressions are rewritten until they can't no longer be rewritten.

In Lisp evaluation

    (+ a a)
gives an error if the variable A has no value.

In Mathematica it would be reduced to

   (* 2 a)  ; in Lisp syntax
if A has no value.

But that has little to do with the processing capabilities of Lisp. A function like Take can be written very natural in Lisp - there is NO special mode needed. The function takes data and computes results.

You may want to get out of your Mathematica blub and learn some Lisp. Writing the 'Take' function is a good exercise. Stuff like that are basic exercises in Lisp courses.

Re:Is Lisp a Blub Language? by jjs on Monday April 26, 2010 @06:03AM (#1294510)
What is ' other than a special mode?

I usually implement it as a reader macro. :)

Re:Is Lisp a Blub Language? by crististm on Monday April 26, 2010 @07:27AM (#1294600)
it's a shortcut to quote
Re:Is Lisp a Blub Language? by jjs on Monday April 26, 2010 @08:59AM (#1294745)
it's a shortcut to quote

Yep.

My comment was about implementing one's own Lisp reader.

    (define *reader-macros* `(
      (#\' ,(lambda () (list 'quote (read))))))
instead of

    (case dispatch-char
      ((#\') (list 'quote (read)))
      ...)