Lua Code Combine (LuaCC)

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Lua Code Combine (LuaCC)

Miha Cooper
Hello, everyone!

As a side project I have developed a very small tool to combine several Lua source file into single one. It helps me for delivering/deployment and I hope it will be helpful for you.

You take it here luarocks.org or here github.com.

Feel free to send feedback or proposals.

--
With best regards,
Kupriyanov Mikhail.
Reply | Threaded
Open this post in threaded view
|

Re: Lua Code Combine (LuaCC)

Pierre Chapuis
March 21, 2017 10:09 AM, "Miha Cooper" <[hidden email]> wrote:

> As a side project I have developed a very small tool to combine several Lua source file into single
> one. It helps me for delivering/deployment and I hope it will be helpful for you.

Hello Miha,

can you compare it to the various alternatives that exist such as
soar, which is the one I use myself? What does it do better or
differently?

--
Pierre

Reply | Threaded
Open this post in threaded view
|

Re: Lua Code Combine (LuaCC)

Miha Cooper
As for me it's just simpler than analogues with static analysis. It's a single file script, does not have any dependencies and platform specific things. There is no any trouble with dependency resolving as when I tried to use another tools with analysis. It's not better than other but solve very simple task in very simple way (as I think).

You just specify the source files and luacc will generate you a single one. When I faced with this simple task I didn't find something really simple to use that I can use in automatic way. Btw, I can rename it to Yet Another Lua Code Combiner =)

On 21 March 2017 at 12:27, Pierre Chapuis <[hidden email]> wrote:
March 21, 2017 10:09 AM, "Miha Cooper" <[hidden email]> wrote:

> As a side project I have developed a very small tool to combine several Lua source file into single
> one. It helps me for delivering/deployment and I hope it will be helpful for you.

Hello Miha,

can you compare it to the various alternatives that exist such as
soar, which is the one I use myself? What does it do better or
differently?

--
Pierre




--
With best regards,
Kupriyanov Mikhail.
Reply | Threaded
Open this post in threaded view
|

Re: Lua Code Combine (LuaCC)

aryajur


On Mar 21, 2017 04:08, "Miha Cooper" <[hidden email]> wrote:
As for me it's just simpler than analogues with static analysis. It's a single file script, does not have any dependencies and platform specific things. There is no any trouble with dependency resolving as when I tried to use another tools with analysis. It's not better than other but solve very simple task in very simple way (as I think).

You just specify the source files and luacc will generate you a single one. When I faced with this simple task I didn't find something really simple to use that I can use in automatic way. Btw, I can rename it to Yet Another Lua Code Combiner =)

On 21 March 2017 at 12:27, Pierre Chapuis <[hidden email]> wrote:
March 21, 2017 10:09 AM, "Miha Cooper" <[hidden email]> wrote:

> As a side project I have developed a very small tool to combine several Lua source file into single
> one. It helps me for delivering/deployment and I hope it will be helpful for you.

Hello Miha,

can you compare it to the various alternatives that exist such as
soar, which is the one I use myself? What does it do better or
differently?

--
Pierre




--
With best regards,
Kupriyanov Mikhail.

Hi Miha,
    I had created a similar single file script which I am using for my distributions. I had mentioned it here before. Here is the link once more if anyone is curious: 

Regards,
Milind
Reply | Threaded
Open this post in threaded view
|

Re: Lua Code Combine (LuaCC)

Pierre Chapuis
In reply to this post by Miha Cooper
March 21, 2017 12:08 PM, "Miha Cooper" <[hidden email]> wrote:

> As for me it's just simpler than analogues with static analysis. It's a single file script, does
> not have any dependencies and platform specific things. There is no any trouble with dependency
> resolving as when I tried to use another tools with analysis. It's not better than other but solve
> very simple task in very simple way (as I think).

You convinced me, so I switched one of my projects to use it.
Thank you for the tool, reinventing the wheel is worth it if it's a better wheel. :)

Reply | Threaded
Open this post in threaded view
|

Re: Lua Code Combine (LuaCC)

Miha Cooper
Thanks, I'm glad that it helps someone!

