Re: [ANN] luajit language toolkit news

  • From: Daniel Kolesa <quaker66@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 19 Dec 2014 23:07:18 +0000

2014-12-19 22:52 GMT+00:00 Francesco Abbate <francesco.bbt@xxxxxxxxx>:
> Hi all,
>
> this is mainly un update about some improvements I've recently made in
> the 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.
>
> The parser generate an AST tree for the whole program and a separate
> bytecode genrator module emit the bytecode taking the AST tree as
> input. The purpose of the language toolkit is to provide a starting
> point to implement a programming language that target the LuaJIT
> virtual machine.
>
> The github page for the project is:
>
> https://github.com/franko/luajit-lang-toolkit
>
> Here the NEWS about the project.
>
> - the debug information included in the bytecode are now accurate and
> in most case identical to those generated by luajit itself
> - I've added a new option, -bx, to dump the bytecode with side-by-side
> annotations. This option is very useful to debug the generated
> bytecode and more generally to inspect any bytecode.
> - I have fixed a number of problems in the bytecode generator with the
> help of the author of OctaScript. The most important fix was a problem
> with base register operand in JUMP instructions.
> - I have added a "luajit-x" executable that works like the luajit
> executable but use the language toolkit toolchain to execute the code.
> The executable override also the standard package.loader and the
> functions loadstring, dofile and loadfile.
>
> The language toolkit was already using a test suite to verify the
> correctness of the generated bytecode. With the new changes the test
> suite was significantly enlarged to cover some corner cases and
> language features.
>
> As a result the language toolkit is now much more reliable and it can
> execute without problems even very complex projects. In particular the
> language toolkit is now able to execute itself so this is a sort of
> milestone.
>
> Yet the project should be still considered as beta quality so be
> careful if you decide to use it.
>
> As far as I know OctaScript is now based on the language toolkit but
> for the moment no other languages are using it. I'm personally
> planning to use the language toolkit in the next release of gsl shell.
>
> In any case, if you have always dreamed of changing the Lua language
> now you can and it is easy! :-)

Firstly, I would like to thank you for starting this project, it's
proved very helpful to me.

For everyone, I'm using source code from the toolkit for OctaScript,
already being used in production (roughly 20 KLOC of scripted code) in
a game engine - so far it's proved reliable (the initial stages were
painful because of bugs, but we managed to get rid of them). If anyone
is interested, here's the Github for the language:
https://github.com/OctaForge/OctaScript It can, just like
lj-lang-toolkit, be used as a reference when modifying Lua (it uses
its own approach @ parsing, AST and has its own generator of a sort -
doesn't reuse lj-lang-toolkit AST and generator module as-is). I would
say now is the time when the toolkit can be used rather safely without
a fear of bugs.

For Francesco, I'm planning to do more contributions into the language
toolkit in near time. Unfortunately I had to stop because of being
busy, but I will definitely continue syncing up some modifications
octascript contains into upstream.

>
> Francesco
>

Daniel

Other related posts:

  • » Re: [ANN] luajit language toolkit news - Daniel Kolesa