title: Looking for good server-side language that will allow players to upload code that can be executed
body: <p>I had an idea of a program I want to write, but which language would be best is my problem.</p>
  
  <p>If I have a car racing game and I want to allow users to submit code for new interactive 3D race tracks (think of tracks such as found in the Speed Racer movie), vehicles and for their autonomous vehicles, so, they would create the AI for their car that will enable the car to determine how to handle hazards.</p>
  
  <p>So, I need a language that will run fast, and as part of a world map that the server has of all the possible races available, and their various states.</p>
  
  <p>I am curious if this would be a good reason to look at creating a DSL in Scala, for example?</p>
  
  <p>I don't want to have to restart an application to load new dlls or jar files so many compiled languages would be a problem.</p>
  
  <p>I am open to Linux or Windows, and for the languages, most scripting languages, F#, Scala, Erlang or most OOP I can program in.</p>
  
  <p>The user will be able to monitor how their vehicle is doing, and if they have more than one AI uploaded for that car, when it gets to certain obstacles they should be able to swap one AI program for another on demand.</p>
  
  <p>Update: So far the solutions are javascript, using V8, and Lua.  </p>
  
  <p>I am curious if this may be a good use for a DSL, actually 3 separate ones. 1 for creating a racetrack, another for controlling a racecar and the third for creating new cars.</p>
  
  <p>If so, would Haskell, F# or Scala be good choices for this?</p>
  
  <p><strong>Update:</strong> Would it make sense to have different parts end up in different languages? For example, if Erlang was used for the controlling of the car and Lua for the car itself, and also for the animated racetrack? </p>