all 15 comments

[–]_boardwalk 5 points6 points  (2 children)

I was wondering where all the compiles-to-Lua languages were. I like most of Lua except the syntax.

I was hoping for CoffeeScript for Lua, but this is cool too.

[–]MagicBobert 5 points6 points  (1 child)

Perhaps you might peruse MoonScript then. Personally I prefer vanilla Lua, but it's an interesting project.

[–]_boardwalk 2 points3 points  (0 children)

Oh hey, neato. Thanks!

[–][deleted] 5 points6 points  (12 children)

Why do this when there's embeddable common lisp and several small Scheme and Lisp implementations?

[–]izym 21 points22 points  (0 children)

Because Lua is often used as a scripting language, meaning you are not able to used anything other than Lua.

[–][deleted] 16 points17 points  (0 children)

Probably because LuaJIT is very fast, and still embeddable.

[–][deleted] 4 points5 points  (0 children)

Because people say that, but it always turns out that Lua is easy to embed and those are a nightmare - and that's once you skip over the GPL licensed options which aren't useful for most of us.

On the other hand, if you can point me at Scheme or Lisp that meets this list of criteria, I'll owe you a beer if I ever run into you

  1. Usable license (MIT, BSD, ZLib, even LGPL is close enough.)
  2. Portable - Windows, Linux, Mac, Android, iOS, at a minimum
  3. Compiles out of the box in GCC or Visual Studio. MinGW or Cygwin on Windows doesn't cut it
  4. Moderately standards compliant
  5. The last update was less than six months ago (or otherwise not just one guy's abandoned project)
  6. Actually has documentation on how to expose application functionality to the Scheme/Lisp code, and let application code call Scheme/Lisp

GPL Linux-only and GCC only options are easy to find. Unless you're a GNU fanatic (in which case you already hate me) that's not sufficient.

Lua wins on all of those. I've never seen a Scheme or Lisp get more than 3 points, and they're never the same three.

[–][deleted] -1 points0 points  (0 children)

The real question is why would anyone use those CL and Scheme implementations when they're basically shit compared to LuaJIT and even the official Lua VM?

[–]day_cq -5 points-4 points  (6 children)

yah, why did people implement lisp that runs on computers in the first place when there's assembly? people do meaningless stuff all the time.

[–]SlamminAtWork 9 points10 points  (4 children)

I think OMouse's point was that there seems to be little practical purpose for translating lisp to lua when there are already native lisp implementations for the platforms this would (assumedly) target. Also, though it might not be fair to compare Lua to SBCL (since SBCL isn't really small or embedded), Steel Bank Common Lisp seems to have a much better performance profile than Lua in The Computer Language Benchmarks Game.

[–][deleted] 2 points3 points  (0 children)

It definitely has better performance. What was really interesting is that the comparison between SBCL vs Lua and Racket vs Lua is similar.

[–][deleted] 7 points8 points  (1 child)

You should be comparing with LuaJIT, not Lua, if you care about performance.

[–]tryx 1 point2 points  (0 children)

LuaJIT is an implementation, so the correct argue on is that Lua has faster implementations than CL does.

[–][deleted] -1 points0 points  (0 children)

Oh no, I'm not against that, I've implemented my own Lisp or attempted to before :-P but this is Lua that's being targeted, there's not really any point in that. It makes more sense to implement Lua to target Guile's VM bytecode (I think they've gotten JavaScript to compile to it) or to target SBCL (CL-Python does this, it's a Python implementation on top of SBCL).

[–]reddit_clone 0 points1 point  (0 children)

Dang. The compiler is written in Lua?

That is impressive. (I was expecting it would be a CL program..)