Re: [Freeciv-Dev] Adding scripting language
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Martin Willemoes Hansen wrote:
>
> Umh this is just an gennerel idea.
>
> Could it be posible to have more than one scripting language? Like using
> some kind of binding scheme?
Yup, it could be done.
The standard way to do this would be to externalise all the functions we
plan to make available to the scripting language as a
dynamically-loadable C library. Then all the major players (python,
perl, guile, tcl) have different, but well-known, ways of 'wrapping' a C
library with the language.
The more complex bit is 'genericising' the interface for actually
plugging in the appropriate virtual machine. If we really wanted to be
clever, we could instead have a separate perl/python/guile process which
communicates (using the above mentioned C library) with the civserver
process by (for example) a unix-domain socket.
In fact, one of the main design points of guile is supposed to be the
simplicity with which other languages can be implemented in it - so, the
theory went, once you've embedded guile in your app, you've embedded
them all. Sadly, there aren't many languages implemented 'in-guile' in
this way (that I know of).
Jules
--
/----------------+-------------------------------+---------------------\
| Jelibean aka | jules@xxxxxxxxxxxxxxx | 6 Evelyn Rd |
| Jules aka | | Richmond, Surrey |
| Julian Bean | jmlb2@xxxxxxxxxxxxxxxx | TW9 2TF *UK* |
+----------------+-------------------------------+---------------------+
| War doesn't demonstrate who's right... just who's left. |
| When privacy is outlawed... only the outlaws have privacy. |
\----------------------------------------------------------------------/
- Re: [Freeciv-Dev] Adding scripting language, Jules Bean, 1999/09/01
- Re: [Freeciv-Dev] Adding scripting language, Artur Biesiadowski, 1999/09/01
- Re: [Freeciv-Dev] Adding scripting language, Artur Biesiadowski, 1999/09/01
- Re: [Freeciv-Dev] Adding scripting language, Chris Lawrence, 1999/09/01
- Re: [Freeciv-Dev] Adding scripting language, Artur Biesiadowski, 1999/09/01
- Re: [Freeciv-Dev] Adding scripting language, Nicolas Brunel, 1999/09/01
- Re: [Freeciv-Dev] Adding scripting language, FRS, 1999/09/03
- [Freeciv-Dev] tunnels, Laurent Vibert, 1999/09/03
- Re: [Freeciv-Dev] tunnels, Reinier Post, 1999/09/03
- Re: [Freeciv-Dev] tunnels, Nicolas Brunel, 1999/09/03
- Re: [Freeciv-Dev] railroad movement, Peter Schaefer, 1999/09/06
- Re: [Freeciv-Dev] railroad movement, Reinier Post, 1999/09/07
|
|