Re:Show HN: Nice-looking Python bindings to V8
by andersriutta on Monday June 19, 2017 @07:20PM
(#14591153)
This allows for calling synchronous JS functions from Python but not async JS functions, right? PyExecJS [0] also doesn't work with async JS, but Js2Py [1] might.
Re:Show HN: Nice-looking Python bindings to V8
by d33 on Monday June 19, 2017 @04:29PM
(#14590189)
Nice! I hadn't tested it yet, but I remember trying to run V8 in Python and it was a real mess - I think that even building it was problematic. I might use this project one day. Did you compare your bindings to alternatives?
Re:Show HN: Nice-looking Python bindings to V8
by Twirrim on Tuesday June 20, 2017 @09:32AM
(#14594444)
That's what I took that phrase to mean, but if you look at the example in the read me, it appears to be the other way around. Writing python, defining a method, then wrapping that method in a V8 context and running it from within python.
Re:Show HN: Nice-looking Python bindings to V8
by nerdponx on Monday June 19, 2017 @08:08PM
(#14591332)
It's forced humor, and a misapplied un-funny version of mildly funny nerd humor at that. It gives me the same kind of chills that I get from people who wear "I <3 bacon" type t-shirts.
Re:Show HN: Nice-looking Python bindings to V8
by dguaraglia on Monday June 19, 2017 @08:57PM
(#14591514)
In Spanish we have an expression for the way you feel: "vergüenza ajena", which loosely translates to "feeling the embarrassment someone else should feel for their actions." It's pretty nifty, if not very catchy :P
Re:Show HN: Nice-looking Python bindings to V8
by binora on Tuesday June 20, 2017 @09:17AM
(#14594351)
Silly question. Can I use this to interact with a machine learning model written in python from javascript on react native ? It'd be great if someone could point out the feasibility/limitations
Re:Show HN: Nice-looking Python bindings to V8
by elmigranto on Tuesday June 20, 2017 @12:58AM
(#14592308)
Wouldn't it be more performant and less awkward to compile python to JS? Or is it for importing JS code into your python program? Well, why don't compile JS to Python then?
Re:Show HN: Nice-looking Python bindings to V8
by marmaduke on Tuesday June 20, 2017 @02:45AM
(#14592636)
If JS code expects to be JITed then transpiled in Python would be quite slow. Transpiling Python to JS is difficult and loses access to various ecosystems e.g. scientific Python.
Having the two runtimes coupled seems to be the ideal way to run both languages in the same process.
[0] https://github.com/doloopwhile/PyExecJS/issues/20 [1] https://github.com/PiotrDabkowski/Js2Py/blob/05e77f0d4ffe91e...
[0] https://news.ycombinator.com/item?id=14596163 [1] https://github.com/tbodt/v8py/blob/3c727584df684540ce30f2572...
"Write Python APIs, then call them from JavaScript using the V8 engine"
Wet.
Note that this thread ends in a predictable fashion: https://xkcd.com/214/
You seem to be writing it in python and then calling it from within python in the example.
Having the two runtimes coupled seems to be the ideal way to run both languages in the same process.
EDIT: nevermind. i'm dyslexic