Re: Re: [code] [textadept] I want to contribute

From: code <code.att.baez.nyc>
Date: Tue, 03 Mar 2015 23:15:44 -0500

Hey Robert,

On 03/03/2015 05:03 PM, Robert Gieseke wrote:
>
> Since Luarocks is mostly Lua this might be possible and has been
> discussed before on lua-l[1]. What works right now is just using
> Luarocks to install modules into a place where Textadept can find it.
>
> luarocks --tree=$HOME/.textadept/rocks install dkjson
>
> In my init.lua I have to update the package path,
>
> package.path = table.concat({
> package.path,
> -- taking LUAPATH from `luarocks --tree=$HOME/.textadept/rocks path` here,
> '[snip]'
> }, ';');
>
> And then I have a JSON module in Textadept:
>
> keys.c1 = function()
> local json = require("dkjson")
> local tbl = {
> animals = { "dog", "cat", "aardvark" },
> instruments = { "violin", "trombone", "theremin" },
> bugs = json.null,
> trees = nil
> }
>
> local str = json.encode (tbl, { indent = true })
> ui.dialogs.msgbox{text=str}
> end
>
> It's also possible to specify the Lua version, e.g. `--lua-version=5.2`.
> There might be problems with modules that need 5.1 compatibility since
> Textadept has some compat flags disabled.
>
> On OS X Luarocks packages are installed as x86_64 and textadept is i386
> so compiled packages like Luasocket don't work but there might be a
> workaround for this.
>
> In general, as far as I understand, anyone can upload packages to
> https://rocks.moonscript.org/ so this might be a possibility to
> distribute Textadept packages.
>
> Cheers,
> Robert
>
>
> [1] http://lua-users.org/lists/lua-l/2013-02/msg00339.htm

I think you're speaking about adding rocks into textadept through
luarocks, correct? Unless I interpreted it wrong, Mitchell was speaking
about getting a package manager as in something like [package
control](https://packagecontrol.io/) for Sublime Text or
[Vundle](https://github.com/gmarik/Vundle.vim) for vim. Basically using
something out of luarocks' structure to have internal builds of
plugins/modules directly on Textadept.

Example in say a Vundle like package manager for textadept:

``` init.lua
ta_module("rgieseke/textadept-go") -- would pull directly to modules/go
ta_module("jugglerchris/textadept-vi") -- to modules/vi
ta_module("abaez/ta-hastebin") -- to modules/hastebin
```
This type of package manager would use the source directly for
interpolation on textadept. I can see it being not too challenging to
implement, if we went this route. Though I think personally, I would
want something like package control from Sublime Text. We would have
direct installation from a custom `rocks` build (an `adept` if you will
:P) from our own luarocks configuration, which would add the
plugins/modules. The downside here is we may have to host it ourselves
(our own moonrocks like repository). Yet, it could bring more
organization of the builds and modules that are out there. I'm still
finding stuff people wrote that I had no idea existed...

Of course having direct luarocks `rocks` interpolation for the lua
interpreter on textadept as you described is nice too. It's something
which would be quite nice to have actually. And as added bonus for this
luarocks integration, making textadept quite a monstrous beast from what
it is now.

Alejandro Baez

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 03 Mar 2015 - 23:15:44 EST

This archive was generated by hypermail 2.2.0 : Wed 04 Mar 2015 - 06:46:32 EST