On Sun, Aug 14, 2011 at 8:50 AM, Paulo Pinto <paulo.jpi...@gmail.com> wrote: > I guess that nowadays many AI systems are mainly programmed in > some kind of specialized DSL. > > Sure Lisp based languages are a perfect candidate for it, but the > plain > mention of Lisp brings up some issues that you cannot get rid of, like > the parenthesis.
And what, exactly, is wrong with parentheses? Put another way: the syntax tree of a program will have some sort of particular structure. To the extent that parentheses DON'T determine the sub-branches, something else WILL. What do other languages use for that "something else"? * Other delimiters, either characters as in C's { ... } blocks, whole words as in "if ... fi" in some shell languages, or other things. * Significant whitespace, most commonly in languages that use newlines to delimit statements (BASIC) but sometimes going much further (Python). * Syntax rules where the positions of various things among various keywords determines the structure. * Precedence rules among math operators. Drop the first one (Clojure also uses other delimiters) and what we're left with is, mostly, icky. Significant whitespace means an editor line-wrapping or, in some cases, even reindenting code might change its semantics. Syntax rules and precedence rules burden the developer with remembering them all, and beyond simple and fairly standardized rules such as "* before +" precedence rules tend to be avoided by defensive use of ... parentheses. The one language family with a small and regular syntax other than Lisp seems to be Smalltalk, and it avoids the parentheses, with devastating results: 1 + 3 * 4 comes out as 16 instead of 13. Yikes! They just use strict left to right evaluation to avoid having complex rules. > To be honest, while I was at the university I always preferred Prolog > to Lisp, due to the close relationship some our professors had with > Edinburgh's university. This seems to be a total non sequitur, like saying you always preferred beef to chicken due to the US/Canada border being wiggly instead of straight east of North Dakota. In other words: How, exactly, are your former university's professors and Edinburgh's university causally related to a personal preference for Prolog? There's no obvious reason why that would be. Does Edinburgh's university have a strong focus on Prolog for some reason, which "rubbed off" via their professors and your university's professors to you? > I think it is better that the students learn AI than a new programming > language > with forces them to think in a different way. Learning multiple > concepts at > the same time is not easy and you might loose students along the way > because of it. > > Who knows, maybe some of those students will eventually find their way > to > Clojure/Lisp. If they go into AI, it's very likely that will expose them to Lisp at some point, yes. I doubt, on the other hand, that Prolog is a very good language to use, odd though that may seem. The problem is that an AI you try to develop in Prolog will probably be strongly influenced by the language choice towards being a theorem-prover type of system with bells on, and natural intelligence Does Not Work That Way. Natural intelligence guesses and intuits and invents whole new concepts to create simplified models that predict its past sense data, and tests them against future sense data. Self-aware intelligence adds a simplified model to predict its own past feelings and behaviors (and has autobiographical memory so these can be "past sense data"), and tests them against future sense data (and, potentially, also against simulations spawned using the world models -- think about that as you go to sleep tonight). Formal logical reasoning, Prolog style, is actually something we had to invent, rather than something we had innately. I doubt we'd be anywhere near as prone to various mistakes and fallacies in reasoning if we were based on Prolog! On the other hand we'd probably not be creative. In simpler language, logic-based AI has been "done to death" and doesn't seem to lead to anything fundamentally new in terms of software capabilities (i.e., closer to what we can do, able to automate more that we currently have to do ourselves). Of course it can be done in principle, since Prolog is Turing-complete, but it may be easier in some other language. Lisp, of course, isn't just "some other language" but a kind of language-mother due to the ease with which it spawns DSLs, so the best shot probably actually still lies with Lisp. The most advanced AI we ever made, able to reason in the most humanlike ways and to invent new concepts, was Eurisko, and that was programmed in Lisp. In fact, Eurisko was so promising, and we haven't even come close to equaling that achievement in the many years since, that I still wonder if the government or aliens (:)) or time travelers (:)) or someone put the kibosh on that line of research out of fear of Skynet (:)) or something. -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the language of a true hacker. Not as clumsy or random as C++; a language for a more civilized age. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en