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.

221. Re: Implementing the Dijkstra Algorithm (score: 61)
Author: "Mark Meijer" <meijer78@...>
Date: Wed, 23 Nov 2005 11:03:13 +0000
On a side note, as also suggested on that wikipedia page, and depending on what exactly you are using the algorithm for, you might want to consider using the A* algorithm instead. Or perhaps another
222. Re: Implementing the Dijkstra Algorithm (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Tue, 22 Nov 2005 12:02:46 -0500
Also for the INFs; actually, a no-edge should have distance INF, and so, just substitute INFs by nils all together. It should be faster and makes more sense in Lua. Cheers, luis. -- A mathematician
223. Re: Implementing the Dijkstra Algorithm (score: 114)
Author: Samuel Sol <samuel.sol@...>
Date: Tue, 22 Nov 2005 13:19:48 -0200
Thank you mate, I will start implementing it. The only think that will have to be diferent is how to mark when there is no edge between two nodes I will use -1, because 0 is a valid cost. :) but none
224. Re: Implementing the Dijkstra Algorithm (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Mon, 21 Nov 2005 18:32:58 -0500
Quick and dirty, following your Wikipedia link: -- test graph: if G[u][v] == 0, there is no edge between u and v G = { -- 1 2 3 4 5 6 { 0, 0, 13, 0, 16, 8 }, -- 1 { 0, 0, 0, 6, 0, 10 }, -- 2 { 13, 0
225. Re: Lua Basics: tables as lists? (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Tue, 23 Aug 2005 16:04:27 -0400
As another simple example of this -- that is, that intuition can be misleading -- consider the two functions below: function contains1 = function(t, x) for _,v in ipairs(t) do if v == x then return
226. RE: Concatenating strings with '+' (score: 18)
Author: Ignacio Burgueño <ignacio@...>
Date: Thu, 21 Jul 2005 10:40:23 -0300
Thank you very much for the patch. I forgot to mention that I'm working with 5.02, but anyway, is nice to know that 5.1 allows me to do that by means of metamethods. Regards, Ignacio
227. Re: Concatenating strings with '+' (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Thu, 21 Jul 2005 00:18:42 -0400
On Lua 5.1-work6, you can have a quick and dirty solution by simply providing a __add metamethod for strings: -- lstrlib.c.orig 2005-07-20 23:56:36.000000000 -0400 +++ lstrlib.c 2005-07-20 23:58:37.
228. [ANN] Numeric Lua 0.1 (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Tue, 19 Jul 2005 15:05:42 -0400
Ola', I'd like to announce the availability of Numeric Lua. Numeric Lua is a numerical (duh!) package for Lua. It includes support for complex numbers, multidimensional matrices, random number genera
229. Re: Lua reference manual in Vim (score: 18)
Author: "Aaron Brown" <aaron-lua@...>
Date: Wed, 1 Jun 2005 16:38:51 -0400
I'm using this now, and it's nice. Thank you. -- Aaron
230. Lua reference manual in Vim (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Thu, 26 May 2005 19:06:40 -0400
Hi, Just a quick announcement to those among us who are Vim users: I uploaded a Vim help file version of the Lua 5.0 reference manual to vim.org: http://www.vim.org/scripts/script.php?script_id=1291
231. Re: Some small requests for the next release (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Mon, 28 Feb 2005 12:14:00 -0500
<snip> If you really want math.nan (and math.inf, for that matter), you can define math.nan = 0/0 and math.inf = 1/0. But I think that math.isnan = function(x) return not (x==x) end math.isinf = func
232. Re: Module metatable (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Tue, 22 Feb 2005 10:54:59 -0500
Very reasonable. But the point is: who created the table first (and registered as global), ll_module or the module's luaL_openlib? Ah, so the rule is "only the package system should set the module's
233. Re: Module metatable (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Mon, 21 Feb 2005 14:43:18 -0500
That I understand; what I don't get is why this precludes a MT check. With respect to the module's MT, since in the initialization you only set a __index field, the assumption should be that the MT d
234. Module metatable (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Sun, 20 Feb 2005 22:54:59 -0500
Hi folks, In loadlib.c, ll_module attributes a new metatable to a module. Wouldn't it be nicer to check for a previously assigned MT first? -- loadlib.c.orig 2005-02-20 21:57:34.386838440 -0500 +++ l
235. Re: Lua 5.1w4 rearrangement (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Thu, 17 Feb 2005 13:34:55 -0500
Not to mention an almost one-time-only effort. I vote for the clearer, more versatile and powerful... _neat_ new layout. Cheers, Luis. -- A mathematician is a device for turning coffee into theorems.
236. Re: tonumber metamethod? (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Thu, 6 Jan 2005 23:02:25 -0500
Hi, First of all, sorry for the unacceptable long delay; I was still putting life back on tracks after a long holiday away from anything that resembles a computer. :) Nothing special: I was just curi
237. tonumber metamethod? (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Sun, 19 Dec 2004 19:43:17 -0500
Hi, I searched the lua-l archive, but couldn't find an answer to this: is there any particular reason why there is a tostring but not a tonumber metamethod? Cheers, Luis. -- A mathematician is a devi
238. Quick question about lua_Integer (was: Lua 5.1 (work3) now available) (score: 447)
Author: Luis Carvalho <carvalho@...>
Date: Mon, 6 Dec 2004 23:15:54 -0500
Quick question concerning luaconf.h: why is lua_Integer now set to ptrdiff_t -- and before LUA_INT32 -- instead of long? On a C99 compliant machine, lua_number2int uses lrint that returns long. Also
239. Re: Quick question about lua_Integer (was: Lua 5.1 (work3) now available) (score: 18)
Author: Mike Pall <mikelu-0412@...>
Date: Tue, 7 Dec 2004 06:42:10 +0100
Hi, 'lua_Integer' only affects four API functions. It does not affect the types inside the core. The intention behind the type definition is to offer an integer type with reasonable precision but wit
240. Re: Lua workshop (score: 61)
Author: Joseph Stewart <joseph.stewart@...>
Date: Thu, 18 Nov 2004 14:30:55 -0500
Hey, how about friendly Atlanta Georgia (?Lua in the Peach State... cool logos come to mind?)? I'd take y'all to a great "southern" cookin' place down here (or "up here", "over there" as appropriate

Search by Namazu v2.0.21