Hi bros ! Today, we will print ‘Hi bro, watsup ?’ in the coolest scripting language ever, Lua.

Firstly, we have to install Lua.

We’ll easily install lua with yay on Arch btw:

1
$ yay -S lua

You can install luajit if you want even more speed.

After that, open vim, nvim or really any other text editor and start cooking:

1
$ vim hi.lua
1
2
-- this can't be more easy
print('Hi bro, watsup ?')

Finallly, run your code with the Lua interpeter:

1
2
$ lua hi.lua
$ Hi bro, watsup ?

Thank you for your time !

Extra

To see if LuaJit is really faster, let’s compare the time it takes to run the script with Lua and LuaJit. The following table shows the output of the time command when running the script with Lua and LuaJit.

LuaLuaJit
execution time0.00s user 0.00s system 5% cpu 0.110 total0.00s user 0.00s system 5% cpu 0.076 total

As we can see, the script is run way faster with LuaJit.