lua-users home
lua-l archive

Search lua-l

This index contains 143,615 documents and 1,774,615 keywords. Last update on 2023-03-09 .

Query: [How to search]

Display: Description: Sort by:

Results:

References: [ attempt: 3298 ] [ to (Too many documents hit. Ignored) ] [ index: 6969 ] [ a (Too many documents hit. Ignored) ] [ nil: 12751 ]

Total 504 documents matching your query.

181. Re: Sanity check needed on design (score: 32)
Author: Buzz Burrowes <buzz_burrowes@...>
Date: Sun, 18 Nov 2007 14:58:29 -0800 (PST)
Thanks so much for the tips! This is definitely helping me understand scopes in LUA. Since posting my original message I did find a solution to one of the first points you made regarding accessing gl
182. Re: Sanity check needed on design (score: 32)
Author: "Thomas Lefort" <thomas.lefort@...>
Date: Sun, 18 Nov 2007 20:11:45 +0100
If you try it, you will get: attempt to index global 'DerivedObject' (a nil value) This because the environment you set is empty. To correct this, you can make it inherit globals with: env = setmetat
183. Executing Loadstring function as part of a lua class (score: 32)
Author: "Michael Swan" <michael_swan@...>
Date: Tue, 13 Dec 2005 15:40:36 +1000
Hi, I'm trying to execute a function made from loadstring, but I want the function to remain part of the class that I'm executing it from. Here's some code: Program = [[if self.ScanTheArea == true th
184. lua thread sample does not run (score: 32)
Author: Jun OKAJIMA <okajima@...>
Date: Mon, 22 Aug 2005 23:06:34 +0900
Anybody can help? I dont understand why this fails, 46 local connections = {} 57 socket.select(connections) although $ lua works. Why? -- Okajima. -- I have another problem with threading. this code
185. lua thread sample does not run (score: 32)
Author: Jun OKAJIMA <okajima@...>
Date: Sat, 20 Aug 2005 15:02:05 +0900
I have another problem with threading. this code comes from http://www.lua.org/pil/9.4.html and it fails in select(). the interpreter binary is from Debian sid which has no thread func. -- Okajima, J
186. Returning a table from a C function (score: 32)
Author: Will Cowling <WillCowling@...>
Date: Wed, 21 May 2003 13:59:43 +0100
Hi, I have a simple problem using Lua 5 which I hope someone can help me with. I want to call a C function that allocates an object, and then returns a table with the object ptr and some methods that
187. Re: Alternative (better?) __index implementation (score: 31)
Author: "alex.mania@..." <alex.mania@...>
Date: Sun, 02 Dec 2007 12:00:02 +0900
Definitely ;) That's definitely something I'd like to see in a lua compiler (or more probably, jit-er). Would be quite a challenge to inline metamethods though; without massive amounts of static ana
188. Re: Strange meta __newindex behavior (score: 31)
Author: David Haley <dchaley@...>
Date: Sun, 25 Mar 2007 00:39:33 -0700
On this day of 03/24/07 23:28, Alan Hightower saw fit to scribe: Then something is missing from the story: --8<--8<--8<-- $ cat test.lua root = {} root._hidden_vals = {} root._my_meta = {} root._my_m
189. Re: String manipulation (score: 30)
Author: Austin Einter <austin.einter@...>
Date: Thu, 26 Jun 2014 09:17:04 +0530
Thanks, I modified as per suggestion, now script looks as below function modify_content_length(msg, length)     local offset = string.find(msg, "Content-Length", 1, true)     if(offset == nil) then  
190. Re: Discussing Lua compiling (score: 30)
Author: Matthew Wild <mwild1@...>
Date: Thu, 21 Apr 2011 17:38:51 +0100
Correct, and this compile time is typically very fast. Lua uses it to give helpful error messages. Without the debug info the message "attempt to index local 'foo'" becomes "attempt to index a nil va
191. Re: Declared UpValues, change to Parser. (score: 29)
Author: Duane Leslie <parakleta@...>
Date: Wed, 4 May 2016 15:21:45 +1000
No, this doesn't cause a syntax error, it causes a runtime error ("attempt to index a nil value" if you set _ENV to nil). This requires me to run the user code when they submit it rather than just c
192. Re: [ANN] ZeroBrane Studio 0.40 (score: 29)
Author: Peng Zhicheng <pengzhicheng1986@...>
Date: Sun, 22 Dec 2013 10:52:47 +0800
&#20110; 2013-12-21 17:24, Ulrich Schmidt &#20889;&#36947;: I wrote a tiny module to print some values to console for debugging purposes. (see attaches file) It works well on luaJIT and lua52. I can
193. Re: parser hacking: conditional fields (score: 29)
Author: Dirk Laurie <dirk.laurie@...>
Date: Fri, 1 Mar 2013 07:04:44 +0200
2013/3/1 Javier Guerra Giraldez <javier@guerrag.com>: I just had to try this out immediately. It is absolutely and totally brilliant. There are two flavours. To emphasize the difference, I have writt
194. Re: Please comment on these Lua to C library bindings that I wrote (score: 29)
Author: Jerome Vuarand <jerome.vuarand@...>
Date: Tue, 20 Nov 2012 13:13:05 +0000
2012/11/20 Richard W.M. Jones <rjones@redhat.com>: Well, as in any language when you want to use numbers larger than the largest integer type, you have to use a specialized library. There are several
195. Re: Newbe question on function environment (score: 29)
Author: Dirk Laurie <dirk.laurie@...>
Date: Sun, 1 Apr 2012 11:58:34 +0200
Not quite. 1. Globals live in whatever table is currently associated with the name _ENV. 2. Whenever you enter a function, Lua has pre-initialized _ENV for you, so that _ENV and _ENV._ENV are the sa
196. Re: Simple write to files-request for help (score: 29)
Author: Michal Kottman <k0mpjut0r@...>
Date: Thu, 29 Dec 2011 19:30:10 +0100
Because you use w, which is an undefined variable, therefore it's value is nil. If the second parameter of io.open() is nil, it defaults to 'r'. Because the file does not exist, it returns nil, there
197. Re: Does anyone have "assert" blindness ? (score: 29)
Author: Peter Odding <peter@...>
Date: Wed, 09 Mar 2011 18:44:14 +0100
Heads up: Lots of brainstorming about the complexities of proper error handling ahead so feel free to skip this e-mail if it doesn't interest you. I've been bothered by the same thing for a while now
198. Re: Why this error in table.sort()? (score: 29)
Author: Steve Litt <slitt@...>
Date: Fri, 4 Feb 2011 02:02:16 -0500
A few diagnostic prints and defaulting thiss and nextt if they were nil revealed that function byname() was executed several times before thiss became nil (and later nextt became nil). I'm thinking m
199. Re: weird behaviour of table.sort (score: 29)
Author: HyperHacker <hyperhacker@...>
Date: Mon, 28 Jun 2010 13:55:13 -0600
If it's calling your order function with nil as an argument, and throwing the "invalid order function" error only after that, then it seems like it simply hasn't figured out that your function is inv
200. Re: Lua registry, environment, and threads. (score: 29)
Author: Quae Quack <quae@...>
Date: Tue, 12 Jan 2010 02:19:08 +1100
2010/1/12 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> It is valid in 5.2 and it forces (at runtime) that the block does not contain any references to global variables.   Lua 5.2.0 (work1)  C

Search by Namazu v2.0.21