Thanks, Britton
And then the question you did not ask: Do you think it is a good idea to compile an OpenGL application to JavaScript?
I don't see a problem with compiling an OGL app to javascript. Games are soft real time, it's not like a GC hitch will kill someone. So that really depends on the complexity of your game.
For the database thing I managed to cook up a primitive ORMish thing in a weekend (it works kinda like SqlAlchemy's core module). What I did was made an untyped macro that would parse a statement such as: select(col: seq[string], another: int) from table_name and generate a real sql query and the appropriate tuple type to return.
How much hassle to target both OpenGL on desktop and WebGL? Can nim help target both in any way or is going through WebGL going to negate all advantages of being able to target both C and JS?
That is exactly what nimx does. There's a tiny porting layer in portable_gl.nim. Truth be told though that asm.js is a better alternative for heavier apps, and that is why nimx supports emscripten target as well.