News for hackers. Stuff that matters.
Re:Lua vs Ruby benchmarks (similarly "high-level" languages,... by ralph on Saturday February 07, 2009 @12:46PM (#471291)
The last element of an array is foo[-1] regardless of it's length. :-) And try implementing a circular buffer using an array of N elements with 1-based indexing and then 0-based. Sorry in advance for the loss of hair due to the former.
Re:Lua vs Ruby benchmarks (similarly "high-level" languages,... by tokipin on Saturday February 07, 2009 @07:01PM (#471606)
you mean like array[mod(i, length) + 1]