General scripting language - Page 2

General scripting language

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

el_muchacho
Posts: 201
Joined: 30 Apr 2005, 01:06

Post by el_muchacho »

According to http://shootout.alioth.debian.org/ the Mono VM is in most tests at least 10x as fast as the Lua VM (which is itself twice as fast as Python). The only problem is, using a compiled language, don't we abandon all the benefits of a scripting language ? Is it possible to develop with an interpreter and then compile the script when it's finished with the Mono platform ? :idea:
Because then, we could very well think about using Ocaml, which is a superior cross-platform language, has a very fast interpretor and a native compiler which is about as fast as C++.
Xon
Posts: 33
Joined: 07 May 2005, 17:07

Post by Xon »

Whoot! Finally onto a page were the page width isnt broken!
el_muchacho wrote:According to http://shootout.alioth.debian.org/ the Mono VM is in most tests at least 10x as fast as the Lua VM (which is itself twice as fast as Python). The only problem is, using a compiled language, don't we abandon all the benefits of a scripting language ? Is it possible to develop with an interpreter and then compile the script when it's finished with the Mono platform ? :idea:
It isnt a native language, but a managed language. Things like reloading a script when you change something while the game is still running is perfectly doable. Probably want some way to save the Scripts state & then reload it after (which is doable with a little plumbing work)

Dynamically compiling code is biult into the runtime enviroment, chucking the code away once you are done requires more consideration (you need to chuck *all* the code you have compiled, or the tiny amounts which can be GCed). I dont know if Mono supports GCed static functions, which are very nice for scripting & functional enviroments/languages.

You can also control what it links against. So that script you just pulled off random player #90210 doesnt nuke your computer.

However, Edit & Continue support is a little more involved. You need to save the state, reload the changed code, shoehorn the old data into the new code (for the most part doable) and then figure out how to resume from were you left off. Microsoft offers Edit & Continue support for C# v2.0

As for using an interpreter/JIT, there is utterly no different between which one you use in the backend. Beyond for one if a heck of a lot faster than the other.
Because then, we could very well think about using Ocaml, which is a superior cross-platform language, has a very fast interpretor and a native compiler which is about as fast as C++.
Hmm, nice.
Post Reply

Return to “Engine”