On 23 March 2017 at 19:41, Pierre Chapuis <[hidden email]> wrote:
March 21, 2017 12:08 PM, "Miha Cooper" <[hidden email]> wrote:

> As for me it's just simpler than analogues with static analysis. It's a single file script, does
> not have any dependencies and platform specific things. There is no any trouble with dependency
> resolving as when I tried to use another tools with analysis. It's not better than other but solve
> very simple task in very simple way (as I think).

You convinced me, so I switched one of my projects to use it.
Thank you for the tool, reinventing the wheel is worth it if it's a better wheel. :)




--
With best regards,
Kupriyanov Mikhail.
Reply | Threaded
Open this post in threaded view
|

Re: Lua Code Combine (LuaCC)

D. Matt Placek

I've only 7up u we lO lu loop on U.S.m unI ul Liu e had it JiMi jugular and 7ion on a hiring i

On Mar 23, 2017 2:29 PM, "Miha Cooper" <[hidden email]> wrote:
Thanks, I'm glad that it helps someone!

On 23 March 2017 at 19:41, Pierre Chapuis <[hidden email]> wrote:
March 21, 2017 12:08 PM, "Miha Cooper" <[hidden email]> wrote:

> As for me it's just simpler than analogues with static analysis. It's a single file script, does
> not have any dependencies and platform specific things. There is no any trouble with dependency
> resolving as when I tried to use another tools with analysis. It's not better than other but solve
> very simple task in very simple way (as I think).

You convinced me, so I switched one of my projects to use it.
Thank you for the tool, reinventing the wheel is worth it if it's a better wheel. :)




--
With best regards,
Kupriyanov Mikhail.
Reply | Threaded
Open this post in threaded view
|

Re: Lua Code Combine (LuaCC)

Rena
On Apr 2, 2017 8:28 AM, "D. Matt Placek" <[hidden email]> wrote:

I've only 7up u we lO lu loop on U.S.m unI ul Liu e had it JiMi jugular and 7ion on a hiring i

Are you OK?

Reply | Threaded
Open this post in threaded view
|

Re: Lua Code Combine (LuaCC)

D. Matt Placek


On Apr 2, 2017 11:02 AM, "Rena" <[hidden email]> wrote:
>
> On Apr 2, 2017 8:28 AM, "D. Matt Placek" <[hidden email]> wrote:
>>
>> I've only 7up u we lO lu loop on U.S.m unI ul Liu e had it JiMi jugular and 7ion on a hiring i
>
> Are you OK?

Hah, sorry, must have not locked the phone and it pocket responded.  Thanks for checking on me, though!

Reply | Threaded
Open this post in threaded view
|

what's soar really for? (was Re: Lua Code Combine (LuaCC))

Jay Carlson
In reply to this post by Miha Cooper
soar is intended to make it super-easy for people to ship Lua *language* libraries in their scripts and embeddings.

Historically, there was a tendency to consider DLLs written in C as the “real” extensions.[1] A directory tree of Lua modules can be hard to manage, compared to a DLL—especially on Windows. soar just gives you a way to simulate that library directory tree with a single loadstring/loadfile.

If your project has a hardcore build system, you could generate a manifest by hand, and just call the internal function soar() itself to write the archive. But if you care enough to manage Lua-language dependencies in build, you probably don’t need soar. (That’s me these days, usually. And thank god for /opt for quick deployments.) YALCC :-) is a less complex tool for build.

Game engines have their own internal filesystems or resource trees or whatever, so they’re going to be substituting their own loadfile()/require() through whatever mechanism they’re already using. Also not a target audience, although anybody can use the static analysis mode as a basic tree shaker[1], with all the fun that entails.

Things like Steve Donovan’s ldeb [2] is what soar is for—when upstream libraries don’t have a great deployment story on a particular OS, and you want to autogen something without much explicit help.

I don’t use Windows much. Are people using something to generate “penlight51.dll”, where the DLLs are largely filled with source/byte-compiled Lua? Luabuild should be hackable to do that, if anybody actually wanted to deploy their libraries that way.

