lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I still don't really get it. It sounds useful, but I don't quite understand
> why I might want to use it. What's a good use case for this?

Silly, it never occurred to me to present it in terms of use cases,
that's a good heads-up, thank you.

First of all, luapower is a repository of Lua modules, many of which
(most?) are my own, so it's a place to publish those, for whatever
they are worth, independently of whether luapower has any value or
not.

Then there's luapower as a platform for publishing Lua modules in a
way that gives the users of those modules an integrated way for
_choosing_ (see package table), _downloading_ (see download buttons on
every page), cross-referencing dependencies (see dependency lists on
every page), quickly navigating the API refs of those modules, and on
top of that a git workflow for building apps (the use case below).

Below is my general use case, and maybe you can share your use case -
how do you develop Lua apps? How do you _find_, _choose_, _build_,
_install_ the various Lua modules and libraries that go into your app?
What steps are needed to deploy the app after you developed it? How do
you keep those modules up-to-date? How do you use their documentation?
eg. do you view it online? have a list of bookmarks for the pages that
matter (i.e. API ref docs) ? or do you read it offline in your code
editor maybe? How easy it is to find/browse reference API docs?
Luapower is an attempt at answering these questions.

USE CASE

Let's say I want do make a Lua app, which is composed of the
lua/luajit binary, other people's Lua modules and C libraries, my own
shared modules (that I use for multiple projects), and finally the app
modules themselves.

How do I create a "workspace" environment for that, as fast as
possible, so I can start coding on my app? This means bringing all
that code in, everything in its place so that lua/jit can find it,
binaries compiled, and my app and module files under git. Ideally, my
app would be in its own repo and my share modules in theirs (chances
are I would continue to develop my modules while developing the app so
I don't want to get out of the sights of git - I want to push back
changes to the respective remotes). Even more ideally, other people's
modules would keep being under git, so I can pull for updates.

With luapower it goes like this:

git clone ssh://git@github.com/luapower/luapower-git myapp
cd myapp
clone luajit
clone lanes
clone ...
clone mymodule ssh://mymodule-git-url
clone myapp ssh://myapp-git-url
luajit myapp.lua <- up and running, on any platform

Pushing at the end of the day:

proj myapp
git add/commit/push
proj mymodule
git add/commit/push

Keeping other people's packages up to date in my tree:
proj lanes
git pull <- git just did the job of a package manager

(as for deployment - there are many scenarios and this email is
already too long)

Hope this clears things up a bit, and thanks for the feedback.