Some ideas in reply to Terry's recent question about whether node.js will 
be a dependency of the Leo Vue desktop app.

My initial reply was that it is way too early to say. Here are some further 
thoughts:

1. electron <https://electronjs.org/docs/tutorial/about>, the lib on which 
the atom <https://atom.io/>desktop editor is built, "[combines] Chromium 
<https://www.chromium.org/Home> and Node.js <https://nodejs.org> into a 
single runtime...Apps can be packaged for Mac, Windows, and Linux. Atom has 
a great look, but a much different look than Leo Vue.

Alas, atom is a pure *javascript* app.

2. In this reply 
<https://groups.google.com/d/msg/leo-editor/50SZd4136iM/Rtos4hAtCwAJ>, in 
the Leo Vue thread 
<https://groups.google.com/forum/#!topic/leo-editor/50SZd4136iM>, Joe Orr 
said: "About Electron, that is basically just node + browser in a package. 
I think should be doable to wrap Leo python code in node and have the 
browser interface, maybe using something like this: 
https://www.npmjs.com/package/node-python";. 
<https://www.google.com/url?q=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fnode-python&sa=D&sntz=1&usg=AFQjCNG1Qx5EsX92_rDKWn5aZwjqSr8cjg>
 
The source for this project is here 
<https://github.com/JeanSebTr/node-python>.

Hmm. node-python is dormant (4-years old) and marked as hyper-beta.  Worse, 
the to-do list makes it appear as if there is language translation going 
on.  I have a bad feeling about this...

Anyway, node-python is a fork of another node-python 
<https://github.com/chrisdickinson/node-python>, which says it "actually 
embeds a python process inside of Node".  The file binding.cc 
<https://github.com/chrisdickinson/node-python/blob/master/binding.cc> is C 
code which (if I am not mistaken) implements the Python API 
<https://docs.python.org/2/c-api/index.html> using the V8 interface 
<https://nodejs.org/api/v8.html#v8_v8> of node.js. 

*Summary*

Implementing the Python API in V8 is *much* easier that trans-compiling 
Python into JavaScript. It might actually work ;-) Still, I am not 
convinced either node-binding project would form a solid basis for a major 
project.

An alternative might be to use interprocess communication between python 
and electron.  This might be a client server architecture, or something 
else.  This is a completely open question, imo.

Your comments please, Amigos.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to