--
Jay Carlson
[hidden email]

[1]: https://groups.google.com/d/msg/comp.lang.lisp/pspFr1XByZk/lswKHdWgmPEJ

[2]: https://github.com/stevedonovan/ldeb



signature.asc (465 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Lua Code Combine (LuaCC)

Pierre-Yves Gérardy
In reply to this post by D. Matt Placek
>>> I've only 7up u we lO lu loop on U.S.m unI ul Liu e had it JiMi jugular
>>> and 7ion on a hiring i
>>
>> Are you OK?
>
> Hah, sorry, must have not locked the phone and it pocket responded.  Thanks
> for checking on me, though!

That would make a fun TV game... Stroke or pocket?

Glad to know you're fine :-)

—Pierre-Yves

Reply | Threaded
Open this post in threaded view
|

Re: Lua Code Combine (LuaCC)

Valerio
In reply to this post by Miha Cooper
Hello,

You just specify the source files and luacc will generate you a single one. When I faced with this simple task I didn't find something really simple to use that I can use in automatic way. Btw, I can rename it to Yet Another Lua Code Combiner =)

What I would really like is a tool that transparently works for multi-file Lua programs for which the dependencies are either themselves Lua files or native (compiled) ones. 
Then, the tool would auto-magically take care of repacking (potentially, fetching the dependencies and recompiling them) everything as one single fat binary or a single fat Lua file. 
It could go even one step further, that is producing a single executable file which embeds the LuaVM itself, following the recent trend of unikernels.

I keep on dreaming :-)

 

On 21 March 2017 at 12:27, Pierre Chapuis <[hidden email]> wrote:
March 21, 2017 10:09 AM, "Miha Cooper" <[hidden email]> wrote:

> As a side project I have developed a very small tool to combine several Lua source file into single
> one. It helps me for delivering/deployment and I hope it will be helpful for you.

Hello Miha,

can you compare it to the various alternatives that exist such as
soar, which is the one I use myself? What does it do better or
differently?

--
Pierre




--
With best regards,
Kupriyanov Mikhail.

Reply | Threaded
Open this post in threaded view
|

Re: Lua Code Combine (LuaCC)

Eduardo Tongson
On Thu, Apr 6, 2017 at 8:09 AM, Valerio Schiavoni
<[hidden email]> wrote:

> Hello,
>>
>>
>> You just specify the source files and luacc will generate you a single
>> one. When I faced with this simple task I didn't find something really
>> simple to use that I can use in automatic way. Btw, I can rename it to Yet
>> Another Lua Code Combiner =)
>
>
> What I would really like is a tool that transparently works for multi-file
> Lua programs for which the dependencies are either themselves Lua files or
> native (compiled) ones.
> Then, the tool would auto-magically take care of repacking (potentially,
> fetching the dependencies and recompiling them) everything as one single fat
> binary or a single fat Lua file.
> It could go even one step further, that is producing a single executable
> file which embeds the LuaVM itself, following the recent trend of
> unikernels.
>
> I keep on dreaming :-)
>
>

Quite close:
https://github.com/tongson/omnia

Vendors instead of downloading dependencies. Lua 5.3 VM and
Linux/macOS support only though.

Best regards.

Reply | Threaded
Open this post in threaded view
|

Re: Lua Code Combine (LuaCC)

Philipp Janda
In reply to this post by Valerio
Am 06.04.2017 um 02:09 schröbte Valerio Schiavoni:
> Hello,
>

Hi!

>
> What I would really like is a tool that transparently works for multi-file
> Lua programs for which the dependencies are either themselves Lua files or
> native (compiled) ones.
> Then, the tool would auto-magically take care of repacking (potentially,
> fetching the dependencies and recompiling them) everything as one single
> fat binary or a single fat Lua file.

Single fat Lua file, as ordered (without the dependencies of C modules
though): https://github.com/siffiejoe/lua-amalg

> It could go even one step further, that is producing a single executable
> file which embeds the LuaVM itself, following the recent trend of
> unikernels.
>
> I keep on dreaming :-)
>

Philipp