Jump to content

  • Log In with Google      Sign In   
  • Create Account


Is LISP fluency worth it?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
46 replies to this topic

#1 Forcas   Members   -  Reputation: 181

Like
Likes
Like

Posted 11 June 2004 - 08:49 AM

I know there have always been tons of posts on game AI boards asking about LISP, what it is, and if it''s used in commercial games. Given that LISP is used in few commercial games, is it worth becoming fluent in anyway? I am considering persuing it for two reasons: A.) It is used in academic papers. Being fluent in LISP allows a person to stay on top of the latest developments in AI. B.) It can be embedded into game engines. I heard that Halo uses an embedded LISP-like language for AI. Could embedded LISP-style languages benificial in the long run? I''ve been reading through LISP by Winston & Horn in my free time for the past year, and I have to say that while I''m familiar with many of LISP''s features, when it comes to coding in LISP, I have the speed and effectiveness of a slug. What''s with this language? There are too many parenthesis and stuff. I really like the transparency of lists in LISP, and have researched the benefits of functional programming, but I''m still not convinced that I can code anything in LISP with more ease than I could in C++. Should I persue LISP until I am fluent in it? Any advice?

Sponsor:

#2 Nekhmet   Members   -  Reputation: 132

Like
Likes
Like

Posted 11 June 2004 - 09:13 AM

My advice is: don''t bother unless you''re somebody who has a love of "software engineering" as a discipline, and you have time to really become an expert.

What makes Lisp unique is that you can program it in a hundred different styles:

* Lisp programs can look like C programs.
* Lisp programs can look like Fortran-77 programs.
* Lisp programs can look like Prolog programs.

But it really starts to shine when you start envisioning brand-new styles, styles that have never been embodied in any programming language. You only get this benefit if you''re smart enough to be able to invent new programming styles.



#3 Pxtl   Members   -  Reputation: 354

Like
Likes
Like

Posted 11 June 2004 - 09:33 AM

If you're interested in programming linguistics or complex logic, learn Lisp. Basically, the comment that most Lisp coders have is that Lisp has had the same featureset of all these clever new languages for decades.

I firmly believe that if Lisp had cought on a little more isntead of Fortran, then the programming world would look completely different today. For the layman, Fortran is basically generalized assembler. All languages read like fortran, as they're further generalized assembler.

Lisp is a completely different direction - as Fortran and other modern languages are converted into a parse tree before assembler, Lisp is basically a mildly abstracted representation of a parse tree. Completely different model to work from.

The biggest thing about lisp is that variable data and program code have the same structure. Basically imagine C where you could execute an array, and your normal code was just operations coded into arrays. Lisp is like that (well, technically its all linked lists, not arrays, but who's counting).

Anyone who plans on designing a scripting language should learn Lisp, before they make some of the same mistakes every other language does.

Still, as a gamer - seriously not needed unless you're planning on using an engine that needs it.

[edited by - Pxtl on June 11, 2004 4:34:57 PM]

#4 Extrarius   Members   -  Reputation: 1412

Like
Likes
Like

Posted 11 June 2004 - 12:10 PM

I think learning Common Lisp is definitely worth it. Even if you never really use the language, it will expose you different styles and ways of thinking that could help you write better code in any language. Knowing many very dfferent languages will improve your generall programming skill in all the languages you know.
Knowing C and C++ won''t make much of a difference because they are similar, but knowing C, Lisp, Prolog, and Haskel will expose you to many different ways of working that you otherwise probably wouldn''t experience.

Lisp has long been associated with academia since that is where it originated, and its also been associated with the AI winter and thus it has a pretty bad reputation. Truly though, it is a real language used for huge programs (which include non-AI programs). Lisp Success Stories

Yes, the Lisp syntax (s-expressions) has been used for quite a few scripting langauge, and it isn''t hard to see that it makes a good candidate for such because it is extremely easy to implement a scripting engine for it(at least the basics since the parse tree is created by the programmer, so the computer can skip a few steps).

If you truly think "There are too many parenthesis and stuff", Lisp might not be for you. Syntax is really a petty thing, and there are much more important attributes of a programming language. While Lisp syntax may seem a burden, without it Lisp would be exactly the same as any other programming language and most of it''s important features would be gone.

#5 Jis   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 June 2004 - 05:46 AM

Haw haw, i''m now interested in learning LISP, because it seems to be a very "different" language. I''ll see it later.

( Be Side )

#6 Arild Fines   Members   -  Reputation: 968

Like
Likes
Like

Posted 12 June 2004 - 05:51 AM

quote:
Original post by Nekhmet
* Lisp programs can look like C programs.


And this is an advantage because...?
quote:

* Lisp programs can look like Fortran-77 programs.


And this is an advantage because...?
quote:

* Lisp programs can look like Prolog programs.


And this is an advantage because...?






#7 Jis   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 June 2004 - 05:32 PM

I prefer C coding style, so this is an advantage for me. It makes you less nervous when programming.

( Be Side )

#8 Nekhmet   Members   -  Reputation: 132

Like
Likes
Like

Posted 12 June 2004 - 06:17 PM

You guys are missing the point. The advantage isn''t that you can use one of those old styles. The advantage is that you can invent a style that suits the problem.



#9 Woodsman   Members   -  Reputation: 426

Like
Likes
Like

Posted 13 June 2004 - 02:54 PM

Though I love Lisp, I''m still waiting for Arc.

#10 Puzzler183   Members   -  Reputation: 540

Like
Likes
Like

Posted 15 June 2004 - 01:46 AM

It is definitely worth it. And about it not being used in games, well it sure is used for scripting. The biggest title that comes to mind other than the previously mentioned ones is Age of Empires II. All AI scripts were written in a very LISP-like language... And LISP isn't very hard to learn either if you already know how to program so your time investment will be relatively small.

#11 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 15 June 2004 - 12:45 PM

Im currently learning Scheme. I'm actually finding it pretty difficult. not because of the syntax, but because its a total sandbox. defining list and precedures is all fine, except I cant do any 'real world' examples, how would you connect to a socket and grab a webpage to to parse? how about drawing some graphics on the screen? The books on scheme dont provide any real world examples either. finding nth prime number or implementing some obscure mathimatical formula will not help you make anything practical. sorry to sound like a rant. just my $0.02.


#12 Extrarius   Members   -  Reputation: 1412

Like
Likes
Like

Posted 15 June 2004 - 02:17 PM

I don't know about Scheme, but is Common Lisp much like C in its library - you can do math, print some stuff on the screen, manipulate complex data types, and mess with files (and quite a bit more, but all relatively 'background' stuff). For things like a GUI/Graphics/Etc you need to either find a library somebody else made or write one yourself using FFI (which is, unfortunately, not standardized in CL so you have to pick an implementation)

#13 Code_Dark   Members   -  Reputation: 427

Like
Likes
Like

Posted 15 June 2004 - 04:50 PM

Quote:
Original post by Forcas

I know there have always been tons of posts on game AI boards asking about LISP, what it is, and if it''s used in commercial games.

Given that LISP is used in few commercial games, is it worth becoming fluent in anyway?

I am considering persuing it for two reasons:

A.) It is used in academic papers. Being fluent in LISP allows a person to stay on top of the latest developments in AI.

B.) It can be embedded into game engines. I heard that Halo uses an embedded LISP-like language for AI. Could embedded LISP-style languages benificial in the long run?

I''ve been reading through LISP by Winston & Horn in my free time for the past year, and I have to say that while I''m familiar with many of LISP''s features, when it comes to coding in LISP, I have the speed and effectiveness of a slug.

What''s with this language? There are too many parenthesis and stuff. I really like the transparency of lists in LISP, and have researched the benefits of functional programming, but I''m still not convinced that I can code anything in LISP with more ease than I could in C++.

Should I persue LISP until I am fluent in it? Any advice?


Short answer: No. You don't need it, since most workplace projects are in C++ or Java, as are university ones. The lowest it really gets today is C, which is basically watered-down C++. So, no: you don't need LISP.
[ appsec guy | my project: sleepyti.me ]

#14 Woodsman   Members   -  Reputation: 426

