A Look at the Design of Lua

lua
#1

Lua is the other language created by Brazilians that is relatively famous. Communications of the ACM has a new article by Lua creators (right now it is offline but it will probably be back soon):

https://m-cacm.acm.org/magazines/2018/11/232214-a-look-at-the-design-of-lua/fulltext

They also went to Rio de Janeiro to interview Roberto Ierusalimschy, one of the co-creators:

9 Likes
#2

If you are interested in Lua and running it together with erlang/elixir then there are a number of ways of doing this. One which I find very interesting is to use Luerl. :wink: It is an implementation of Lua in erlang done by yours truly. This gives you a very tight interaction.

17 Likes
#3

Great, Robert! I had read about Luerl some time ago.

Doing a little bit of research, I can see that the Lua Community knows Luerl. It was presented at the Lua Workshop in 2012 by Henning Diedrich https://www.lua.org/wshop12.html and by you in 2015 https://www.lua.org/wshop15.html#Virding

Slides


and
video of that talk are available:

2 Likes
#4

I like Lua. For an imperative language at least. :wink: The article about the the design of Lua was very interesting. One thing I really liked about the language was that they managed to come up with a minimal set of properties which are very powerful and can be used in many ways different ways. For example it is not an OO language but using the meta-tables you can build objects, classes and class hierarchies.

Another thing which really appeals to me is that have managed to avoid adding new features and keep the language small. That is difficult because the pressure you get can be very strong. The major feature added in 5.3 was integers so that there are now floats and integers, and that is a big change for them. :smile:

7 Likes
#5

FWIW, I also made a lua implementation in Elixir. Well kind of. Its a poorly constructed NIF.

2 Likes
#6

Interesting. How do you handle thread safety? IIRC the standard Lua implementation isn’t thread-safe.

2 Likes
#7

I’ve not tested this very much at all, but the lua state is just a single structure that one can apply functions to, so i don’t know that threading is too much of a problem?

2 Likes
#8

I suppose it actually is possible for two processes to have the same ref to the lua state. This is not something i even considered when slapping this together.

2 Likes
#9

Hi @rvirding… I’ve been casually following Luerl for some time now. Luerl has been and still is the primary candidate that I have for runtime evaluated dynamic scripting in a system that I’m building and, while I think it’s not a complete fit for my need, I don’t yet think the mismatches present unsolvable problems. I’m not to that part of the implementation yet, so that may still change, but for now it still looks good.

However what I’ve not got a sense of is who’s using Luerl? How it’s being used, etc. and I was wondering if you had a sense of how/where it’s being used? Is it “production ready” (whatever that really means) and is it being used in products/business systems or is it mostly a hobbist/personal project sort of tool? The project I’m working on is a professional project, so some of those kinds of questions are things I need to think through before I finally commit; there’s a risk equation there and I want to understand the variables.

2 Likes
#10

@rvirding announced that he will work on upgrading luaer from 5.2 to 5.3.

I wonder how Lua is suitable to make low level/embedded orchestration where Erlang used to excel, something similar to the first use case of Erlang on AXD301. I have read some cases of it be used on network equipment and thinks like that.

Another great project that employs Lua is the whitecatboard

4 Likes