Anupam Jain | 5 Oct 15:51 2012
Picon

ANNOUNCE: luachunk-0.1

Hi all,

I just released luachunk-0.1 on Hackage
(http://github.com/ajnsit/luachunk). Luachunk is a small library to
read and write Lua 5.1 bytecode chunks. It is modeled after
ChunkSpy.lua (http://luaforge.net/projects/chunkspy/) though the code
is written from scratch. A pretty listing printer for lua bytecode is
in the works.

I used LuaChunk in a project to generate Lua bytecode via a DSL, and
then interpret it with HsLua. I hope to release the DSL itself
sometime in the future.

-- Anupam
Kristopher Micinski | 8 Oct 03:18 2012
Picon

Re: ANNOUNCE: luachunk-0.1

Oh, this is nice, we have our undergrads implement a compiler to Lua
bytecode as part of their term projects, and currently use a homebrew
OCaml package.  This seems to be pretty complete, however, and it
would be interesting for me to reimplement some stuff with this..

Unfortunately the Lua bytecode isn't really documented or intended to
be generated, meaning that you essentially have to reverse engineer
it.  (Maybe not "unfortunately;" it's not meant to be used like that,
but unfortunately for people looking to find projects to assign
people...)

kris

On Fri, Oct 5, 2012 at 9:51 AM, Anupam Jain <ajnsit <at> gmail.com> wrote:
> Hi all,
>
> I just released luachunk-0.1 on Hackage
> (http://github.com/ajnsit/luachunk). Luachunk is a small library to
> read and write Lua 5.1 bytecode chunks. It is modeled after
> ChunkSpy.lua (http://luaforge.net/projects/chunkspy/) though the code
> is written from scratch. A pretty listing printer for lua bytecode is
> in the works.
>
> I used LuaChunk in a project to generate Lua bytecode via a DSL, and
> then interpret it with HsLua. I hope to release the DSL itself
> sometime in the future.
>
> -- Anupam
>
> _______________________________________________
(Continue reading)

Anupam Jain | 10 Oct 12:48 2012
Picon

Re: ANNOUNCE: luachunk-0.1

On Mon, Oct 8, 2012 at 6:48 AM, Kristopher Micinski
<krismicinski <at> gmail.com> wrote:
> Oh, this is nice, we have our undergrads implement a compiler to Lua
> bytecode as part of their term projects, and currently use a homebrew
> OCaml package.  This seems to be pretty complete, however, and it
> would be interesting for me to reimplement some stuff with this..

Please do! It would be great to have some real world testing.

>
> Unfortunately the Lua bytecode isn't really documented or intended to
> be generated, meaning that you essentially have to reverse engineer
> it.  (Maybe not "unfortunately;" it's not meant to be used like that,
> but unfortunately for people looking to find projects to assign
> people...)

I used the excellent "A No-Frills Introduction to Lua 5.1 VM
Instructions" (http://scholar.google.com/scholar?cluster=14039839166840129336).
Highly recommended to get a quick overview of the entire bytecode format.

-- Anupam
Kristopher Micinski | 10 Oct 22:03 2012
Picon

Re: ANNOUNCE: luachunk-0.1

On Wed, Oct 10, 2012 at 6:48 AM, Anupam Jain <ajnsit <at> gmail.com> wrote:
> I used the excellent "A No-Frills Introduction to Lua 5.1 VM
> Instructions" (http://scholar.google.com/scholar?cluster=14039839166840129336).
> Highly recommended to get a quick overview of the entire bytecode format.
>

FYI this is we hand out to our students as well,!,

kris

Gmane