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: [ Luis: 514 ] [ Carvalho: 322 ]

Total 256 documents matching your query.

201. Re: The purpose of LUA_ENVIRONINDEX pseudo index (score: 455)
Author: Luis Carvalho <carvalho@...>
Date: Tue, 29 Aug 2006 12:29:22 -0400
I like to think of LUA_ENVIRONINDEX as a sort of "lua_upvalueindex(0)": it is like a shared upvalue among all C functions that have the same environment. If by locally you mean private, then a closur
202. Re: problem with __eq in metatable (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Sun, 27 Aug 2006 00:14:14 -0400
The manual states that "'eq': the == operation. The function getcomphandler defines how Lua chooses a metamethod for comparison operators. A metamethod only is selected when both objects being compar
203. Re: How to break out of nested loops (score: 35)
Author: "Leonid Razoumov" <slonik.az@...>
Date: Wed, 23 Aug 2006 16:55:47 -0400
You can also use a 'do' block: --breaking from nested loops t={ {0,1,2,3,4}, {10,11,-12,13,14} } -- two dimensional array do for i=1,#t do for j=1,#t[i] do if t[i][j]<0 then return end --break out of
204. Re: How to break out of nested loops (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Wed, 23 Aug 2006 16:00:19 -0400
Ahhh, yes, sure! I apologize for the noise. Cheers, Luis, that was terrible... -- A mathematician is a device for turning coffee into theorems. -- P. Erdos -- Luis Carvalho Applied Math PhD Student
205. Re: How to break out of nested loops (score: 18)
Author: "Aaron Brown" <arundelo@...>
Date: Wed, 23 Aug 2006 15:05:48 -0400
You can also use a 'do' block: --breaking from nested loops t={ {0,1,2,3,4}, {10,11,-12,13,14} } -- two dimensional array do for i=1,#t do for j=1,#t[i] do if t[i][j]<0 then return end --break out o
206. Re: How to break out of nested loops (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Wed, 23 Aug 2006 13:00:54 -0400
You can also use a 'do' block: --breaking from nested loops t={ {0,1,2,3,4}, {10,11,-12,13,14} } -- two dimensional array do for i=1,#t do for j=1,#t[i] do if t[i][j]<0 then return end --break out o
207. Re: numerical Lua? (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Sun, 7 May 2006 16:44:18 -0400
Hi Diego, Yes, a new 100x100 matrix is being generated/collected at each iteration. I also think that Matlab should be very sensitive to l- and r-values and should feature a very specialized parser,
208. Re: numerical Lua? (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Sun, 7 May 2006 15:10:08 -0400
Just a quick comment: you can gain some speed by using locals local u0 = os.clock() local x = matrix(100, 100) local I = matrix.eye(100) for i=1,matrix.size(x,1) do local r = x[i] -- i-th row for j=
209. Re: numerical Lua? (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Sun, 7 May 2006 14:33:27 -0400
Sorry about the delay... still in the end-of-semester marathon. :) There's actually an error in the Makefiles: only blas and lapack should be linked to luamatrix.dll, but some other libraries are als
210. Re: numerical Lua? (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Thu, 4 May 2006 19:32:46 -0400
Ah, don't worry: it's not your fault. I haven't fixed the win32 settings in the Makefiles. Anyway, I've just released a win32-binary version of numlua. Please check http://luaforge.net/projects/numl
211. Re: numerical Lua? (score: 114)
Author: Ben <laserbin@...>
Date: Thu, 4 May 2006 17:36:11 -0400
Hi, I downloaded the code but don't know how to use it. Sorry. I could not compile the code successfully under Windows. If numlua can deliver matlab or fortran like matrix manipulation syntax, it def
212. Re: how to make anydimensional array? (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Sun, 23 Apr 2006 15:04:39 -0400
What about: <poly.lua> local setmetatable = setmetatable local type = type local print = print module'poly' local poly_mt = { __index = function(o, k) return 0 end, __call = function(o, l) local e =
213. Re: numerical Lua? (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Sat, 22 Apr 2006 17:15:21 -0400
I beg to differ: http://luaforge.net/projects/numlua It's not as maintained as I'd wanted it to be, but it's fairly usable. Definitely. Cheers, luis. -- A mathematician is a device for turning coffe
214. Re: Empty Table Manipulation (score: 26)
Author: Kristopher Lohmuller <tervalas@...>
Date: Thu, 20 Apr 2006 16:12:12 -0500
in Lua 5.1 becomes if not disp or not next(disp) then -- do stuff end and for i,d in disp do do things end becomes for i,d in pairs(disp) do -- do stuff end or for i,d in next, disp do -- do stuff en
215. Re: Empty Table Manipulation (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Thu, 20 Apr 2006 16:53:50 -0400
in Lua 5.1 becomes if not disp or not next(disp) then -- do stuff end and becomes for i,d in pairs(disp) do -- do stuff end or for i,d in next, disp do -- do stuff end Cheers, luis. -- A mathematici
216. Re: make local oddness and package.prefix (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Mon, 13 Mar 2006 10:58:52 -0500
lua -e 'print(string.match(_VERSION,"Lua (.*)"))' lua -e 'print(string.match(package.path,".*;(.*)/share.*"))' What do you think? It's certainly more portable. ;) Cheers, luis. -- A mathematician is
217. installing Lua 5.1 on AIX -- "last" word (score: 18)
Author: mfmorss@...
Date: Mon, 27 Feb 2006 15:58:23 -0500
I mentioned on Friday that after my installation of Lua 5.1 on AIX, luaL_typerror and luaL_ref (and possibly other, untested functions) were undefined at run time, and that calling these functions fr
218. Re: Lua + Fortran? (score: 61)
Author: mfmorss@...
Date: Thu, 9 Feb 2006 15:58:37 -0500
That's quite interesting, thanks. Mark F. Morss Principal Analyst, Market Risk 614-583-6757 Audinet 220-6757 Luis Carvalho <carvalho@dam.bro wn.edu> To Sent by: Lua list lua-bounces@bazar <lua@bazar2
219. Re: Lua + Fortran? (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Thu, 9 Feb 2006 12:35:17 -0500
You can take a look at NumericLua: http://luaforge.net/projects/numlua I use a lot of Fortran code there. Bottom line is: no need to wrap routines; just declare appropriate C prototypes. Cheers, lui
220. Re: Lua multiplication problem (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Fri, 25 Nov 2005 10:44:38 -0500
Welcome, indeed. See also http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm for a quick (but not highly recommended) workaround: true Cheers, luis. -- A mathematician is a de

Search by Namazu v2.0.21