Search lua-l
This index contains 143,604 documents and
1,774,497 keywords. Last update on
2023-03-08 .
- 61. luajit: any way to make array initialization zero-based? (score: 171)
- Author: Chris <coderight@...>
- Date: Wed, 13 Jun 2012 18:07:47 -0400
- In LuaJIT there is no penalty for using zero-based indexing, it's even recommended but the problem is that the Lua tables (non-FFI) are not by default zero-based. For example: foo = { 0, 1, 2, 3 } Yo
- 62. Re: Quest: real world "Lua array with holes" usage (score: 168)
- Author: Tim Hill <drtimhill@...>
- Date: Thu, 21 Jul 2016 16:54:57 -0700
- But that would still leave the general case of {f()} unsolved :( ?Tim
- 63. Re: Quest: real world "Lua array with holes" usage (score: 168)
- Author: Daurnimator <quae@...>
- Date: Thu, 21 Jul 2016 10:42:44 -0700
- The place it usually comes up for me is when keeping arguments across a callback-style api: local function foo(...) local args = {...} do_something_async(function() -- called when done my_other_funct
- 64. Re: Quest: real world "Lua array with holes" usage (score: 168)
- Author: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 21 Jul 2016 14:09:31 -0300
- The only real-world case that bothers me is when you want to collect all the results from a function call, something like {f()}. If there is an error, the standard protocol is to return (nil, msg),
- 65. Quest: real world "Lua array with holes" usage (score: 168)
- Author: Rodrigo Azevedo <rodrigoams@...>
- Date: Thu, 21 Jul 2016 12:13:40 -0300
- In face of recent (long) discussion about "Lua arrays", I would request a simple few lines of real world examples where the use of "Lua arrays with holes" is significant. I known that, intuitively, t
- 66. Re: Extending array types in Ravi (score: 168)
- Author: Dibyendu Majumdar <mobile@...>
- Date: Wed, 4 Nov 2015 21:12:45 +0000
- BTW the cost compared to inline access is significant: 1) First luaV_gettable() is called. 2) This executes a loop. 3) Next check that the variable is a table. 4) If so call luaH_get(). 5) luaH_get()
- 67. Re: Extending array types in Ravi (score: 168)
- Author: Dibyendu Majumdar <mobile@...>
- Date: Wed, 4 Nov 2015 21:08:42 +0000
- The main idea is to be able to inline the code generated for GETTABLE and possibly SETTABLE. To do this the parser needs to know that the indexing is being done on a table, and the index is an intege
- 68. RE: tables as array : little confirmation (score: 168)
- Author: Thijs Schreijer <thijs@...>
- Date: Thu, 27 Mar 2014 16:43:44 +0000
- Are you sure? Basic_table only contains one entry with key "k" here. str = table.concat(basic_table["k"],",") would make sense here Yes. That is how basic string buffers are used in Lua to do only a
- 69. Re: Empty? No. Array? No. Has? Yes. (score: 168)
- Author: Tim Hill <drtimhill@...>
- Date: Fri, 5 Jul 2013 14:48:50 -0700
- So getting back to my 3 questions? 1. Is there a need for an "empty" element within an array (where "empty" as a concept is tbd)? 2. Assuming #1 is "yes", would this be useful as a standardized techn
- 70. Re: array index and modulo (score: 168)
- Author: David Kastrup <dak@...>
- Date: Fri, 30 Mar 2007 15:14:42 +0200
- Stupid question: given the simplicity of zero-based index calculations, what was the design criterion behind starting the vectors at 1? @[6,4,3] is indexed starting from one, so 1 probably has some n
Search by
Namazu v2.0.21