News for hackers. Stuff that matters.
Re:Terra: A low-level counterpart to Lua by pathsjs on Tuesday December 01, 2015 @05:28PM (#10659372)
For instance, interfacing with c in factor works like this. You have an internal dsl that allows you to express what the signature of a c function is. It is designed to look like a function declaration in c, but it is actually valid factor. And... that's it! You can now call that function, and some meta programming drives from that pseudo signature all the information to translate values back and forth
Re:Terra: A low-level counterpart to Lua by sitkack on Tuesday December 01, 2015 @06:23PM (#10659683)
LuaJIT has http://luajit.org/ext_ffi.html and Python has https://cffi.readthedocs.org/en/latest/ modeled after LuaJIT. The API for Lua is very clean for being magic free, something that cannot be said for the CPython API.