"A. Bijanki" <bija...@uiuc.edu> writes: > I've heard that LISP is very useful to people researching AI. Why is this? > Where can I find some LISP & AI links on the web?
A very short and simplistic answer to this is that language is very flexible. If you're gonna program a computer to simulate intelligence, then a good start is to have a language where a programmer can describe things not just at a high level, but also in a way that feels native to the domain of the problem at hand. The Lisp programming languages are more easy modified. It just makes sense. It's not a good language for AI, absolutely speaking, but it's far better than anything else out there to my knowledge.
I don't think the AI shines through in any way. I think that people who do AI tend to use something in the Lisp family because of tradition almost as much as the bulk of the wanting-to-be-cutting-edge neophytes choose Java. Not that there's anything wrong with Java in this example, but still, lots of people use it because of hype and heresy, and word-of-mouth (and of course the relative ease of finding a job with that skillset).
Lisp is a bit different. First off, fewer firms use Lisp. Speaking about CL specifically, it's not the most widely-used language. It has not been popular for web dev't either. Furthermore, there are only a few supported commercial implementations. And how many people are coding AI systems these days anyway? Only a small percentage of the programs written today are AI-related.
anyway, CL is what I believe to be a language that's excellent for expressing complex ideas.
> I don't think the AI shines through in any way. I think that people > who do AI tend to use something in the Lisp family because of > tradition almost as much as the bulk of the wanting-to-be-cutting-edge > neophytes choose Java. Not that there's anything wrong with Java in > this example, but still, lots of people use it because of hype and > heresy, and word-of-mouth (and of course the relative ease of finding > a job with that skillset).
Well, to be fair, Java is world's easier than C++, and so is a good evolution considering what it's replacing. You have to realize that easy-to-use embedded container libraries and the like are a new concept to old-school programmers. :) God forbid they see what you can do with map and a lambda function. :)
Java also has this "standardized kitchen sink" notion, where every possible thing under the sun is being thrown into the JDK as a part of the toolkit. This has a good side and a down side, but forget ye not that the good side of it is driving alot of the masses towards Java (and probably will continue to do so for quite a while, especially as Java becomes more prevalent and native compilers become more popular).
> anyway, CL is what I believe to be a language that's excellent for > expressing complex ideas.
The metalinguistic capabilities of the language are just way cool, dude. I'm currently working in an environment which opaquely embeds continuation code behind various macro calls in conjunction with a scheduler which understands the continuation (it's a simulation environment, hence the presence of the scheduler). This environment allows expressions like this:
Which is to say, "get a cab -- either red or yellow -- within 20 simulated time unts, or the show is over, buster". Keep in mind that this very small 6 line code fragment tells the simulation scheduler the maximum amount of simulation time that can go by for 3 different lisp forms and sees that it happens. The same scheduler can be told to prioritize certain ongoing tasks or that certain ongoing tasks conflict with eachother.
> The metalinguistic capabilities of the language are just way > cool, dude. I'm currently working in an environment which > opaquely embeds continuation code behind various macro calls > in conjunction with a scheduler which understands the continuation > (it's a simulation environment, hence the presence of the > scheduler). This environment allows expressions like this:
> Which is to say, "get a cab -- either red or yellow -- within > 20 simulated time unts, or the show is over, buster". Keep in > mind that this very small 6 line code fragment tells the > simulation scheduler the maximum amount of simulation time > that can go by for 3 different lisp forms and sees that it > happens. The same scheduler can be told to prioritize certain > ongoing tasks or that certain ongoing tasks conflict with > eachother.
I don't really see how your macros are so legible or obvious given what you're trying to do.
But Courageous's post does give an example of what part of a program might look like in Lisp. Lisp programs can vary structurally more than programs written in most other languages.
hope this helps.
dave
(p.s. pick up ANSI Common Lisp, by Paul Graham, if you can.)
> > (race > > (call-cab 'yellow-cab) > > (call-cab 'red-top) > > (sequentially > > (sleep 20) > > (fail self))) > I don't really see how your macros are so legible or obvious given > what you're trying to do.
Well, I was neither trying to show legibility nor obviousness. As it turns out, every single form in the above expression involves either dealing with a continuation or dealing with the scheduler. Full tasks are being spun up and are competing with eachother (in the race), but one of the tasks (in the sequentially) is causing the overall body of the (not shown) function to fail if 20 simulated seconds go by, possibly giving up on the race form. Note the term "20 simulated seconds". Schedulng the passage of fictional time versus real time is a fairly non-trivial task.
Equivalent lisp would be a real headache. What I was showing was the ability to generate another language within Lisp. Which is what the SCORE (simulation core) language is, as shown in the example above.
I'm sure there are a vast sea of other examples, written by other individuals who've customized a language to fit their domain space. This is very easy to do in Lisp. Few other languages can claim that.
This ability to transmogrify the language into something more suitable to the domain space is probably one of the reasons the AI community continues to use Lisp.
SCORE itself is a specialized language/environment for doing human performance modelling. It's pretty good at it.
"David McClain" <dmccl...@azstarnet.com> writes: > Courageous <jkras...@san.rr.com> wrote in message > news:390E4BA4.2AEA53C6@san.rr.com... > > As it turns out, every single form in the above expression involves > > either dealing with a continuation or dealing with the scheduler.
> Since CL does not have first-class continuations just what exactly do you > mean by this?
`Upward' continuations are easily done with CATCH/THROW in CommonLisp. `Downward' continuations are usually used for co-routining, and can be emulated via `stack-groups' or other process-scheduling hacks.
> > Courageous <jkras...@san.rr.com> wrote in message > > news:390E4BA4.2AEA53C6@san.rr.com... > > > As it turns out, every single form in the above expression involves > > > either dealing with a continuation or dealing with the scheduler.
> > Since CL does not have first-class continuations just what exactly do you > > mean by this?
> Well, that's a good question since I didn't write that > section of the code. I was looking through some of the > macro code today, and couldn't find the initial > continuation generators. I've asked the author, however, > and will get back to you.
> C/
Thanks, I am really very interested in this topic!
> Courageous <jkras...@san.rr.com> wrote in message > news:390E4BA4.2AEA53C6@san.rr.com... > > As it turns out, every single form in the above expression involves > > either dealing with a continuation or dealing with the scheduler.
> Since CL does not have first-class continuations just what exactly do you > mean by this?
Well, that's a good question since I didn't write that section of the code. I was looking through some of the macro code today, and couldn't find the initial continuation generators. I've asked the author, however, and will get back to you.
> > > Since CL does not have first-class continuations just what exactly do > > > you mean by this? > > Well, that's a good question since I didn't write that > > section of the code. I was looking through some of the > > macro code today, and couldn't find the initial > > continuation generators. I've asked the author, however, > > and will get back to you. > Thanks, I am really very interested in this topic!
BTW, typing (apropos 'continuation) in my ACL interpreter shows the presence of the construct and variations in several packages, but not, of course, in common lisp. Looking through the code, I could find no obvious package prefixes on any of our continuation stuff. I was told once that it was part of Scheme (by someone who quite well could have been confused), and this, of course, confused me even more, as we are compiling with ACL. Is the SCM package in ACL a Scheme support package? (I noted some continuation stuff in an SCM package, but my ACL docs don't explain the package).
Anyway, I'm sure the author will get back with me in a day or two. I'm very interested in this two.
BTW, there is a stack-free version of Python available (http://www.stackless.com) which offers continuations, coroutines, microthreads, etc. I'm still experimenting with it.
Courageous <jkras...@san.rr.com> wrote: >BTW, typing (apropos 'continuation) in my ACL interpreter >shows the presence of the construct and variations in >several packages, but not, of course, in common lisp. >Looking through the code, I could find no obvious package >prefixes on any of our continuation stuff. I was told >once that it was part of Scheme (by someone who quite >well could have been confused), and this, of course, >confused me even more, as we are compiling with ACL. >Is the SCM package in ACL a Scheme support package? >(I noted some continuation stuff in an SCM package, >but my ACL docs don't explain the package).
Sometimes things that are referred to as "continuations" are not true first-class continuations, they're just functional arguments.
-- Barry Margolin, bar...@genuity.net Genuity, Burlington, MA *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups. Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
> In article <390F8F7C.123F4...@san.rr.com>, > Courageous <jkras...@san.rr.com> wrote: > >BTW, typing (apropos 'continuation) in my ACL interpreter > >shows the presence of the construct and variations in > >several packages, but not, of course, in common lisp. > >Looking through the code, I could find no obvious package > >prefixes on any of our continuation stuff. I was told > >once that it was part of Scheme (by someone who quite > >well could have been confused), and this, of course, > >confused me even more, as we are compiling with ACL. > >Is the SCM package in ACL a Scheme support package? > >(I noted some continuation stuff in an SCM package, > >but my ACL docs don't explain the package).
> Sometimes things that are referred to as "continuations" are not true > first-class continuations, they're just functional arguments.
I was pondering how that might be in our current setting. The thing is, when we type (sleep 30) -- which is not the lisp sleep -- it kicks it back to the simulation shcheduler such that the next line of lisp code isn't executed until 30 units of model time have passed. While I can imagine something other than a first class continuation accounting for this, lord would it be hairy.
Courageous <jkras...@san.rr.com> wrote: >Barry Margolin wrote: >> Sometimes things that are referred to as "continuations" are not true >> first-class continuations, they're just functional arguments.
>I was pondering how that might be in our current setting. >The thing is, when we type (sleep 30) -- which is not the >lisp sleep -- it kicks it back to the simulation shcheduler >such that the next line of lisp code isn't executed until >30 units of model time have passed. While I can imagine >something other than a first class continuation accounting >for this, lord would it be hairy.
Threads?
But I'm not sure how this is relevant to the question. I was responding to someone who said they did (apropos 'continuation) and saw some matches. All this means is that someone used the word "continuation" in the name of a function or variable. Just because they use the word in a name, doesn't mean they're actually implementing that concept.
In particular, many of Genera's macros are implemented like:
For whatever reason, they conventionally referred to the functional arguments to these helper functions as continuations. But they're not what we typically mean by continuations in computer science.
-- Barry Margolin, bar...@genuity.net Genuity, Burlington, MA *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups. Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
> >I was pondering how that might be in our current setting. > >The thing is, when we type (sleep 30) -- which is not the > >lisp sleep -- it kicks it back to the simulation shcheduler > >such that the next line of lisp code isn't executed until > >30 units of model time have passed. While I can imagine > >something other than a first class continuation accounting > >for this, lord would it be hairy.
> Threads?
Possibly, albeit insufferably expensive if so. This requires that the the thread go completely to sleep until a wakeback occurs, right? Ergo, a simulation with 1000 entities would require 1000 threads. Ouch.
Unless CL threads are microthreadish?
> But I'm not sure how this is relevant to the question. I was responding to > someone who said they did (apropos 'continuation) and saw some matches. > All this means is that someone used the word "continuation" in the name of > a function or variable.
Oh, right. Yeah, I knew that. You can't really tell anything from the apropos, this was just part of my hunt to determine where the devil the stuff is coming from. The macro code in the SCORE language definition is pretty hard to read, as I'm pretty new at lisp.
* Courageous <jkras...@san.rr.com> | Is the SCM package in ACL a Scheme support package? | (I noted some continuation stuff in an SCM package, | but my ACL docs don't explain the package).
SCM seems to stand for Source Code Management. There is no continuation stuff in it, and it has nothing to do with Scheme. It is explained in the manual in source_file_recording.htm.
* Courageous <jkras...@san.rr.com> | Possibly, albeit insufferably expensive if so. This requires that | the the thread go completely to sleep until a wakeback occurs, | right? Ergo, a simulation with 1000 entities would require 1000 | threads. Ouch.
Why all this groundless _angst_ before you even know what they are? Why make all these random guesses and scare yourself with with?
| Unless CL threads are microthreadish?
Read the manual, see how they work, talk to the vendor, heed their advice, use something else if it doesn't work to your satisfaction.
The scheduler in Allegro CL doesn't seem to have any problems with 1000 threads. 1000 threads that are created only to run (sleep 10) and terminate, allocate about 5M of memory and spend less than 1 s CPU on my system. That doesn't seem to be worth any angst.
Courageous <jkras...@san.rr.com> writes: > > >I was pondering how that might be in our current setting. > > >The thing is, when we type (sleep 30) -- which is not the > > >lisp sleep -- it kicks it back to the simulation shcheduler > > >such that the next line of lisp code isn't executed until > > >30 units of model time have passed. While I can imagine > > >something other than a first class continuation accounting > > >for this, lord would it be hairy.
> > Threads?
> Possibly, albeit insufferably expensive if so. This requires > that the the thread go completely to sleep until a wakeback > occurs, right? Ergo, a simulation with 1000 entities would > require 1000 threads. Ouch.
> Unless CL threads are microthreadish?
Most CL implementations do their Lisp-side threading in user-land, thereby gaining the advantage of very light-weight threads, and a fairly cheap way of maintaining the usual CL semantics w.r.t. to dynamic binding, etc.
Some implementations also allow foreign code to run in multiple kernel-land threads, and some implementations are currently experimenting with (or already supporting) kernel-land lisp threads. While kernel-land threads allow a single process to take advantage of multiple processors on SMP machines, this comes at a price, and so I'd expect that even if future implementations will support kernel-land threading, they'll continue to support user-land and possibly multiplexed user-land threading.
Regs, Pierre.
-- Pierre Mai <p...@acm.org> PGP and GPG keys at your nearest Keyserver "One smaller motivation which, in part, stems from altruism is Microsoft- bashing." [Microsoft memo, see http://www.opensource.org/halloween1.html]
> | Is the SCM package in ACL a Scheme support package? > | (I noted some continuation stuff in an SCM package, > | but my ACL docs don't explain the package).
> SCM seems to stand for Source Code Management. There is no > continuation stuff in it, and it has nothing to do with Scheme. > It is explained in the manual in source_file_recording.htm.
You know, we own licenses for ACL, but not much documentation seems to exist. How criticical are the ACL manuals themselves, and how extensive are they? (yes, I have all the .html, is that the whole shebang?)
* Courageous <jkras...@san.rr.com> | You know, we own licenses for ACL, but not much documentation seems | to exist. How criticical are the ACL manuals themselves, and how | extensive are they? (yes, I have all the .html, is that the whole | shebang?)
Well, the manuals are quite extensive once you sit down with them. However, I'm not too thrilled about the HTML delivery because of the unsolved navigation problem in the WWW incarnation of hypertext (it had been solved prior to the WWW, of course; HTML is the MS-DOS of hypertext). I have asked (begged) for PDF files so I can at least have something that reads better than the HTML delivery and which also prints better than the HTML files come out like from the sucky browsers. Franz Inc have indicated they will accomodate some of my wishes for the ACL 6.0 release. Until then, the ACL 4.3 manuals are still in use, simply because they are printed and bound.
Erik Naggum wrote: > Well, the manuals are quite extensive once you sit down with them. > However, I'm not too thrilled about the HTML delivery because of the > unsolved navigation problem in the WWW incarnation of hypertext (it > had been solved prior to the WWW, of course; HTML is the MS-DOS of > hypertext).
I'm curious: what do you see as the navigation problem to which HTML missed the solution?
-- "To summarize the summary of the summary: people are a problem." Russell Wallace mailto:rwall...@esatclear.ie
* Russell Wallace <rwall...@esatclear.ie> | I'm curious: what do you see as the navigation problem to which HTML | missed the solution?
The ability of one document to introduce a link between two other documents, sometimes known as a "meta-link". Where implemented, they are easily used to track how you arrived at a given document, and thus you can browse your "journey" through a number of documents. This particular "application" can be implemented by many other means, but the general facility that would make it simple and easy is missing from HTML.
I think of HTML links as GOTO. The effort required to keep from getting messy outweights the merits of their proper use.
(The even-more-impenetrable-than-the-SGML-standard SGML-related standard on Hypertext and Time¹, actually got this completely right, incorporating all available hypertext research at the time it was published, and subsequently updated intelligently to account for further development. Unfortunately, it uses SGML for its own meta-notation, which makes it an order of magnitude more complex than necessary, and it relies so heavily on the entity structure, which is the least understood aspect of SGML and also completely missed by "the HTML generation", that it takes more effort to study it than even most would-be experts can ever hope to be rewarded for having done.)
#:Erik ------- ¹ ISO/IEC 10744:1997 Information technology -- Hypermedia/Time-based Structuring Language (HyTime), 468 pages.
In article <3166452687168...@naggum.no>, Erik Naggum <e...@naggum.no> wrote: > * Russell Wallace <rwall...@esatclear.ie> > | I'm curious: what do you see as the navigation problem to which HTML > | missed the solution?
> The ability of one document to introduce a link between two other > documents, sometimes known as a "meta-link". Where implemented, > they are easily used to track how you arrived at a given document, > and thus you can browse your "journey" through a number of > documents. This particular "application" can be implemented by many > other means, but the general facility that would make it simple and > easy is missing from HTML.
Can you give an example? I presume that a browser history is an example of "this particular application" being "implemented by ... other means" but I don't see how having bidirectional links in HTML would add any functionality.
I actually posted rant as a bug to sourceforge on this. I prefer info, docbook, pdf, and even ps over html.
TB> Actually I TB> would *really like* paper manuals as printing and binding is a TB> pain even with a souped up double-sided printer which we don't TB> currently have.
Double-sided printing and spiral binding facility can be acquired for about $700-800 if you shop around (this is what it cost me for all new equipment thru auctions and such). This is not much since you're likely to spend around $500 anyway on a decent 10+ ppm laser printer with postscript.
This will only help you if the vendor provides something that produces reasonable hard copy. I detest printing html.
* g...@jpl.nasa.gov (Erann Gat) | I presume that a browser history is an example of "this particular | application" being "implemented by ... other means" but I don't see | how having bidirectional links in HTML would add any functionality.
The idea is not a "bidirectional links", but the bibliographic reference, which was a quite well developed concept prior to HTML.
I wrote: "The ability of one document to introduce a link between
two other documents'. This is not a bidrectional link in the first place. It's a third-party link if you want. There is no anchor marked up as such in either of the documents involved, and the link is certainly not in the documents in question. Instead, the anchors are described in the third document through various means of naming nested objects and the link between them is then established, with a purpose, such as a comment describing how the two anchor points related.
HTML missed the opportunity (to put it mildly) to aid in locating and naming the structured, nested objects in a document, as well, so it's no wonder people can't really escape thinking about links and anchors _in_ the documents without spending some effort thinking about why it doesn't even make sense to predefine which words or ranges of text should be elevated to anchorhood. After all, most of prefer to buy the marker pens separately from the books and color on our own, but with HTML, only pre-colored books are available.
* Erann Gat wrote: > Can you give an example? I presume that a browser history is an example > of "this particular application" being "implemented by ... other means" > but I don't see how having bidirectional links in HTML would add any > functionality.
Well, it certainly wouldn't be hard to add more functionality than any browser I've ever used! (which I admit is basically just various incarnations of netscape and ie (as well I guess as mosaic and chimera in the old days)) I find the forward and back buttons terminally deficient, and the history facilities pretty much so (IE's seems better than netscapes). Where is the obvious graphical representation of your browsing history?
(Actually, does anyone know how hard it would be to get netscape to tell some external program every time it visited a url?)