Electron, not for web apps.?

79 views
Skip to first unread message

Terry Brown

unread,
Feb 6, 2018, 10:42:40 PM2/6/18
to leo-editor
https://discuss.atom.io/t/how-to-run-electron-desktop-app-in-web-browser-without-downloading/30495

only serves to deepen my suspicions that Electron is solving the wrong
problems.

Maybe I'll try and make a proof of concept for the python server + some
other js stack just so we're sure we're all on the same page.

Cheers -Terry
Message has been deleted
Message has been deleted

Edward K. Ream

unread,
Feb 7, 2018, 7:02:50 AM2/7/18
to leo-editor

​Excellent.  This is the time for quick prototypes and demos.

The electron "hello world" app and your csv video are informative in ways that words, words, words are not.

Edward

Edward K. Ream

unread,
Feb 7, 2018, 7:05:56 AM2/7/18
to leo-editor


On Wed, Feb 7, 2018 at 2:35 AM, vitalije <vita...@gmail.com> wrote:

Using Electron allows reading and writing local files much easier then from browser. Accessing local file system can be done through python back-end, but it would add a lot of complicated inter-process communication (which need to be tested, debugged,...) instead of directly reading and writing to local file system.

​I'm confused.  I thought we agreed that we don't want to try embedding python in node.js?

Isn't some form of ipc required so we can run Leo's core in a separate process?​
 

The other advantage of using Electron is that programmer doesn't need to check browser version and to deal with lot of browser compatibility issues.

The disadvantage of using Electron is download size it brings in (~ 50M), but I believe it would be a small price to pay for the benefits and flexibility it provides.

​Thanks for these comments.  ​
 

​Edward

vitalije

unread,
Feb 7, 2018, 9:32:23 AM2/7/18
to leo-editor
I don't know what is happening with google groups. This morning I wrote a message to this thread and when I clicked the button POST, it showed that my message was deleted. At first I thought that I have clicked DISCARD button by mistake, so I rewrote the message again and carefully pressed POST button, but google showed that now two my messages are deleted. I didn't have time to try again, so I have left it. And later I see that Edward is quoting part of my second message? How is it possible? What is going on?

Yes, we have agreed not to try to embed python in node.js. I was just pointing what is (IMHO) the main difference between browser and Electron. 

Vitalije

PS: in August 2017, I have made a small example electron application that reads Leo document, draws the outline and allows editing of body text. I wandered at that time how fast could be rendering of Leo tree. AFAIR the experiment showed great potential of using Electron as front end for Leo. 
The experiment is written in clojurescript and using om (in effect it is React for clojurescript). I remember posting here on the forum a video demonstrating this app. It is about 500 lines of code. If it is of any interest I could share this experiment. 


vitalije

unread,
Feb 7, 2018, 9:33:40 AM2/7/18
to leo-editor
it seems the last message was posted ok. Perhaps it was some googlegroups update this morning that deleted my messages.

Edward K. Ream

unread,
Feb 8, 2018, 4:38:00 AM2/8/18
to leo-editor
On Wed, Feb 7, 2018 at 8:32 AM, vitalije <vita...@gmail.com> wrote:
I don't know what is happening with google groups. This morning I wrote a message to this thread and when I clicked the button POST, it showed that my message was deleted. At first I thought that I have clicked DISCARD button by mistake, so I rewrote the message again and carefully pressed POST button, but google showed that now two my messages are deleted. I didn't have time to try again, so I have left it. And later I see that Edward is quoting part of my second message? How is it possible? What is going on?

​I don't know.  Terry has reported similar problems in the past.  I suggest contacting google support.  This is a very serious issue.​
 

Yes, we have agreed not to try to embed python in node.js. I was just pointing what is (IMHO) the main difference between browser and Electron. 

Vitalije

PS: in August 2017, I have made a small example electron application that reads Leo document, draws the outline and allows editing of body text. I wandered at that time how fast could be rendering of Leo tree. AFAIR the experiment showed great potential of using Electron as front end for Leo. 
The experiment is written in clojurescript and using om (in effect it is React for clojurescript). I remember posting here on the forum a video demonstrating this app. It is about 500 lines of code. If it is of any interest I could share this experiment. 

​Of course it is of interest! It would also give a boost to #574: Create clojurescript importer​.

Edward

Edward K. Ream

unread,
Feb 8, 2018, 4:41:50 AM2/8/18
to leo-editor
On Wed, Feb 7, 2018 at 8:32 AM, vitalije <vita...@gmail.com> wrote:

