diff options
Diffstat (limited to 'doc/faq.html')
-rw-r--r-- | doc/faq.html | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/doc/faq.html b/doc/faq.html new file mode 100644 index 00000000..6f62e1eb --- /dev/null +++ b/doc/faq.html | |||
@@ -0,0 +1,141 @@ | |||
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>Frequently Asked Questions (FAQ)</title> | ||
5 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | ||
6 | <meta name="Author" content="Mike Pall"> | ||
7 | <meta name="Copyright" content="Copyright (C) 2005-2009, Mike Pall"> | ||
8 | <meta name="Language" content="en"> | ||
9 | <link rel="stylesheet" type="text/css" href="bluequad.css" media="screen"> | ||
10 | <link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print"> | ||
11 | <style type="text/css"> | ||
12 | dd { margin-left: 1.5em; } | ||
13 | </style> | ||
14 | </head> | ||
15 | <body> | ||
16 | <div id="site"> | ||
17 | <a href="http://luajit.org"><span>Lua<span id="logo">JIT</span></span></a> | ||
18 | </div> | ||
19 | <div id="head"> | ||
20 | <h1>Frequently Asked Questions (FAQ)</h1> | ||
21 | </div> | ||
22 | <div id="nav"> | ||
23 | <ul><li> | ||
24 | <a href="luajit.html">LuaJIT</a> | ||
25 | <ul><li> | ||
26 | <a href="install.html">Installation</a> | ||
27 | </li><li> | ||
28 | <a href="running.html">Running</a> | ||
29 | </li><li> | ||
30 | <a href="api.html">API Extensions</a> | ||
31 | </li></ul> | ||
32 | </li><li> | ||
33 | <a href="status.html">Status</a> | ||
34 | <ul><li> | ||
35 | <a href="changes.html">Changes</a> | ||
36 | </li></ul> | ||
37 | </li><li> | ||
38 | <a class="current" href="faq.html">FAQ</a> | ||
39 | </li><li> | ||
40 | <a href="http://luajit.org/download.html">Download <span class="ext">»</span></a> | ||
41 | </li></ul> | ||
42 | </div> | ||
43 | <div id="main"> | ||
44 | <dl> | ||
45 | <dt>Q: Where can I learn more about Lua and LuaJIT?</dt> | ||
46 | <dd> | ||
47 | <ul style="padding: 0;"> | ||
48 | <li>The <a href="http://lua.org"><span class="ext">»</span> main Lua.org site</a> has complete | ||
49 | <a href="http://www.lua.org/docs.html"><span class="ext">»</span> documentation</a> of the language | ||
50 | and links to books and papers about Lua.</li> | ||
51 | <li>The community-managed <a href="http://lua-users.org/wiki/"><span class="ext">»</span> Lua Wiki</a> | ||
52 | has information about diverse topics.</li> | ||
53 | <li>The primary source of information for the latest developments surrounding | ||
54 | Lua is the <a href="http://www.lua.org/lua-l.html"><span class="ext">»</span> Lua mailing list</a>. | ||
55 | You can check out the <a href="http://lua-users.org/lists/lua-l/"><span class="ext">»</span> mailing | ||
56 | list archive</a> or | ||
57 | <a href="http://bazar2.conectiva.com.br/mailman/listinfo/lua"><span class="ext">»</span> subscribe</a> | ||
58 | to the list (you need to be subscribed before posting).<br> | ||
59 | This is also the place where announcements and discussions about LuaJIT | ||
60 | take place.</li> | ||
61 | </ul> | ||
62 | </dl> | ||
63 | |||
64 | <dl> | ||
65 | <dt>Q: Where can I learn more about the compiler technology used by LuaJIT?</dt> | ||
66 | <dd> | ||
67 | I'm planning to write more documentation about the internals of LuaJIT. | ||
68 | In the meantime, please use the following Google Scholar searches | ||
69 | to find relevant papers:<br> | ||
70 | Search for: <a href="http://scholar.google.com/scholar?q=Trace+Compiler"><span class="ext">»</span> Trace Compiler</a><br> | ||
71 | Search for: <a href="http://scholar.google.com/scholar?q=JIT+Compiler"><span class="ext">»</span> JIT Compiler</a><br> | ||
72 | Search for: <a href="http://scholar.google.com/scholar?q=Dynamic+Language+Optimizations"><span class="ext">»</span> Dynamic Language Optimizations</a><br> | ||
73 | Search for: <a href="http://scholar.google.com/scholar?q=SSA+Form"><span class="ext">»</span> SSA Form</a><br> | ||
74 | Search for: <a href="http://scholar.google.com/scholar?q=Linear+Scan+Register+Allocation"><span class="ext">»</span> Linear Scan Register Allocation</a><br> | ||
75 | And, you know, reading the source is of course the only way to enlightenment. :-) | ||
76 | </dd> | ||
77 | </dl> | ||
78 | |||
79 | <dl> | ||
80 | <dt>Q: Why do I get this error: "attempt to index global 'arg' (a nil value)"?<br> | ||
81 | Q: My vararg functions fail after switching to LuaJIT!</dt> | ||
82 | <dd>LuaJIT is compatible to the Lua 5.1 language standard. It doesn't | ||
83 | support the implicit <tt>arg</tt> parameter for old-style vararg | ||
84 | functions from Lua 5.0.<br>Please convert your code to the | ||
85 | <a href="http://www.lua.org/manual/5.1/manual.html#2.5.9"><span class="ext">»</span> Lua 5.1 | ||
86 | vararg syntax</a>.</dd> | ||
87 | </dl> | ||
88 | |||
89 | <dl> | ||
90 | <dt>Q: Sometimes Ctrl-C fails to stop my Lua program. Why?</dt> | ||
91 | <dd>The interrupt signal handler sets a Lua debug hook. But this is | ||
92 | currently ignored by compiled code (this will eventually be fixed). If | ||
93 | your program is running in a tight loop and never falls back to the | ||
94 | interpreter, the debug hook never runs and can't throw the | ||
95 | "interrupted!" error.<br> In the meantime you have to press Ctrl-C | ||
96 | twice to get stop your program. That's similar to when it's stuck | ||
97 | running inside a C function under the Lua interpreter.</dd> | ||
98 | </dl> | ||
99 | |||
100 | <dl> | ||
101 | <dt>Q: Why doesn't my favorite power-patch for Lua apply against LuaJIT?</dt> | ||
102 | <dd>Because it's a completely redesigned VM and has very little code | ||
103 | in common with Lua anymore. Also, if the patch introduces changes to | ||
104 | the Lua semantics, this would need to be reflected everywhere in the | ||
105 | VM, from the interpreter up to all stages of the compiler.<br> Please | ||
106 | use only standard Lua language constructs. For many common needs you | ||
107 | can use source transformations or use wrapper or proxy functions. | ||
108 | The compiler will happily optimize away such indirections.</dd> | ||
109 | </dl> | ||
110 | |||
111 | <dl> | ||
112 | <dt>Q: Lua runs everywhere. Why doesn't LuaJIT support my CPU?</dt> | ||
113 | <dd>Because it's a compiler — it needs to generate native | ||
114 | machine code. This means the code generator must be ported to each | ||
115 | architecture. And the fast interpreter is written in assembler and | ||
116 | must be ported, too. This is quite an undertaking.<br> Currently only | ||
117 | x86 CPUs are supported. x64 support is in the works. Other | ||
118 | architectures will follow with sufficient demand and/or | ||
119 | sponsoring.</dd> | ||
120 | </dl> | ||
121 | |||
122 | <dl> | ||
123 | <dt>Q: When will feature X be added? When will the next version be released?</dt> | ||
124 | <dd>When it's ready.<br> | ||
125 | C'mon, it's open source — I'm doing it on my own time and you're | ||
126 | getting it for free. You can either contribute a patch or sponsor | ||
127 | the development of certain features, if they are important to you. | ||
128 | </dd> | ||
129 | </dl> | ||
130 | <br class="flush"> | ||
131 | </div> | ||
132 | <div id="foot"> | ||
133 | <hr class="hide"> | ||
134 | Copyright © 2005-2009 Mike Pall | ||
135 | <span class="noprint"> | ||
136 | · | ||
137 | <a href="contact.html">Contact</a> | ||
138 | </span> | ||
139 | </div> | ||
140 | </body> | ||
141 | </html> | ||