Re:Lua Doesn't Suck – Strange Loop 2010 20-minute talk video
by silentbicycle on Sunday October 17, 2010 @02:19PM
(#1800984)
Lua "strings" are raw byte arrays with a saved length. You can store JPEG data in Lua strings. Storing Mongolian is not a big deal. You'll need a lib to e.g. calculate UTF-8 lengths, but all that needs to happen is the Lua community (or a project's company) agreeing on a specific Unicode library. There are no technical limitations there.
[ Parent
| on HN ]
Re:Lua Doesn't Suck – Strange Loop 2010 20-minute talk video
by SeanLuke on Sunday October 17, 2010 @04:18PM
(#1801301)
> Storing Mongolian is not a big deal.
...
> You'll need a lib to e.g. calculate UTF-8 lengths,
...
> There are no technical limitations there.
You cannot be seriously making this argument. Why not just code everything in assembly?
Re:Lua Doesn't Suck – Strange Loop 2010 20-minute talk video
by silentbicycle on Sunday October 17, 2010 @06:27PM
(#1801614)
I understand it's annoying that Lua doesn't have a a single, officially recommended Unicode library* (in the core distribution or otherwise), but as problems go, it's easily solved by loading an existing, freely available library and getting on with life. It's much less trouble than (say) removing the GIL from Python or retroactively fixing weird operator precendence in C.
* Though there are recommendations at http://lua-users.org/wiki/LuaUnicode .
In practice, it could look like this:
U = require "unicode"
s = U"some unicode" -- using a library sure is hard
length = s:len()
replaced = s:gsub("thing1", "thing2") -- global substitute
etc.
You can add regular expressions and bignums to Lua pretty painlessly, too.
Re:Lua Doesn't Suck – Strange Loop 2010 20-minute talk video
by indigoviolet on Sunday October 17, 2010 @07:24PM
(#1801728)
Agreed; only, the fact that no one has done it conclusively so far says to me that the Lua community isn't/hasn't been thinking about these sorts of things, and makes me worry about the other holes I will encounter if I do delve into the language. I'd rather invest my time and energy into learning how to use Cython to speed up Python, or Clojure to make Java more fun.