Thanks, it’s the ‘require “sockets”’ statement which causes a crash. Seems you have Lua installed on this OSX box and loading the socket module crashes badly for whatever reason. Will check why exactly it crashes, but in general we can not do much here, can’t guarantee that loading external Lua C modules never crashes.
I tried the same thing with Renoise 2.8 and the problem does not arise, then the Essai.lua script works fine. So, there has been something new in the upgrade to version 3 at this level. Hope it will help you.