lua-users home
lua-l archive

Search lua-l

This index contains 143,604 documents and 1,774,497 keywords. Last update on 2023-03-08 .

Query: [How to search]

Display: Description: Sort by:

Results:

References: [ lua (Too many documents hit. Ignored) ] [ array: 5396 ] [ indexing: 1373 ]

Total 296 documents matching your query.

81. Re: luajit: any way to make array initialization zero-based? (score: 159)
Author: Dimiter 'malkia' Stanev <malkia@...>
Date: Wed, 13 Jun 2012 19:47:37 -0700
How about this workaround (ugly, but still could work): local ffi = require( "ffi" ) ffi.cdef[[ typedef struct vec3 { float x, y, z; } vec3; ]] local a = ffi.new( "vec3[?]", 1024 + 1 ) local b = ffi.
82. Re: luajit: any way to make array initialization zero-based? (score: 159)
Author: Chris <coderight@...>
Date: Wed, 13 Jun 2012 19:09:56 -0400
Because wrapping every single FFI data access call has a significant performance hit when working with very large datasets. CR
83. Re: luajit: any way to make array initialization zero-based? (score: 159)
Author: Chris <coderight@...>
Date: Wed, 13 Jun 2012 19:07:28 -0400
It's much more complicated than that. Often it's hard to tell what is FFI and what is regular Lua. There is not always a clear separation because usually a combination of FFI and Lua types are used a
84. Re: luajit: any way to make array initialization zero-based? (score: 159)
Author: Vadim Peretokin <vperetokin@...>
Date: Thu, 14 Jun 2012 09:06:26 +1000
Why are end-users caring about 0 indexing? The API presented to them should be counting from 1, as Lua has it, which is natural and not confusing.
85. Re: array indices in lua (score: 159)
Author: Jerome Vuarand <jerome.vuarand@...>
Date: Mon, 30 Nov 2009 14:22:35 +0100
2009/11/30 cynthia powers <powcyn@gmail.com>: It all depends on the Lua code you want to preserve. If it uses ipairs only to iterate over arrays, you can override it. However if it uses Even if you d
86. RE: How do I get two dimensional array access notation for my(matrix) userdata? (score: 159)
Author: "Jan de Vos" <Jan.de.Vos@...>
Date: Tue, 29 Jul 2008 08:02:09 +0200
Unless you have an __index metamethod that interprets the /contents/ of the key that was given (of course, creating syntax sugar in the Language just for cases where you have such a metamethod would
87. Re: lua.stackexchange.com? (score: 138)
Author: Paul Hudson <phudson@...>
Date: Sun, 28 Apr 2013 21:37:12 +0100
Compare:  https://www.google.co.uk/search?aq=f&q=lua+array+indexing http://stackoverflow.com/search?q=lua+array+indexing http://lua-users.org/cgi-bin/namazu.cgi?query=lua+array+indexing&idxname=lua-l
88. Re: A proposal for the confusing pseudo table ? array concept (score: 131)
Author: Elias Hogstvedt <eliashogstvedt@...>
Date: Sun, 21 Jan 2018 11:33:19 +0100
I don?t get it. Where?s the ambiguity in e. g. { 1, 2, 3, type = ?int16? } ? I would say it's ambiguous because I'm not sure if this is "safe" to do. I've personally never done this and would put a n
89. Re: A proposal for the confusing pseudo table ? array concept (score: 116)
Author: Petri Häkkinen <petrih3@...>
Date: Sun, 21 Jan 2018 10:43:12 +0200
On 20 Jan 2018, at 13.41, Elias Hogstvedt <eliashogstvedt@gmail.com> wrote: > - more complex C bindings, most C modules should work with both tables and arrays for conveniency? If you're pushing a li
90. C arrays as Lua tables (score: 114)
Author: Dimitris Papavasiliou <dpapavas@...>
Date: Sun, 26 Feb 2012 01:18:19 +0200
Hello all, The attached archive contains a first version of a module that essentially serves as a bridge between Lua and C arrays by exposing C arrays (of all types) to Lua as tables with suitable in

Search by Namazu v2.0.21