Thread: Feature Suggestion: PL/Js

Feature Suggestion: PL/Js

From
Kiswono Prayogo
Date:
by using latest v8 engine from google, is it possible to build PL/Js
just like other PL in Postgre? such as PL/PHP
what should i learn if i want to build PL/Js?
thanks in advance.

regards,
Kis
GB


Re: Feature Suggestion: PL/Js

From
Peter Eisentraut
Date:
On Wed, 2009-10-07 at 15:00 +0700, Kiswono Prayogo wrote:
> by using latest v8 engine from google, is it possible to build PL/Js
> just like other PL in Postgre? such as PL/PHP
> what should i learn if i want to build PL/Js?

Start here:

http://developer.postgresql.org/pgdocs/postgres/plhandler.html

I notice that this has not been updated for the new inline handlers, but
that shouldn't stop you.



Re: Feature Suggestion: PL/Js

From
Alvaro Herrera
Date:
Kiswono Prayogo escribió:
> by using latest v8 engine from google, is it possible to build PL/Js
> just like other PL in Postgre? such as PL/PHP
> what should i learn if i want to build PL/Js?

I think Josh Tolley has some slides on how we built PL/LOLCODE that
could prove useful.

BTW I've seen requests for PL/Js so I'm sure it'll be welcome.  What
license is v8 under?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


Re: Feature Suggestion: PL/Js

From
Andrew Dunstan
Date:

Alvaro Herrera wrote:
> Kiswono Prayogo escribió:
>   
>> by using latest v8 engine from google, is it possible to build PL/Js
>> just like other PL in Postgre? such as PL/PHP
>> what should i learn if i want to build PL/Js?
>>     
>
> I think Josh Tolley has some slides on how we built PL/LOLCODE that
> could prove useful.
>
> BTW I've seen requests for PL/Js so I'm sure it'll be welcome.  What
> license is v8 under?
>
>   

It's a BSD license, but it's a C++ API. While it looks cool, I think 
SpiderMonkey is possibly a better bet.

cheers

andrew


Re: Feature Suggestion: PL/Js

From
Joshua Tolley
Date:
On Wed, Oct 07, 2009 at 10:22:02AM -0400, Alvaro Herrera wrote:
> Kiswono Prayogo escribió:
> > by using latest v8 engine from google, is it possible to build PL/Js
> > just like other PL in Postgre? such as PL/PHP
> > what should i learn if i want to build PL/Js?
>
> I think Josh Tolley has some slides on how we built PL/LOLCODE that
> could prove useful.

Said slides are available here:
http://www.pgcon.org/2009/schedule/events/159.en.html

I hope they can be useful.

--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com

Re: Feature Suggestion: PL/Js

From
Alvaro Herrera
Date:
Joshua Tolley escribió:
> On Wed, Oct 07, 2009 at 10:22:02AM -0400, Alvaro Herrera wrote:
> > Kiswono Prayogo escribió:
> > > by using latest v8 engine from google, is it possible to build PL/Js
> > > just like other PL in Postgre? such as PL/PHP
> > > what should i learn if i want to build PL/Js?
> > 
> > I think Josh Tolley has some slides on how we built PL/LOLCODE that
> > could prove useful.

Huh, I didn't mean "we built" but "he built"!

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Re: Feature Suggestion: PL/Js

From
"Massa, Harald Armin"
Date:
I think Josh Tolley has some slides on how we built PL/LOLCODE that
could prove useful.

BTW I've seen requests for PL/Js so I'm sure it'll be welcome.  What
license is v8 under?


the new BSD License



--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
no fx, no carrier pigeon
-
%s is too gigantic of an industry to bend to the whims of reality

Re: Feature Suggestion: PL/Js

From
"David E. Wheeler"
Date:
On Oct 7, 2009, at 7:55 AM, Andrew Dunstan wrote:

>> BTW I've seen requests for PL/Js so I'm sure it'll be welcome.  What
>> license is v8 under?
>
> It's a BSD license, but it's a C++ API. While it looks cool, I think  
> SpiderMonkey is possibly a better bet.

SquirrelFish? http://webkit.org/blog/189/announcing-squirrelfish/

Best,

David


Re: Feature Suggestion: PL/Js

From
Marcelo Costa
Date:
<br /><br /><div class="gmail_quote">On Wed, Oct 7, 2009 at 5:00 AM, Kiswono Prayogo <span dir="ltr"><<a
href="mailto:kiswono@gmail.com">kiswono@gmail.com</a>></span>wrote:<br /><blockquote class="gmail_quote"
style="border-left:1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> by using latest v8
enginefrom google, is it possible to build PL/Js<br /> just like other PL in Postgre? such as PL/PHP<br /> what should
ilearn if i want to build PL/Js?<br /> thanks in advance.<br /><br /> regards,<br /> Kis<br /> GB<br /><br
/></blockquote></div><br/>You also can see this link:<br /><br /><a
href="http://xen.samason.me.uk/~sam/repos/pljs/README">http://xen.samason.me.uk/~sam/repos/pljs/README</a><br
clear="all"/><br />-- <br />Marcelo Costa<br /><a href="http://www.marcelocosta.net">www.marcelocosta.net</a><br />
-------------------------------------------------<br/>“You can't always get what want”, <br /><br />Doctor House in
apologyto Mike Jagger<br /> 

Re: Feature Suggestion: PL/Js

From
Joshua Tolley
Date:
On Wed, Oct 07, 2009 at 11:29:15AM -0400, Alvaro Herrera wrote:
> Joshua Tolley escribió:
> > On Wed, Oct 07, 2009 at 10:22:02AM -0400, Alvaro Herrera wrote:
> > > Kiswono Prayogo escribió:
> > > > by using latest v8 engine from google, is it possible to build PL/Js
> > > > just like other PL in Postgre? such as PL/PHP
> > > > what should i learn if i want to build PL/Js?
> > >
> > > I think Josh Tolley has some slides on how we built PL/LOLCODE that
> > > could prove useful.
>
> Huh, I didn't mean "we built" but "he built"!

I didn't feel like you were stealing credit. I certainly couldn't have built
it, such as it is, without support from -hackers. :)

--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com

Re: Feature Suggestion: PL/Js

From
Kiswono Prayogo
Date:
> Said slides are available here:
> http://www.pgcon.org/2009/schedule/events/159.en.html
>
> I hope they can be useful.
>
> --
> Joshua Tolley / eggyknap

ok i will read it, thanks ^^

On Wed, Oct 7, 2009 at 11:18 PM, David E. Wheeler <david@kineticode.com> wrote:
> On Oct 7, 2009, at 7:55 AM, Andrew Dunstan wrote:
>
>>> BTW I've seen requests for PL/Js so I'm sure it'll be welcome.  What
>>> license is v8 under?
>>
>> It's a BSD license, but it's a C++ API. While it looks cool, I think
>> SpiderMonkey is possibly a better bet.
>
> SquirrelFish? http://webkit.org/blog/189/announcing-squirrelfish/
>
> Best,
>
> David
>

i guess v8 still the best javascript interpreter
http://waynepan.com/2008/09/02/v8-tracemonkey-squirrelfish-ie8-benchmarks/
nitro from apple safari would be the second best..
http://www.computerworld.com/s/article/9128638/Safari_4_rivals_Google_Chrome_in_JavaScript_race?intsrc=news_ts_head
but possibly that benchmark is not really valid because it also
benchmark the rendering..

On Wed, Oct 7, 2009 at 11:38 PM, Marcelo Costa <marcelojscosta@gmail.com> wrote:
>
>
> On Wed, Oct 7, 2009 at 5:00 AM, Kiswono Prayogo <kiswono@gmail.com> wrote:
>>
>> by using latest v8 engine from google, is it possible to build PL/Js
>> just like other PL in Postgre? such as PL/PHP
>> what should i learn if i want to build PL/Js?
>> thanks in advance.
>>
>> regards,
>> Kis
>> GB
>>
>
> You also can see this link:
>
> http://xen.samason.me.uk/~sam/repos/pljs/README
>
> --
> Marcelo Costa
> www.marcelocosta.net
> -------------------------------------------------
> “You can't always get what want”,
>
> Doctor House in apology to Mike Jagger
>

hmm.. someone has built it first, i'll try it in the moment ^^


Re: Feature Suggestion: PL/Js

From
"Joshua D. Drake"
Date:
On Thu, 2009-10-08 at 07:06 +0700, Kiswono Prayogo wrote:
> > Said slides are available here:
> > http://www.pgcon.org/2009/schedule/events/159.en.html
> >
> > I hope they can be useful.
> >
> > --
> > Joshua Tolley / eggyknap
>
> ok i will read it, thanks ^^

And video:

http://www.vimeo.com/3728119

Joshua D. Drake

--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564
Consulting, Training, Support, Custom Development, Engineering
If the world pushes look it in the eye and GRR. Then push back harder. - Salamander

Re: Feature Suggestion: PL/Js

From
Alvaro Herrera
Date:
Kiswono Prayogo escribió:

> i guess v8 still the best javascript interpreter
> http://waynepan.com/2008/09/02/v8-tracemonkey-squirrelfish-ie8-benchmarks/
> nitro from apple safari would be the second best..
> http://www.computerworld.com/s/article/9128638/Safari_4_rivals_Google_Chrome_in_JavaScript_race?intsrc=news_ts_head
> but possibly that benchmark is not really valid because it also
> benchmark the rendering..

Performance is not the only useful measure.  Embeddability in Postgres
is very important, and it being C++ is not a good starting point.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Re: Feature Suggestion: PL/Js

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> Start here:
> http://developer.postgresql.org/pgdocs/postgres/plhandler.html
> I notice that this has not been updated for the new inline handlers, but
> that shouldn't stop you.

Actually, that chapter is so old it didn't get updated for language
validators either :-(.  I added some text, and changed the link in
create_language.sgml so hopefully we'll notice it next time.
        regards, tom lane


Re: Feature Suggestion: PL/Js

From
"Joshua D. Drake"
Date:
On Thu, 2009-10-08 at 07:06 +0700, Kiswono Prayogo wrote:
> > Said slides are available here:
> > http://www.pgcon.org/2009/schedule/events/159.en.html
> >
> > I hope they can be useful.
> >
> > --
> > Joshua Tolley / eggyknap
> 
> ok i will read it, thanks ^^

And video:

http://www.vimeo.com/3728119

Joshua D. Drake

-- 
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564
Consulting, Training, Support, Custom Development, Engineering
If the world pushes look it in the eye and GRR. Then push back harder. - Salamander