Sign in to follow this  
AlbertoT

Lisp

Recommended Posts

Guest Anonymous Poster
Lisp is a programming language, with the interesting property that it makes certain difficult things easy, and easy things difficult.

Share this post


Link to post
Share on other sites
Thanks

May I assume that Lisp and c\c++ work well togheter ?
I mean, I can use Lisp to makes certain difficult things easy
I so, which ones ? in a game programming

Share this post


Link to post
Share on other sites
Quote:
Original post by AlbertoT
Thanks

May I assume that Lisp and c\c++ work well togheter ?

That depends. First of all, there are a wide variety of Lisp dialects. I'll assume you are referring to Common Lisp (a specific Lisp dialect), because that is what "Lisp" often refers to when it refers to a specific dialect. Secondly, this depends on the compiler/interpreter you use.
Quote:

I mean, I can use Lisp to makes certain difficult things easy
I so, which ones ? in a game programming

Well, he probably meant that mainly as a joke, but some things are easier to do in Common Lisp than some other languages. They are not really specifically related to a type of application though.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Abuse was a popular example of using LISP for AI and game play on top of a platform engine. See http://en.wikipedia.org/wiki/Abuse_(computer_game)

Share this post


Link to post
Share on other sites
I would not recommend LISP for scripting,
and I would say it doesnt work well with C++/C because:

- It uses reverse polish notation Ie. to add 4 + 5 in lisp: (+ 4 5)
- It has no types.
- It is a functional language instead of an imperative one (like C++)

Yes, lisp does work well for certain things, such as recursion, but it can get VERY complicated VERY quickly.

Share this post


Link to post
Share on other sites
Quote:
Original post by Nitrogen
I would not recommend LISP for scripting,

Why?
Quote:

and I would say it doesnt work well with C++/C because:

- It uses reverse polish notation Ie. to add 4 + 5 in lisp: (+ 4 5)

That is Polish notation. Also, that is not related to whether or not it works well with C++
Quote:

- It has no types.

It does indeed have types. It's just dynamically typed. And, again, this is not related to whether or not it works well with C++
Quote:

- It is a functional language instead of an imperative one (like C++)

It is imperative language. It is an impurely functional language (which basically means that it is an imperative language that has closures). The fact that is an impurely functional language will not affect how well it will work with C or C++.

Quote:

Yes, lisp does work well for certain things, such as recursion, but it can get VERY complicated VERY quickly.


Okay, I am thinking you have never actually used Lisp for a significant period of time. There are (of course) good arguments for why you would not want to use Lisp in certain cases. None of these are. And two of your points (the first and the second) are just plain wrong.

Share this post


Link to post
Share on other sites
"I'll assume you are referring to Common Lisp "

I was referring to the Lisp script language used by the authoring system
"Deep Creator"
This 3d engine use a combination of Lisp and C\C++
It seems that they made this choice because their customers are already familiar with Lisp being used in AutoCad
I wonder howewer wether you can expect significant advantages, using Lisp ,for example ,for the game play or AI logic and c\c++ for othet tasks

Share this post


Link to post
Share on other sites
OK, my bad, got my definitions a bit screwed! :)

What I'm trying to get across, is that in my opinion, Python or LUA would be a much better choice because it follows the same syntax as C++.

Granted I only used lisp for a year, but found I had to relearn my whole style of programming..
Not good for switching between the two..

Share this post


Link to post
Share on other sites
All of Naughty Dog's games use a dialect of LISP. Not only do they use it for there gameplay logic they use it for rendering, physics simulations, and sound propagation.

They had the enginuity to write their own compiler for PS2 which gave them the ability to integrate assembly and LISP together as if they were the same language. This not only gave them a productivity boost because they ran the game once and never recompiled again for the entire day, but also gave them the same cutting edge speed that C++ could have offered.

All in all - C++ is just a standard for games because the tools for games make you program in C/C++, if a company has the resources then they can make whatever compiler/debugger they wish for any type of language.

Share this post


Link to post
Share on other sites
Quote:
Original post by AlbertoT
"I'll assume you are referring to Common Lisp "

I was referring to the Lisp script language used by the authoring system
"Deep Creator"
This 3d engine use a combination of Lisp and C\C++
It seems that they made this choice because their customers are already familiar with Lisp being used in AutoCad

Ah. Well, I have not used that dialect so I cannot help you there. It's worth noting that dialects of Lisp can be completely different, so next time you might want to mention the dialect.

Quote:

I wonder howewer wether you can expect significant advantages, using Lisp ,for example ,for the game play or AI logic and c\c++ for othet tasks

As I said, the advantages of Common Lisp are not really specific to what you are trying to do with it. And, the advantages of Common Lisp may not be the same as that dialect.

Quote:
Original post by Nitrogen
OK, my bad, got my definitions a bit screwed! :)

What I'm trying to get across, is that in my opinion, Python or LUA would be a much better choice because it follows the same syntax as C++.


Quote:
Original post by AlbertoT
Python or LUA would be a much better choice because it follows the same syntax as C++.

This was also my impression


This does not have to do with how well they work with C++. Also, Python and Lua certainly do not have the same syntax has C++. The only (syntactic) similarities, pretty much, are that they are both keyword-based and both use infix math notation. That's it. You would still have to learn about as much to learn Python or Lua (assuming that the dialect that he is talking about is somewhere between Scheme and Common Lisp in the number of features it has. As I said, different dialects of Lisp can be completely different).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Speaking of Lisp, I have, for a long time, been semi-interested in integrating Common Lisp as the scripting language for a game. The problem is, I haven't been able to find an implementation of Common Lisp that's easy to integrate with C++ code, and has no special licensing restrictions. Is there such a beast anywhere? Of all the examples given in this thread, it seems they had to write their own Lisp environment to include in their game. I'd rather avoid that.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Speaking of Lisp, I have, for a long time, been semi-interested in integrating Common Lisp as the scripting language for a game. The problem is, I haven't been able to find an implementation of Common Lisp that's easy to integrate with C++ code, and has no special licensing restrictions. Is there such a beast anywhere? Of all the examples given in this thread, it seems they had to write their own Lisp environment to include in their game. I'd rather avoid that.

ECL?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this