some interest in duktape?

272 views
Skip to first unread message

Andreas Lobinger

unread,
Aug 19, 2014, 1:12:58 PM8/19/14
to juli...@googlegroups.com
Hello colleagues,

i know it's dangerous to ask, but has anyone an interest to interface (ccall etc) the duktape JS engine http://duktape.org/ ?

Actually i want to use some code written in JS (and it's even not clear, if the effort is well spent, a simple port might be appropriate) and i looked around, but the big engines (spidermonkey31, v8) seem to have a C++ API only.

duktape, however, claims to be a 2 files solution and C only (what i can read in the makefile). So building this into a .so should not be a problem and attaching to a Pkg via ccalls also.

So?

Wishing a happy day,
     Andreas

John Myles White

unread,
Aug 19, 2014, 1:18:35 PM8/19/14
to juli...@googlegroups.com
Your question doesn't really seem dangerous as much as a little unclear. Are you asking people to do this work for you? Or are you asking if people would be excited to see a pull request that provides this functionality after you've implemented this?

 - John

Andreas Lobinger

unread,
Aug 19, 2014, 1:28:56 PM8/19/14
to juli...@googlegroups.com
You are completely right, i was unclear.


On Tuesday, August 19, 2014 7:18:35 PM UTC+2, John Myles White wrote:
Your question doesn't really seem dangerous as much as a little unclear. Are you asking people to do this work for you? Or are you asking if people would be excited to see a pull request that provides this functionality after you've implemented this?

 - John

1) Is there a general interest to run JS from julia programms?
2) Would someone be interested in working on a package that uses duktape via ccall? (like in: share the effort)
3) ... especially on enabling this for more than 1 architecture (i think i can manage a plain linux, but windows....)

 

Isaiah Norton

unread,
Aug 19, 2014, 1:58:00 PM8/19/14
to juli...@googlegroups.com
1) Is there a general interest to run JS from julia programms?
 
There has occasionally been discussion of using node-webkit or GtkWebkit for various things (such as GUI/plotting).

It really depends on what you are looking to do; duktape is explicitly not designed to be competitive speed-wise with V8/*Monkey, so keep that in mind. Depending on what your goal is, you could also consider to call in to Julia from e.g. node's ffi, as Julia has an embedding API and can expose (many) user functions as C-callable stubs as well (I don't think I would recommend that though. probably less pain to just port the code).
 
2) Would someone be interested in working on a package that uses duktape via ccall? (like in: share the effort)
3) ... especially on enabling this for more than 1 architecture (i think i can manage a plain linux, but windows....)

Usually "if you build it, they will come" is applicable... If it is useful then eventually someone will help make it work on Windows.

Isaiah Norton

unread,
Aug 19, 2014, 2:18:44 PM8/19/14
to juli...@googlegroups.com

Andreas Lobinger

unread,
Aug 19, 2014, 2:31:02 PM8/19/14
to juli...@googlegroups.com
This is confusing. It looks like the page you reference is somehow for spider monkey < 24. I thought about using an 'old' version, but the documentation is largely unclear on versions. The recent version is 31 and claims to be C++ only.
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/31

Tim Holy

unread,
Aug 19, 2014, 4:15:55 PM8/19/14
to juli...@googlegroups.com
Note that Keno has C++ calls working. See his Cxx package. Not sure whether it
works for anyone but Keno yet, though.

--Tim
Reply all
Reply to author
Forward
0 new messages