Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: JSPL vs JavaScript ...and other questions

by Corion (Patriarch)
on Jul 18, 2017 at 14:38 UTC ( [id://1195346]=note: print w/replies, xml ) Need Help??


in reply to JSPL vs JavaScript ...and other questions

Depending on what you actually want to do, you might find other Javascript interpreters less hassle. For example JavaScript::Duktape comes with the interpreter included.

I don't know what APIs SpiderMonkey provides or JSPL provides that you really need, so I don't know what a good migrations path might be and what your pain points are with the two packages.

Personally, I run my Javascript in the browser and not on the command line.

Replies are listed 'Best First'.
Re^2: JSPL vs JavaScript ...and other questions
by ptizoom (Scribe) on Jul 19, 2017 at 08:16 UTC
    thanks Corion,

    I will check this JavaScript::Duktape out , at first it looks like by prefixing all the key words with "duck_" you can part away from from mozjs (aka spidermonkey) itself; is this ducktape library worth the swap ?

    there are a multitude of packages interpreting javascript, which is quite mind bugling. diversity is ok, and blogs like this can help to find a way and engaging into the right path. hence my questions.

    JE seems to be used a lot.

    WWW-Mechanize-Firefox-0.79, looks promising.

    so it takes a lot of time to evaluate those packages particularly when they fail their dependencies, internal tests, and got neglected. but who knows what would it become in a few years, but one is sure javascript is not dead yet.

      I have only looked briefly at JavaScript::Duktape and patched it to also work on Windows, but I haven't had the need to use it in a more involved way.

      I also haven't used JE, but as it is an implementation running in pure Perl, it is really slow.

      I have used (and written) WWW::Mechanize::Chrome and WWW::Mechanize::Firefox, but if you don't need a browser+DOM, they are vast overkill and likely much more fragile than an embedded VM.

        I am dazzled, this busyness has fast evolved. We are such small things. Anyway is it right to seeing two trends to bridge javascript-html and perl :

        • connect directly to the guts of a browser process, using WWW::Mechanize::"my_amazing_browser" and its many engines.
        • interfacing a virtual javascript/ECMA engine within JavaScript::"the_bestest_JS" and then plug it in WWW::Scripter stuffs.
        ...?

        and got to say I am impressed by this JavaScript::Duktape looks quite clean, furnished with thorough tests and lush documents, and did installs at first shot, using duktape v2.0 on my debian system (except for this: "CAUGHT ERR: Error: oh boy! at t/nested.t line 18." !).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1195346]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-03-29 12:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found