I remember posting here on the forum a video demonstrating this app. It is about 500 lines of code.

​Excellent, impressive and good looking demo.  The fact that changes to body text persist while switching nodes is highly significant.

Edward

vitalije

unread,
Feb 10, 2018, 7:26:59 AM2/10/18
to leo-editor

​Of course it is of interest! It would also give a boost to #574: Create clojurescript importer​.

Edward

Here are two versions:

I am sorry for the delay. I find that most difficult part is publishing and sharing project experiments. It took me day or two to publish two experimental projects. First one is the one I wrote about in previous post. It is implementation of Leo as desktop application using Electron and written in clojurescript. I haven't test it lately, and it may be dated because all the libraries used are in high pace development. I hope it is still possible to build without errors.

Inspired by LeoVue, I was thinking about replacing Om/React with Vue. Finally I have restarted the whole experiment using new set of libraries and using CoffeeScript instead of ClojureScript.

HTH Vitalije

PS: It seems that I am going to be very occupied with other duties in the following few months and I don't know when I will be able to continue development on the Leo-Electron-Vue. It is totally different story than what Terry and Edward are doing on implementing Web front for python Leo back-end, but it may happen that these two stories find something in common and share some development. After all, Leo users may wish all kinds of Leo apps.

vitalije

unread,
Feb 10, 2018, 7:39:50 AM2/10/18
to leo-editor
Looking in the timelines of both projects, I am surprised how little time it took to develop both implementations (5 days for the first and 3 days for the second). However, publishing those two projects took two days.

Vitalije

Edward K. Ream

unread,
Feb 10, 2018, 9:43:54 AM2/10/18
to leo-editor
On Sat, Feb 10, 2018 at 6:26 AM, vitalije <vita...@gmail.com> wrote:

​>> ​
Of course it is of interest! It would also give a boost to #574: Create clojurescript importer​.
​​
Here are two versions:
​Many thanks for these.  I'll look at them today.

I find that most difficult part is publishing and sharing project experiments.

​Have you tried pushing to
​ You, and anyone else, is also welcome to add to leo/scripts/scripts.leo.​

​> ​
PS: It seems that I am going to be very occupied with other duties in the following few months and I don't know when I will be able to continue development on the Leo-Electron-Vue. It is totally different story than what Terry and Edward are doing on implementing Web front for python Leo back-end, but it may happen that these two stories find something in common and share some development. After all, Leo users may wish all kinds of Leo apps.

​Exploring the contrast between the two approaches will be valuable, regardless of what we end up doing. And it's time I learned clojurescript and its way of thinking.

Edward

Edward K. Ream

unread,
Feb 10, 2018, 9:53:31 AM2/10/18
to leo-editor
On Sat, Feb 10, 2018 at 6:26 AM, vitalije <vita...@gmail.com> wrote:
Here are two versions:
​To download the files, click one of the links above, then click the "files" link, and then click on the link:

    "Files of check-in [hash]"

at the top of the page.  That will take you to a page that gives you the option of downloading a .zip file or a tarball.

The actual download pages are:

Leo in Clojurescript:
https://repo.computingart.net/leocljs/vinfo?name=284258273ec5c6a5

Edward

vitalije

unread,
Feb 10, 2018, 10:07:15 AM2/10/18
to leo-editor
The other alternative would be to use fossil executable. It is a single file, just put it in PATH. Fossil for Linux, Windows and Mac are here.

With fossil in the path type the following command in shell:
fossil clone https://leoelvue.computingart.net/ leoelvue.fossil

fossil clone https://repo.computingart.net/leocljs/ leocljs.fossil

These command each, will make single repository file. Then you enter an empty folder and run:

fossil open <path to local repository file>

and you would have all files in their latest version.

Vitalije

vitalije

unread,
Feb 10, 2018, 10:16:30 AM2/10/18
to leo-editor
Also, for building clojurescript version one must have installed java and leiningen. Command for building development version is (IIRC)
lein figwheel

For the coffeescript version one must have installed node version 8 + and yarn package manager. Command for installing dependencies is
yarn

 And then for starting development version:
yarn dev

Both projects contain a reference Leo file. You should copy leo-el-vue-ref.leo to leo-el-vue.leo. Demo application expects to find leo-el-vue.leo in root project folder. It will automatically open that Leo file and display it. 

Vitalije
Reply all
Reply to author
Forward
0 new messages