PL/Lua (was: [HACKERS] plpython implementation)

2013-07-01 Thread Luis Carvalho
Hi all,

Claudio Freire wrote:
 On Mon, Jul 1, 2013 at 2:29 AM, james ja...@mansionfamily.plus.com wrote:
  On 01/07/2013 02:43, Claudio Freire wrote:
 
  In essence, you'd have to use another implementation. CPython guys
  have left it very clear they don't intend to fix that, as they don't
  consider it a bug. It's just how it is.
 
  Given how useful it is to have a scripting language that can be used outside
  of the database as well as inside it, would it be reasonable to consider
  'promoting' pllua?
 
  My understanding is that it (lua) is much cleaner under the hood (than
  CPython).
  Although I do recognise that Python as a whole has always had more traction.
 
 Well, that, or you can use another implementation. There are many, and
 PyPy should be seriously considered given its JIT and how much faster
 it is for raw computation power, which is what a DB is most likely
 going to care about. I bet PyPy's sandboxing is a lot better as well.

snip
 
I think that 'promoting' PL/Lua would be too early, but it'd be a great
addition. The latest version, for instance, can run LuaJIT which has a FFI
(check the example in Anonymous Blocks at PL/Lua's docs.) I think there are
two main problems: finding maintainers in the core, and lack of popularity to
warrant its promotion (the two problems are related, of course.)


Peter Eisentraut wrote:
 On 7/1/13 1:29 AM, james wrote:
  Given how useful it is to have a scripting language that can be used
  outside
  of the database as well as inside it, would it be reasonable to consider
  'promoting' pllua?
 
 You can start promoting pllua by making it work with current PostgreSQL
 versions.  It hasn't been updated in 5 years, and doesn't build cleanly
 last I checked.
 
 Having a well-maintained and fully featured pllua available would surely
 be welcome by many.

Thanks for the feedback. Actually, PL/Lua's latest version (1.0) was out one
month ago,

http://pgfoundry.org/frs/?group_id=1000314

but the previous version took around 4 years. I was waiting for bug reports,
since I deemed PL/Lua to be fairly featured, but I have now declared it
stable.

The project is maintained -- I don't know how to say when something is
well-maintained, but small frequency of code updates is not one of my
criteria; Lua, for instance, took six years between versions 5.2 and 5.1.
BTW, just out of curiosity, when was the last time PL/Tcl was updated?

I think that the project is also fully featured, but I'd appreciate any
comments on the contrary (that is, feature requests.) I might be mistaken, but
PL/Lua has all the features that PL/Python, PL/Perl, and PL/Tcl have, but, for
example, features a trusted flavor when PL/Python does not, and has proper
type mappings, which PL/Perl does not (everything is translated to text.)

PL/Lua 1.0 adds anonymous blocks and a TRUNCATE trigger, and it should run on
PostgreSQL 9.2. It can be used with Lua 5.1, 5.2, and LuaJIT 2.0 (if you want
speed and an easy C interface through a FFI, you should try LuaJIT!)

I'd like to take this opportunity to kindly ask the PostgreSQL doc maintainers
to include PL/Lua in the table at Appendix H.3:

Name: PL/Lua
Language: Lua
Website: http://pgfoundry.org/projects/pllua/

Cheers,
Luis

-- 
Computers are useless. They can only give you answers.
-- Pablo Picasso

-- 
Luis Carvalho (Kozure)
lua -e 'print(((lexcarva...@no.gmail.spam.com):gsub((%u+%.),)))'


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: PL/Lua (was: [HACKERS] plpython implementation)

2013-07-01 Thread Peter Eisentraut
On Mon, 2013-07-01 at 18:15 -0400, Luis Carvalho wrote:
 The project is maintained -- I don't know how to say when something is
 well-maintained, but small frequency of code updates is not one of my
 criteria; 

The bug tracker contains bugs about build problems with PG 8.4, 9.2, and
9.3, which have not been addressed.



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: PL/Lua (was: [HACKERS] plpython implementation)

2013-07-01 Thread Luis Carvalho
Peter Eisentraut wrote:
 On Mon, 2013-07-01 at 18:15 -0400, Luis Carvalho wrote:
  The project is maintained -- I don't know how to say when something is
  well-maintained, but small frequency of code updates is not one of my
  criteria; 
 
 The bug tracker contains bugs about build problems with PG 8.4, 9.2, and
 9.3, which have not been addressed.

Done (it took me a while to see the bug tracker in pgfoundry...) BTW, thanks
for the patch; I'll release a new version of PL/Lua once PG 9.3 is out.

Cheers,
Luis

-- 
Computers are useless. They can only give you answers.
-- Pablo Picasso

-- 
Luis Carvalho (Kozure)
lua -e 'print(((lexcarva...@no.gmail.spam.com):gsub((%u+%.),)))'


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: PL/Lua (was: [HACKERS] plpython implementation)

2013-07-01 Thread Andreas Karlsson

On 07/02/2013 01:54 AM, Luis Carvalho wrote:

Peter Eisentraut wrote:

On Mon, 2013-07-01 at 18:15 -0400, Luis Carvalho wrote:

The project is maintained -- I don't know how to say when something is
well-maintained, but small frequency of code updates is not one of my
criteria;


The bug tracker contains bugs about build problems with PG 8.4, 9.2, and
9.3, which have not been addressed.


Done (it took me a while to see the bug tracker in pgfoundry...) BTW, thanks
for the patch; I'll release a new version of PL/Lua once PG 9.3 is out.


It might be worth looking at the feature set of PL/v8 which currently 
seems to be larger than PL/Perl, PL/Python and PL/tcl. Including having 
the possibility to implement window functions.


http://pgxn.org/dist/plv8/doc/plv8.html#Window.function.API

Nice job with PL/Lua,
Andreas

--
Andreas Karlsson


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers