Re: SpiderMonkey vs V8

Ted Gould <[email protected]> Thu, 21 May 2020 09:13:12 -0500
Newsgroups gmane.comp.graphics.inkscape.devel
Message-ID <[email protected]>
--===============3605642001730544370==
Content-Type: multipart/alternative; boundary="5ec68c78_715e9f84_6a8a"

--5ec68c78_715e9f84_6a8a
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hello Jeff,

As you're looking please take into account updates and security policy. We typically like major features to build with libraries that are included in the last stable release of the major Linux distros. This makes it easier for new developers to get on board and get Inkscape building so that they can add features.
Last I checked v8's update policy was "Update your app every couple weeks for security updates." Which definitely doesn't match what we're doing today. Not saying we can't change, but that's a much bigger discussion.
Ted
On May 21 2020, at 5:22 am, NASA Jeff <[email protected]> wrote:
> Spidermonkey doesn't seem too hard to integrate, creating a shim for a javascript
> a library that provides an API for Inkscape hopefully shouldn't be too tricky and possible with a few precompiler directives in the code and a script
> https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/How_to_embed_the_JavaScript_engine (https://link.getmailspring.com/link/60C7BC87-4B7D-4723-A9E1-546340FF4331-E3tajizDSjuh9fD6BarwBgC/[email protected]/0?redirect=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FMozilla%2FProjects%2FSpiderMonkey%2FHow_to_embed_the_JavaScript_engine&recipient=aW5rc2NhcGUtZGV2ZWxAbGlzdHMuc291cmNlZm9yZ2UubmV0)
> Spidermonkey looks a little short on documentation especially when it comes to C/JaverScript interoperability.
>
>
> V8 maybe seems a little trickier to embed, only a little not a great deal but has good, clear documentation. it is however C++ base, so it how well that mixes with Inkscape's choice of c
> https://chromium.googlesource.com/v8/v8/+/branch-heads/6.8/samples/hello-world.cc (https://link.getmailspring.com/link/60C7BC87-4B7D-4723-A9E1-546340FF4331-E3tajizDSjuh9fD6BarwBgC/[email protected]/1?redirect=https%3A%2F%2Fchromium.googlesource.com%2Fv8%2Fv8%2F%2B%2Fbranch-heads%2F6.8%2Fsamples%2Fhello-world.cc&recipient=aW5rc2NhcGUtZGV2ZWxAbGlzdHMuc291cmNlZm9yZ2UubmV0)
>
> do it's going to take some searching for documentation and examples of wrapping up c for javascript and javascript for c to determine which one will embed the nicest based on hope Inkscape's SPI is implemented.
> _______________________________________________
> Inkscape-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel


--5ec68c78_715e9f84_6a8a
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div>Hello Jeff,</div><br><div>As you're looking please take into account=
 updates and security policy. We typically like major features to build w=
ith libraries that are included in the last stable release of the major L=
inux distros. This makes it easier for new developers to get on board and=
 get Inkscape building so that they can add features.</div><br><div>Last =
I checked v8's update policy was =22Update your app every couple weeks fo=
r security updates.=22 Which definitely doesn't match what we're doing to=
day. Not saying we can't change, but that's a much bigger discussion.</di=
v><br><div>Ted</div><div><signature id=3D=22initial=22></signature></div>=
<div class=3D=22gmail=5Fquote=5Fattribution=22>On May 21 2020, at 5:22 am=
, NASA Jeff &lt;tallboy258=40gmail.com&gt; wrote:</div><blockquote><div><=
div>Spidermonkey doesn't seem too hard to integrate, creating a shim for =
a javascript&nbsp;</div><div>a library that provides an API for Inkscape =
hopefully shouldn't be too tricky and possible with a few precompiler dir=
ectives in the code and a script</div><div><div><a href=3D=22https://link=
.getmailspring.com/link/60C7BC87-4B7D-4723-A9E1-546340=46=464331=40getmai=
lspring.com/0=3Fredirect=3Dhttps%3A%2=46%2=46developer.mozilla.org%2=46en=
-US%2=46docs%2=46Mozilla%2=46Projects%2=46SpiderMonkey%2=46How=5Fto=5Femb=
ed=5Fthe=5FJavaScript=5Fengine&amp;recipient=3DaW5rc2NhcGUtZGV2ZWxAbGlzdH=
Muc291cmNlZm9yZ2UubmV0=22 title=3D=22https://developer.mozilla.org/en-US/=
docs/Mozilla/Projects/SpiderMonkey/How=5Fto=5Fembed=5Fthe=5FJavaScript=5F=
engine=22>https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Spide=
rMonkey/How=5Fto=5Fembed=5Fthe=5FJavaScript=5Fengine</a>&nbsp;&nbsp;</div=
><div>&nbsp; Spidermonkey looks a little short on documentation&nbsp;espe=
cially when it comes to C/JaverScript&nbsp;interoperability.&nbsp;&nbsp;<=
/div><br><br><div>V8 maybe seems a little trickier to embed, only a littl=
e not a great&nbsp;deal but has good, clear documentation. it is however =
C++ base, so it how well that mixes with Inkscape's choice of c</div></di=
v><div><div><a href=3D=22https://link.getmailspring.com/link/60C7BC87-4B7=
D-4723-A9E1-546340=46=464331=40getmailspring.com/1=3Fredirect=3Dhttps%3A%=
2=46%2=46chromium.googlesource.com%2=46v8%2=46v8%2=46%2B%2=46branch-heads=
%2=466.8%2=46samples%2=46hello-world.cc&amp;recipient=3DaW5rc2NhcGUtZGV2Z=
WxAbGlzdHMuc291cmNlZm9yZ2UubmV0=22 title=3D=22https://chromium.googlesour=
ce.com/v8/v8/+/branch-heads/6.8/samples/hello-world.cc=22>https://chromiu=
m.googlesource.com/v8/v8/+/branch-heads/6.8/samples/hello-world.cc</a>&nb=
sp;&nbsp;</div><br><div>do it's going to take some searching for document=
ation and examples of wrapping&nbsp;up c for&nbsp;javascript and javascri=
pt for c to determine which one will embed the nicest based&nbsp;on hope&=
nbsp;Inkscape's SPI is implemented.</div></div></div><div>=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F</div><div>Inkscape-de=
vel mailing list</div><div>Inkscape-devel=40lists.sourceforge.net</div><d=
iv>https://lists.sourceforge.net/lists/listinfo/inkscape-devel</div></blo=
ckquote><img class=3D=22mailspring-open=22 alt=3D=22Sent from Mailspring=22=
 width=3D=220=22 height=3D=220=22 style=3D=22border:0; width:0; height:0;=
=22 src=3D=22https://link.getmailspring.com/open/60C7BC87-4B7D-4723-A9E1-=
546340=46=464331=40getmailspring.com=3Fme=3D062aacac&amp;recipient=3DaW5r=
c2NhcGUtZGV2ZWxAbGlzdHMuc291cmNlZm9yZ2UubmV0=22>
--5ec68c78_715e9f84_6a8a--



--===============3605642001730544370==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============3605642001730544370==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Inkscape-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

--===============3605642001730544370==--