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.

261. Re: String indexing again (score: 22)
Author: Michal Kottman <k0mpjut0r@...>
Date: Mon, 20 Dec 2010 14:48:26 +0100
It is used in the manual to denote the 3rd byte in the string. It does not work in Lua like that. Strings have their metatable __index pointed to the 'string' table, imagine like the following was do
262. Re: weird behaviour of table.sort (score: 22)
Author: Wolfgang Pupp <wolfgang.pupp@...>
Date: Mon, 28 Jun 2010 20:33:10 +0200
This code: local function lesser(a, b) print(a,b) return true end table.sort({1,2,3,4}, lesser) gives: 4 1 2 4 3 4 4 4 1 4 nil 4 and crashes with "invalid order function for sorting". That means that
263. Re: [Xavante] site example doesn't work (score: 22)
Author: Quae Quack <quae@...>
Date: Mon, 31 May 2010 05:22:43 +1000
The change should probably be: modname = (params or { }).modname or "wsapi.sapi" or you can take out the "params or { }" already in the code. The fact that that is already in there suggests to me tha
264. [Xavante] site example doesn't work (score: 22)
Author: Tom <tom.wieland@...>
Date: Sun, 30 May 2010 20:19:06 +0200
Hello. When I recently was configuring Xavante to run an orbit app I found that the example configuration posted on the site doesn't work with the current Xavante API. The code mentioned is: { -- cgi
265. Re: Lua registry, environment, and threads. (score: 22)
Author: "Juris Kalnins" <juris@...>
Date: Mon, 11 Jan 2010 17:20:58 +0200
But I'm feeling 98% sure "in nil do ... end" never will become valid Lua. 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 (
266. Re: Lua registry, environment, and threads. (score: 22)
Author: Luiz Henrique de Figueiredo <lhf@...>
Date: Mon, 11 Jan 2010 13:08:06 -0200
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) Copyright (C) 1994-2008 Lua.org, PUC-Rio stdin:1: attempt to index
267. Re: bug in table.sort (lua 5.1.3) (score: 22)
Author: Daniel Stephens <daniel@...>
Date: Thu, 03 Apr 2008 17:37:55 -0700
Actually, the problem is that your sort function is invalid, it doesn't follow the correct contract: "Sorts table elements in a given order, /in-place/, from |table[1]| to then it must be a function
268. bug in table.sort (lua 5.1.3) (score: 22)
Author: Tommy Pettersson <ptp@...>
Date: Fri, 4 Apr 2008 01:29:20 +0200
Hi, I'm not a list subscriber. Well, I am now, but I don't think I'll have time to read it. I just wanted to submit a bug fix. It is very minor, and only concerns the error reporting from Lua. But it
269. Re: Weird irreproducible error (score: 22)
Author: Luiz Henrique de Figueiredo <lhf@...>
Date: Mon, 1 Oct 2007 14:38:15 -0300
I meant that that error message usually comes from expressions like a[x][y] when a[x] is nil. It is not related to the weird irreproducible error...
270. Re: sandboxing security, lua bytecode, metatables and string library (score: 22)
Author: Rici Lake <lua@...>
Date: Thu, 22 Feb 2007 22:57:44 -0500
I just think it is the same problem with function environments. If lua bytecode can access function environments, then it have access to string.gsub environment that is the global environemnt. That'
271. lua OO and garbage collector (score: 22)
Author: pancake <pancake@...>
Date: Fri, 30 Jan 2004 15:24:09 +0000
I write a simple OO program in lua. But I don't understand, why the objects keeps in memory after destruction... [0:~/prg/lua]$ lua oo.lua Side name is: Hello Side name is: World 105 202 104 208 lua:
272. Crash Analysis : Erroneous finalizer called during tail call leads to heap buffer overflow (score: 20)
Author: Minseok Kang <maple19out@...>
Date: Mon, 6 Dec 2021 02:55:20 +0900
Hello, List! Recently, my friends and I found an interesting crash from the latest Lua Interpreter. Using address sanitizer, we figured out that heap buffer overflow crash. To find the exact cause of
273. Re: When is a string not a string? (score: 20)
Author: ??????????? ??????? <evg-zhabotinsky@...>
Date: Sat, 26 Jan 2019 20:55:02 +0300
"Egor Skriptunoff" <egor.skriptunoff@gmail.com>: That's an interesting rake! It's not even literal-specific, by the way: This innocent-looking code will throw "attempt to call a nil value" when tryin
274. ??? OO in lua trouble: inherit (score: 20)
Author: "??" <taozuhong@...>
Date: Mon, 9 May 2011 09:41:20 +0800
Hi Fabian, thanks very much for your advice, it has solve my problem. yes, I pass the method as self._Match, but call it directly, so it failed. the correct style is: match(self, tblSvrPacket) -- mus
275. Re: OO in lua trouble: inherit (score: 20)
Author: Fabian Peńa <fapenia@...>
Date: Sat, 07 May 2011 09:20:43 -0300
I think that you call both methods using "." instead use ":" CLIENT_XCHAT._Match({}, 8) -- missing self, {} is self now and 8 is tblSvrPacket Client._Observe({})   -- missing self in the call , {} is
276. OO in lua trouble: inherit (score: 20)
Author: "??" <taozuhong@...>
Date: Sat, 7 May 2011 09:51:07 +0800
Hi gus, In my practice, I found two very strange behavior(please see attachment), the detail as follow: client.lua: line 195: attempt to call method 'Debug' (a nil value) question: why it could not f
277. debugging with Lua For Windows on Windows 7? (score: 20)
Author: Benoit Germain <bgermain@...>
Date: Fri, 26 Mar 2010 16:28:20 +0100
Hello,<o:p></o:p> <o:p> </o:p> I&#8217;ve just installed the latest LfW version on a fresh Windows 7 install, and when I attempt to debug a script I get the following error in the output:<o:p></o:p>
278. RE: Enhanced tostring (score: 20)
Author: Benoit Germain <bgermain@...>
Date: Fri, 23 Oct 2009 14:10:08 +0200
Yes, I forgot the __index, my bad. The point remains that once this is fixed, o:__tostring() and getmetatable(o).__tostring(o) are not equivalent, since a protected metatable might prevent the latter
279. Re: Enhanced tostring (score: 20)
Author: Luiz Henrique de Figueiredo <lhf@...>
Date: Fri, 23 Oct 2009 09:23:28 -0200
getmetatable(o) returns false and so the message is expected. o does not have a __tostring method and so the message is expected. Try adding this meta.__index = meta The __tostring method is used by
280. RE: Enhanced tostring (score: 20)
Author: Benoit Germain <bgermain@...>
Date: Fri, 23 Oct 2009 10:37:06 +0200
What if the object wants to protect the metatable from public access, like this? meta = { __metatable = false, __tostring = function(o) return "hello " .. o.name end } o = {} setmetatable(o, meta) o.

Search by Namazu v2.0.21