diff options
Diffstat (limited to 'LuaSL/README')
-rw-r--r-- | LuaSL/README | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/LuaSL/README b/LuaSL/README deleted file mode 100644 index 1444948..0000000 --- a/LuaSL/README +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | Refer to - http://www.infinitegrid.org/drupal/content/LuaSL_New_scripting_engine | ||
2 | |||
3 | LuaSL is a Lua based LSL scripting engine that will aim for LSL | ||
4 | compatability first, then adding Lua extensions. It aims to replace the | ||
5 | woeful XEngine from OpenSim, and at a later stage, be the basis for a | ||
6 | client side scripting engine. | ||
7 | |||
8 | To compile this, you will need Enlightenment Foundation Libraries (EFL) | ||
9 | installed in either /opt/e17 or /usr. These are typical places it get's | ||
10 | installed in. You will also need flex. The rest of the dependencies | ||
11 | are in the ../libraries directory. | ||
12 | |||
13 | |||
14 | Design. | ||
15 | ------- | ||
16 | |||
17 | The basic design will be made up as I go along, but so far I have this - | ||
18 | |||
19 | A parser parses an LSL script, validating it and reporting errors. | ||
20 | |||
21 | A translator takes the result of the parse, and converts it into Lua | ||
22 | source. Each LSL script becomes a Lua state. LSL states are handled as | ||
23 | Lua tables, with each LSL state function being a table function in a | ||
24 | common metatable. LL and OS functions are likely to be C or Lua | ||
25 | functions. Careful testing should be done with LuaJIT FFI, sandboxing, | ||
26 | and performance testing. | ||
27 | |||
28 | The Lua source is compiled by the Lua compiler. | ||
29 | |||
30 | LuaJIT is used as the Lua compiler, library, and runtime. | ||
31 | |||
32 | Luaproc is used to start up operating system threads and hand Lua states | ||
33 | between them. Luaproc messaging is also being used, but might need to | ||
34 | change to edje messaging. Note - luaproc has been extensively rewritten | ||
35 | for this project, mostly converting it to use EFL. That rewrite | ||
36 | substantially shrunk the source code. More might be rewritten in | ||
37 | future. | ||
38 | |||
39 | THIS IS WHERE WE ARE RIGHT NOW. | ||
40 | |||
41 | Nails will be used to pump commands in and out of the LuaSL system. | ||
42 | Incoming commands invoke LSL events via the LuaSL state metatable. LL | ||
43 | and OS functions that impact the world will be converted to nails | ||
44 | commands sent to the command pump. | ||
45 | |||
46 | Initialy, since this is the first thing being written, a nails command | ||
47 | pump client needs to be installed into OpenSim's C# stuff. Though it | ||
48 | might be possible to talk directly to ROBUST instead. Think I'll try | ||
49 | the ROBUST route, see how far I can get. That's the general principle | ||
50 | applying in all of this - try to avoid C# and see how for we can get. | ||
51 | lol | ||
52 | |||
53 | On the other hand, might be better to leverage the existing C# | ||
54 | implementations of LSL functions, just to get things up and running | ||
55 | quickly. To that end, a protocol involving exchanging snippets of Lua | ||
56 | over a network socket has been developed, and the next step is to write | ||
57 | the C# side. sigh | ||
58 | |||
59 | A watchdog thread should be used to make sure no LuaSL script spends | ||
60 | forever processing any event. | ||
61 | |||
62 | Some form of serialization will need to be created for saving script | ||
63 | state during shutdowns, passing script state to other threads / | ||
64 | processes / computers. Aparently Lua is good at this. | ||
65 | |||
66 | There will have to be a MySQL (and maybe SQLite) client in the system, | ||
67 | so we can talk directly to the local sim database. Esskyuehl may be | ||
68 | suitable, though it's still in the prototype stage. | ||
69 | |||
70 | Email, HTTP, and XML-RPC might need to be dealt with by us. A ROBUST | ||
71 | client will be needed to. Azy might be suitable, but it's also in | ||
72 | prototype. | ||
73 | |||
74 | An object is a file system directory, full of LSL scripts as text files, | ||
75 | notecards as text files, animations as BVH (or later BVJ) files, etc. | ||
76 | There will be some sort of metadata in place. This could be created by | ||
77 | our own OpenSim compatible cache module. | ||
78 | |||
79 | |||
80 | Test harness. | ||
81 | ------------- | ||
82 | |||
83 | I'll build a test harness. It will be based on EFL Edje Lua, with | ||
84 | buttons for triggering LSL events, SL style dialogs, and other goodies. | ||
85 | |||
86 | The initial goal will be to run standard MLP scripts. They have minimal | ||
87 | interface to the world, and exercise quite a bit of the rest of LSL. | ||
88 | They are also quite common, and sometimes responsible for a lot of the | ||
89 | script running load. | ||
90 | |||
91 | Later I should add stock standard OpenCollar scripts from SL. They are | ||
92 | a bitch to get working under OpenSim, so would be good compatability | ||
93 | tests. | ||
94 | |||
95 | Various eina logging domains might be used to handle whisper, say, shout, | ||
96 | etc. | ||
97 | |||
98 | Performance testing will have to be done on 5000 scripts, to see how | ||
99 | that compares against XEngine. | ||
100 | |||