brozula icon indicating copy to clipboard operation
brozula copied to clipboard

`-p` option doesn't print the source code

Open graue opened this issue 12 years ago • 4 comments

Hi, I'm getting some weird results with the -p option:

$ cat foobar.lua 
print "foobar"
$ ./cli.js foobar.lua 
foobar
$ ./cli.js -p foobar.lua 
[ { index: 0,
    flags: 2,
    numparams: 0,
    framesize: 2,
    bcins: 
    [ { op: 'GGET', args: [Object] },
    { op: 'KSTR', args: [Object] },
    { op: 'CALL', args: [Object] },
    { op: 'RET0', args: [Object] } ],
    uvdata: [] } ]

This is with node 0.10.1. I'm digging around to try to figure out what's going on...

graue avatar Apr 15 '13 04:04 graue

Brozula is not in a good state at the moment. If I remember right, the -p option didn't print the lua source, but rather the parsed bytecode tree. (brozula never did and probably never will include a lua -> bytecode compiler)

creationix avatar Apr 15 '13 14:04 creationix

By "not a good state" I mean I had to stop development to work on paying work. There wasn't a lot of interest in brozula, so I put it on the backburner. If that changes and there is sufficient interest and/or sponsorship, then I can work on it again.

creationix avatar Apr 15 '13 14:04 creationix

Okay, good to know some weird results aren't totally unexpected... I'm still trying to get the browser example to work as well. I'm interested in this project as a way to bring my audio framework in Lua to the browser. If I make any significant progress I'll submit a PR.

graue avatar Apr 15 '13 15:04 graue

Did you try an emscripten-based solution?

agladysh avatar Apr 15 '13 15:04 agladysh