Like
Likes
Like

Posted 16 June 2004 - 12:50 PM

Quote:
Original post by Code_Dark
Short answer: No. You don't need it, since most workplace projects are in C++ or Java, as are university ones. The lowest it really gets today is C, which is basically watered-down C++.

He was asking about AI papers and research, if I read it correctly.
Quote:
Original post by Code_Dark
So, no: you don't need LISP.

Well, you don't need C, C++ or Java either. The point is that it very well may be worth learning or at least investigating a little. That's true of any language that gets your attention and seems at least interesting.

But then again, you're right, I wouldn't recommend LISP either. Stick with Common Lisp. :p

Anyway, to answer your question;
If you're even relatively experienced with any programming language, you'll probably find the underlying concepts of Lisp pretty easily grasped. For me the biggest thing was just getting "functional" so to speak. Then again, like with other high-level languages learning the costs of operations might come a little slower (along with learning all of what CLOS has to offer etc).

Quote:
Original post by Extrarius
For things like a GUI/Graphics/Etc you need to either find a library somebody else made or write one yourself using FFI (which is, unfortunately, not standardized in CL so you have to pick an implementation)

Yes, and I'm still looking for a solid match in these regards.

#15 Diodor   Members   -  Reputation: 517

Like
Likes
Like

Posted 16 June 2004 - 11:11 PM

Quote:
Original post by Forcas
Should I persue LISP until I am fluent in it? Any advice?


I have and I'm glad I did. Lisp was slow to learn for me because every little trivial thing is done differently than my C background, but it really gets better after a while.

Quote:
Original post by Arild Fines
And this is an advantage because...?


It's not an advantage (well, maybe except for the prolog part) it's a proof of raw power.

[Edited by - Diodor on June 17, 2004 8:11:22 AM]

#16 Forcas   Members   -  Reputation: 181

Like
Likes
Like

Posted 19 June 2004 - 04:06 AM

[quote]Original post by Diodor

I have and I'm glad I did. Lisp was slow to learn for me because every little trivial thing is done differently than my C background, but it really gets better after a while.
[quote]

Finally! Thanks for agreeing with me. It's easy to figure how out to make Lisp do things, but hard to become an effective writer and debugger of Lisp code. It's very condensed and hard to read.

Has anyone read "On Lisp" by Graham? I'm thinking about reading it. It's free online.


#17 Woodsman   Members   -  Reputation: 426

Like
Likes
Like

Posted 19 June 2004 - 09:12 AM

Quote:
Original post by Forcas
Quote:
Original post by Diodor

I have and I'm glad I did. Lisp was slow to learn for me because every little trivial thing is done differently than my C background, but it really gets better after a while.


Finally! Thanks for agreeing with me. It's easy to figure how out to make Lisp do things, but hard to become an effective writer and debugger of Lisp code. It's very condensed and hard to read.

Has anyone read "On Lisp" by Graham? I'm thinking about reading it. It's free online.

I have it and printed it out a few months ago, though I only read a part of it I really liked it. I recall there being a heavy slant towards the use of macros, at least when compared to my many other lisp books, I'll have to load it up. I want to buy a used copy, though they start out at around $150. Cheers.

Edit: Oh, I just realize that you're the OP. I wouldn't recommend On Lisp as a beginner's text.

[Edited by - Woodsman on June 19, 2004 6:12:38 PM]

#18 Forcas   Members   -  Reputation: 181

Like
Likes
Like

Posted 19 June 2004 - 12:43 PM

I've already read Winston and Horn... it was okay, I guess. I wish I would've learned with Norvig, though.

#19 Woodsman   Members   -  Reputation: 426

Like
Likes
Like

Posted 19 June 2004 - 02:36 PM

Ok, that book was pretty good. I really liked Paul Graham's ANSI Common Lisp. It had a comprehensive reference to CL in the back which is still helpful, and I still consider it the best book on the subject that I've come across.

Incidentally, what Lisp implementation are you using?

#20 Forcas   Members   -  Reputation: 181

Like
Likes
Like

Posted 19 June 2004 - 06:04 PM

Corman Common Lisp




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS