0
Imitating python is easy peasy thanks to metatables. What’s better, even primitives have metatables, albeit some may consider using these types of code as a gross violation of all that Lua stands for (oh come on, do you have to be so dramatic all of a sudden?). To them I... Continue Reading
0
Registries are damned evil, but Lua is good, so when you combine the two, they sort of cancel each other out into mediocrecy. In lieu of I’m-getting-too-lazy-this-summer-to-do-anything-useful, here’s some mediocre code.
Example:
code excluded in excerpt
Note: this code currently only supports reading, stay tuned for updates.
Compilation step using mingw
code excluded in excerpt
Where... Continue Reading
0
Hey, looks like my freshman year CS class paid off, I can now adequately draw dick whales.
Anyways, back to priority queues; this is an example showcasing how to initialize and use a priority queue:
code excluded in excerpt
API:
function pqueue([cmp], [initial])
cmp: The comparison function, which takes two parameters a and b and... Continue Reading
0
Storing a table using its corresponding lua code seems like an elegant idea, but there are a few kinks with the original code.
First of all, self referencing tables will cause the serialization function to break because there are no easy ways of referencing something before its own declaration. I mean,... Continue Reading

Comments