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.

301. Re: Some luaposix quirks (score: 18)
Author: "Gary V. Vaughan" <gary@...>
Date: Thu, 6 Nov 2014 20:46:21 +0000
Hi Bernd, Yes, but only as a stop gap. The idea is that if you set _G._DEBUG = false before requiring any luaposix Lua code, it turns off argument type checking across every function call boundary. T
302. Some luaposix quirks (score: 18)
Author: Bernd Eggink <monoped@...>
Date: Thu, 06 Nov 2014 16:24:25 +0000
Testing luaposix-33, I stumbled upon these things: * The files in /usr/share/lua/5.2/posix/ use a variable _DEBUG which is not declared local. This causes programs to crash where "require 'strict'" p
303. A loaded binary chunk may have wrong upvalues (score: 18)
Author: ?? <zrui16@...>
Date: Fri, 24 Oct 2014 20:46:16 +0800
Here is the lua program to reproduce this: local function f() local x return function() return x end end local function g() local x return function() return x, y end end print(load(string.dump(f()))(
304. Re: string.len(str) vs str:len() (score: 18)
Author: Mason Mackaman <masondeanm@...>
Date: Thu, 7 Aug 2014 13:14:57 -0500
305. Re: string.len(str) vs str:len() (score: 18)
Author: Mason Mackaman <masondeanm@...>
Date: Thu, 7 Aug 2014 13:00:45 -0500
306. Re: string.len(str) vs str:len() (score: 18)
Author: Elias Barrionovo <elias.tandel@...>
Date: Thu, 7 Aug 2014 14:42:49 -0300
Yes! More like `setmetatable("", {__index = string})`, actually: http://www.lua.org/source/5.2/lstrlib.c.html#createmetatable Just one more example of how Lua doesn't care about string when using __i
307. Re: String manipulation (score: 18)
Author: Choonster TheMage <choonster.2010@...>
Date: Thu, 26 Jun 2014 13:21:36 +1000
Replace s:gsub with msg:gsub (msg being the variable you want to call gsub on). You'll also need to return the result of gsub if you want to use it outside of modify_content_length (strings are immut
308. Re: String manipulation (score: 18)
Author: Rena <hyperhacker@...>
Date: Wed, 25 Jun 2014 23:20:35 -0400
Hi Luiz The scriptlooks as below function modify_content_length(msg, length)     local offset = string.find(msg, "Content-Length", 1, true)     if(offset == nil) then     else         print("offset =
309. Re: String manipulation (score: 18)
Author: Austin Einter <austin.einter@...>
Date: Thu, 26 Jun 2014 07:44:06 +0530
Hi Luiz The scriptlooks as below function modify_content_length(msg, length)     local offset = string.find(msg, "Content-Length", 1, true)     if(offset == nil) then     else         print("offset =
310. Re: Multiple indexing (was: 'in' keyword today) (score: 18)
Author: Thomas Jericke <tjericke@...>
Date: Fri, 11 Apr 2014 07:17:56 +0200
foo = { a = 1 , b = 2 , c = 3 } bar = { x = 'one' , y = 'two' , z = 'three' } baz = { one = 'alpha' , two = 'beta' , three = 'gamma' } a,b,c in foo = x,y,z in bar in baz Depends on the order of the i
311. Re: Multiple indexing (was: 'in' keyword today) (score: 18)
Author: Sean Conner <sean@...>
Date: Thu, 10 Apr 2014 16:04:50 -0400
It was thus said that the Great Thomas Jericke once stated: Interesting. Because in my mind, I was parsing it as a,b,c in foo = (x,y,z in bar) in baz (left to right) That is: foo.a = baz[bar.x] foo.b
312. Re: Multiple indexing (was: 'in' keyword today) (score: 18)
Author: "Thomas Jericke" <tjericke@...>
Date: Thu, 10 Apr 2014 20:37:34 +0200
--Original Message-- I am not really sure if I should answer any questions including the words "foo" and "bar" but I try. It probably should expand to: foo["a", "b", "x"] = bar["x", "y", "z"] Now the
313. Re: imap client (score: 18)
Author: Choonster TheMage <choonster.2010@...>
Date: Mon, 5 Aug 2013 00:27:00 +1000
This means that the ssl.wrap function called on line 25 of imap.lua returned nil instead of the wrapped socket object the IMAP code was expecting; which means that it encountered an error of some sor
314. Re: Convert string to variable name? (score: 18)
Author: Dirk Laurie <dirk.laurie@...>
Date: Fri, 29 Mar 2013 06:30:41 +0200
2013/3/29 iain morland <iain@iainmorland.net>: Basically summarizing the reponses so far: S={"s1","s2","s3","s4"} for k,v in ipairs(S) do _G[v]={} end s1.name = "Jack" s3.age = 42 for k,v in ipairs(S
315. RE: Nested table constructor with reference to other children (score: 18)
Author: "Thijs Schreijer" <thijs@...>
Date: Sun, 30 Oct 2011 16:03:38 +0100
The line 'b = one' should at least be 'b = a.one' to refer properly. But it then still won't work because (iirc) the righthand side of 'a = { ...' is evaluated before it is being assigned to 'a', so
316. Re: file:write() fails silently for read-only files (score: 18)
Author: startx <startx@...>
Date: Tue, 6 Sep 2011 08:21:55 +0100
yes, you are correct. however, you do something like f = io.open('foo.foo', 'r') success = f:write('ffd') f:close() success will be NIL if the file cannot be written to. one one hand i see your point
317. Re: Suggestion: file:write() and other methods should return file (score: 18)
Author: HyperHacker <hyperhacker@...>
Date: Sat, 2 Jul 2011 06:35:49 -0600
It would still return nil and error message on failure. That does mean if you write something like I did you'd get an "attempt to index nil" error, but you can fix that with more assertion (as Rebel
318. Re: How to get file size? (score: 18)
Author: Jerome Vuarand <jerome.vuarand@...>
Date: Tue, 19 Apr 2011 11:42:38 +0200
2011/4/19 Gilles Ganault <gilles.ganault@free.fr>: You have to check the return value from io.open. It may be nil, and followed by an error message: libs_file,msg = io.open("librt.so.0","r") if not l
319. Re: Load module/package from string (score: 18)
Author: Peter Cawley <lua@...>
Date: Thu, 31 Mar 2011 15:55:07 +0100
I suspect that you want to insert things into package.preload, or add a custom searcher function to the package.loaders array. E:\Lua\ifm\b>lua Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio Modu
320. Load module/package from string (score: 18)
Author: jose.camacho@...
Date: Thu, 31 Mar 2011 11:41:45 +0200
Hi everyone, this is a long message, sorry for the verbosity. We tried different solutions as found in the manual/google, but none of them worked. Here ge go We are working with LUA in a distributed

Search by Namazu v2.0.21