Hacker News new | past | comments | ask | show | jobs | submit login
LuaJIT Language Toolkit (github.com/franko)
68 points by ihnorton on Dec 20, 2014 | hide | past | favorite | 15 comments



Related mailing list post: http://www.freelists.org/post/luajit/luajit-language-toolkit...

"For those who doesn't know about the project, the LuaJIT Language Toolkit is an implementation of the Lua programming language written in Lua iself. It works by generating a LuaJIT's bytecode including the debug informations and use the LuaJIT's virtual machine to run the generated bytecode."


This is like a Christmas present. I needed this tool badly enough that I've been reading the LuaJIT source code and mulling over just what it would take to write it.


This is indeed really great. I love targeting LuaJIT with toy languages, and this is more direct than compiling to Lua.


I love the idea of this project, but as even Mike Pall has mentioned the "proper" way to do this is to target Lua code directly. LuaJIT is designed to speedup Lua, not LJ bytecode.


Could I see a reference? I've been reading a lot of Mike Pall lately and this is relevant to my interests.


I looked on http://www.freelists.org/archive/luajit/ and http://lua-users.org/lists/lua-l/ and couldn't find a smoking gun.

The closest thing is this http://www.reddit.com/r/programming/comments/1r2s82/lua_fun_...

Where someone else http://rtsisyk.github.io/luafun/intro.html attempts to generate LuaJIT bytecode directly and tracing JIT doesn't speedup their code because LuaJIT isn't designed to speedup arbitrary bytecode but bytecode generated by the LuaJIT compiler.

There was still a more specific post that I am unable to locate where Mike specifically warned against targeting LuaJIT bytecode. I'd probably just post a message on the luajit list if you want clarification.


> There was still a more specific post that I am unable to locate

This one? http://www.reddit.com/r/programming/comments/badl2/luajit_2_...


Close.


Just checked out your github page, you are like my brother from another mother. If I am in Berkeley I will drop you a line and we can code on some Forth JITs in Lua.


You read my mind!

Ok, you read my github ;-) But yes! Lua has multiple returns, we can perform 'register allocation' and spill over onto locals. Stack? Hah.


If you find this interesting, I'll recommend you also give a good, hard look at http://terralang.org


Wow, perfect timing; this is very close to what my 12yo son is working on but with rust/LLVM (and his own lang).

He has his lexer done and is using a Pratt Parser (TDOP) strategy. This might give him some ideas.


If that is true, you should ask your son to do some sort of write up on what he has learned. Anyone with serious technical skill but not the overhead of worrying about what they 'should' know is great to read. There are a lot of insights from someone without the cruft of conventional wisdom.


This is the best news I've seen on here in months! Alright, anybody working on a Clojure with a LuaJIT backend? If not, we should get started :)


You should definitely check out Pixie: https://github.com/pixie-lang/pixie




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: