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)
LUA
Embedded 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.
Python
Embedded using VC++ once, then failed on a repeat attempt, didn't try Code::Blocks
My 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::Python
GameDev article about Embedding Python
Squirrel
Embedded 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:
SqPlus
Ruby
Embedded 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 ruby
GameMonkey Script
Embedded 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 Guide
Embedding GameMonkey
That'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.htm
It 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
PAWN Scripting language (previously known as SMALL)
http://www.compuphase.com/pawn/pawn.htm
It 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. :)
AngelScript
Has classes/objects: Maybe
Strongly typed variables: Yes
Embeddable: Yes
C-like syntax: Yes
Blaise
Has classes/objects: Yes
Strongly typed variables: Yes
Embeddable: Yes
C-like syntax: No
C-SMILE
Has classes/objects: Yes
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Yes
EEL
Has classes/objects: Maybe
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Yes
Embryo
Has classes/objects: No idea
Strongly typed variables: No idea
Embeddable: Yes
C-like syntax: Yes
Ferite
Has classes/objects: Yes
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Yes
No native win32 port available (yet?).
GameMonkey
Has classes/objects: Maybe
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Maybe
JewelScript
Has classes/objects: Yes
Strongly typed variables: Yes
Embeddable: Yes
C-like syntax: Yes
Lua
Has classes/objects: No
Strongly typed variables: No
Embeddable: Yes
C-like syntax: No
Pawn
Has classes/objects: No
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Maybe
Previously known as Small.
Pike
Has classes/objects: Yes
Strongly typed variables: Yes
Embeddable: No
C-like syntax: Yes
Python
Has classes/objects: Yes
Strongly typed variables: No
Embeddable: Maybe
C-like syntax: No
Ruby
Has classes/objects: Yes
Strongly typed variables: No
Embeddable: Maybe
C-like syntax: No
ShilScript
Has classes/objects: Maybe
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Yes
SpiderMonkey
Has classes/objects: Yes
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Yes
Squirrel
Has classes/objects: Yes
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Yes
AngelScript
Has classes/objects: Maybe
Strongly typed variables: Yes
Embeddable: Yes
C-like syntax: Yes
Blaise
Has classes/objects: Yes
Strongly typed variables: Yes
Embeddable: Yes
C-like syntax: No
C-SMILE
Has classes/objects: Yes
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Yes
EEL
Has classes/objects: Maybe
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Yes
Embryo
Has classes/objects: No idea
Strongly typed variables: No idea
Embeddable: Yes
C-like syntax: Yes
Ferite
Has classes/objects: Yes
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Yes
No native win32 port available (yet?).
GameMonkey
Has classes/objects: Maybe
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Maybe
JewelScript
Has classes/objects: Yes
Strongly typed variables: Yes
Embeddable: Yes
C-like syntax: Yes
Lua
Has classes/objects: No
Strongly typed variables: No
Embeddable: Yes
C-like syntax: No
Pawn
Has classes/objects: No
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Maybe
Previously known as Small.
Pike
Has classes/objects: Yes
Strongly typed variables: Yes
Embeddable: No
C-like syntax: Yes
Python
Has classes/objects: Yes
Strongly typed variables: No
Embeddable: Maybe
C-like syntax: No
Ruby
Has classes/objects: Yes
Strongly typed variables: No
Embeddable: Maybe
C-like syntax: No
ShilScript
Has classes/objects: Maybe
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Yes
SpiderMonkey
Has classes/objects: Yes
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Yes
Squirrel
Has classes/objects: Yes
Strongly typed variables: No
Embeddable: Yes
C-like syntax: Yes
Quote:Original post by rck
Ruby
Has classes/objects: Yes
Strongly typed variables: No
Embeddable: Maybe
C-like syntax: No
This 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?
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 PosterSorry, my definition probably isn't the same as yours, what I meant is that variables are not innately variant.
This 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.
Quote:Original post by evolutionalSure.
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?
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.
BeanShell
Their 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 javascript.
My description: scripts Java with Java, easy to set up and easy to interact with your program internals and the Java library - too easy, even
Pnuts
Their 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 examples
JScheme
Their 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 it
Jython
Their 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.
Groovy
Their 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?
BeanShell
Their 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 javascript.
My description: scripts Java with Java, easy to set up and easy to interact with your program internals and the Java library - too easy, even
Pnuts
Their 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 examples
JScheme
Their 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 it
Jython
Their 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.
Groovy
Their 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 javascript and its spyder monkey implementation. <br><br>Cheers<br>Chris
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement