   Embedding Scripting Languages
  Well, as there is no giant list of resources for embeddable scripting languages in this forum like there is in the graphics library and graphic art forums, I thought I'd start one.Here is a list of the languages I've tried, and whether I succeesed in embedding them or not (note, primarily based around embedding and extending (slightly), so no comment on the actual languge)LUAEmbedded using Code::Blocks, but not VC++, didn't seem too hard to embed.My Thoughts: Can't comment much, most of the tutorials for it are for older vesions, and those functions have new names and different ways of doing things, so no real progress.No helpful resources I've come across, some people like the LUA tutorials here.PythonEmbedded using VC++ once, then failed on a repeat attempt, didn't try Code::BlocksMy Thoughts: A bugger to embed, I did it once, then tried with Boost::Python, which failed, then tried without again, but couldn't get that to work again.Resources:Boost::PythonGameDev article about Embedding PythonSquirrelEmbedded with Code::Blocks, which took a while, and with C++, which was a breeze (almost).My thoughts: Combined with SqPlus, this is quite good, and quite simple to embed, but it's not use to me if I can't use it because I don't know how. Much bettor tutorials are needed on how to embed and extend this one.Resources: SqPlusRubyEmbedded with VC++, very easy to do, THE easiest, didn't try with Code::Blocks.My thoughts: Easiest to embed yet. Using this source code, it has been very simple and sthright forward. I haven't seen any examples of how you call functions either to or from ruby, but I've heard promising things!Resources:Nice simple intro to rubyGameMonkey ScriptEmbedded with Code::Blocks, didn't try with VC++.My thoughts: Best documentation on how to embed and call functions I've ever seen, but the extending is scary and the code for calling functions from it is not nice.Resources:Language GuideEmbedding GameMonkeyThat's all folks, maybe I'll update it when I'm awake... and yes, I will fix thse links ASAHP (H = "humanly", i.e. sleep)Feel free to post anything you like.[Edited by - Silvo on June 13, 2006 2:27:23 AM]
  you can also try this one:PAWN Scripting language (previously known as SMALL)http://www.compuphase.com/pawn/pawn.htmIt has a C like grammar, I've been using it in some of my projects and I can say it is easy to embed, pretty stable, and it generates very fast code. It has some C features missing, though (structs).VicViper   ;  Here is my list quickly converted from some wiki-syntax on my personal wiki. If you know of one not listed here please let me know. :)AngelScriptHas classes/objects: MaybeStrongly typed variables: YesEmbeddable: YesC-like syntax: YesBlaiseHas classes/objects: YesStrongly typed variables: YesEmbeddable: YesC-like syntax: NoC-SMILEHas classes/objects: YesStrongly typed variables: NoEmbeddable: YesC-like syntax: YesEELHas classes/objects: MaybeStrongly typed variables: NoEmbeddable: YesC-like syntax: YesEmbryoHas classes/objects: No ideaStrongly typed variables: No ideaEmbeddable: YesC-like syntax: YesFeriteHas classes/objects: YesStrongly typed variables: NoEmbeddable: YesC-like syntax: YesNo native win32 port available (yet?).GameMonkeyHas classes/objects: MaybeStrongly typed variables: NoEmbeddable: YesC-like syntax: MaybeJewelScriptHas classes/objects: YesStrongly typed variables: YesEmbeddable: YesC-like syntax: YesLuaHas classes/objects: NoStrongly typed variables: NoEmbeddable: YesC-like syntax: NoPawnHas classes/objects: NoStrongly typed variables: NoEmbeddable: YesC-like syntax: MaybePreviously known as Small.PikeHas classes/objects: YesStrongly typed variables: YesEmbeddable: NoC-like syntax: YesPythonHas classes/objects: YesStrongly typed variables: NoEmbeddable: MaybeC-like syntax: NoRubyHas classes/objects: YesStrongly typed variables: NoEmbeddable: MaybeC-like syntax: NoShilScriptHas classes/objects: MaybeStrongly typed variables: NoEmbeddable: YesC-like syntax: YesSpiderMonkeyHas classes/objects: YesStrongly typed variables: NoEmbeddable: YesC-like syntax: YesSquirrelHas classes/objects: YesStrongly typed variables: NoEmbeddable: YesC-like syntax: Yes;  Might want to check out Io as well. I dont have any experience with it, but it looks nifty. :)   ;Quote:Original post by rckRubyHas classes/objects: YesStrongly typed variables: NoEmbeddable: MaybeC-like syntax: NoThis isn't right. Ruby definitely has strongly typed variables. I think you mean that Ruby is dynamically instead of statically typed. Ruby also has a lot of language bindings, so it is generally embeddable, though it is usually meant to be used standalone.   ;  Nice thread guys.What I'd like to see is some small roundup/comparison of each of these languages - expanding on what rck started and talk about things such as Garbage collection model, performance, standard library, perhaps even showing simple example cases in each of the languages.Perhaps if we all chip in would could build such a resource?   ;Quote:Original post by Anonymous PosterThis isn't right. Ruby definitely has strongly typed variables. I think you mean that Ruby is dynamically instead of statically typed. Ruby also has a lot of language bindings, so it is generally embeddable, though it is usually meant to be used standalone.Sorry, my definition probably isn't the same as yours, what I meant is that variables are not innately variant.Quote:Original post by evolutionalNice thread guys.What I'd like to see is some small roundup/comparison of each of these languages - expanding on what rck started and talk about things such as Garbage collection model, performance, standard library, perhaps even showing simple example cases in each of the languages.Perhaps if we all chip in would could build such a resource?Sure.   ;  The following is a short list of languages that can be embedded in Java applications. I can't say that I've tried many of them, mostly just BeanShell, hence the descriptions are not too helpful.BeanShellTheir description: BeanShell is a small, free, embeddable Java source interpreter with object scripting language features, written in Java. BeanShell dynamically executes standard Java syntax and extends it with common scripting conveniences such as loose types, commands, and method closures like those in Perl and &#106avascript.My description: scripts Java with Java, easy to set up and easy to interact with your program internals and the Java library - too easy, evenPnutsTheir description: Pnuts is a script language for Java environment. It enables interaction with Java environment, simple Web scripting, customization for Java programs, and so on.My descrption: confusing, own syntax, lack of good documentation and examplesJSchemeTheir description: The goal of this project is to develop the JScheme implementation of Scheme in Java and to explore the use of JScheme in web programming. JScheme is a dialect of Scheme with a very simple interface to Java, called the Javadot notation.My description: A scheme interpreter for Java, haven't looked much into itJythonTheir description: ython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus allows you to run Python on any Java platform.My description: python implementation in pure Java. official release does not support generators but these have been added to the current codebase - no idea how lightweight they are though.GroovyTheir description: Groovy is an agile dynamic language for the Java Platform with many features that inspired languages like Python, Ruby and Smalltalk, making them available to Java developers using a Java-like syntax.My description: much hyped, still very young. apparently being pushed for standard?   ;  Wouldn't want to forget &#106avascript and its spyder monkey implementation.  CheersChris   ;  re: Squirrel with SqPlus- recent versions of SqPlus include example project/make files for VC7.1, VC8, Code::Blocks, and GNUMake. Where did you have a challenge with embedding?Sorry about the lack of docs for SqPlus: other than the Wiki, the example testSqPlus2.cpp has just about every example usage of SqPlus you might need. By tracing through the examples in testSqPlus2.cpp with the debugger, you'll learn how everything works, and be better able to extend/change SqPlus (though its almost a year old now and fairly feature complete for game use). Additional SqPlus documentation and examples are welcome from the user community (feel free to add to the Wiki when you figure something out that may help other users).If you have questions about using SqPlus, if you don't get answers on GameDev.net, try the Squirrel Forum: Squirrel Forum.Some Ogre users are using SqPlus, see the Ogre Squirrel Page.The Squirrel language is reasonably well documented: Squirrel Language Documentation. If you have any questions regarding the language, post them on the Squirrel forum. Squirrel's author (Alberto) is pretty good at answering language questions.   