News for hackers. Stuff that matters.
Re:Why nobody talks about Lua by nitrogen on Thursday February 11, 2010 @07:42PM (#1119264)
I like Lua as a language. I especially like how easy it is to embed it into another program. I'll be using Lua for scripting my current project. The only thing I really don't like about it is that it treats all numbers as double-precision floats. It can be compiled to use 32-bit ints instead, but I'd really like to have access to both, especially since floating point arithmetic is insanely slow on embedded processors without an FPU, but sometimes I really need it.
Re:Why nobody talks about Lua by derefr on Thursday February 11, 2010 @09:17PM (#1119525)
If the processor doesn't have an FPU, there's not much of an extra disadvantage to compiling with int32s and then making reals just another data structure, implemented in terms of ints, with a library to manipulate them.
Re:Why nobody talks about Lua by fab13n on Monday February 15, 2010 @09:20AM (#1126582)
You'd lose the syntax for real literals, though.

And although you're technically true, the lack of a library implementing reals as userdata let me guess that few people have found this approach practical. Unless I missed it?

I guess people just use the LNUM patch.

Re:Why nobody talks about Lua by agladysh on Friday February 12, 2010 @02:31AM (#1120011)
Consider using LNUM patch then.
Re:Why nobody talks about Lua by nitrogen on Friday February 12, 2010 @02:24PM (#1121493)
Thanks, LNUM looks like it'll do just what I wanted.