First of all, it shouldn't matter what my gender is. It is no secret, if you browse my nodes long enough you can find a fuller name than just tilly
, and then it should be dead obvious what my gender is. But if you wanted to know, I would strongly prefer that you asked me directly rather than posting the question to the winds.
As for the actual question, well there are a lot of things called "AI". For some of them Perl is a good fit. For others it is not. When Perl is a fit, it is a fit for the same reason that it is good for other things. You can do complex stuff easily, you have a lot of high-level constructs, you have useful stuff on CPAN. I am sure everyone here can find other things to put on the list of good things about Perl.
But Perl also has the following well-known disadvantages:
- Excessive memory use. If your program winds up working with and correlating a lot of data, Perl may fall over before you expect it.
- Poor performance. Many tasks that we call AI involve a lot of computation, backtracking, etc. Perl is good for a scripting language, but is is no speed demon. You do not, for instance, find good ray-tracers or chess programs written in Perl, for good reason.
- No true garbage collection. People argue back and forth whether or not it is better in general to have reference counting or true garbage collecting. But there is no question that if you want to manage recursive data structures with self-references, then it is much more convenient to have true garbage collection. The WeakRef module helps, but not enough if you are doing something complex.
Now when you came by in chatter, your problem was that you were running out of RAM on your cluster of rather nice machines. Now after discussion, some of that didn't seem to really be Perl's fault. A lot of it appeared to be the recopying of data inside of Parse::RecDescent
. (I have heard multiple times now that TheDamian
is working on a replacement that uses pos
manipulation rather than recopying. That likely would solve your problem.)
But still when you are bottlenecking on known issues in the language, that should make you wonder at the suitability of the tool. So in this instance you would try to get the memory usage down and performance up. If you cannot get them within acceptable parameters, switching to Lisp, Dylan, Haskell, or OCaml would be perfectly reasonable.
But if it works for you, then it works for you.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||