This Engineering Notebook post considers strategies for implementing the 
crucial parts of Leo in javascript. leojs issue #9 
<https://github.com/boltex/leojs/issues/9> recaps what must be done. The 
following must be present in leojs 0.1:

- Leo's Position and VNode classes,
- Outline-oriented undo,
- Outline-oriented search.

That's a lot of complex code!

True, leojs is worth any amount of work. However, it would be stupid to 
dive into coding! This morning I considered some cute possibilities for 
doing significant parts of the work in python. Then I thought to google: 
"python to javascript" :-)

One of the first hits was this overview 
<https://www.infoworld.com/article/3209651/how-to-convert-python-to-javascript-and-back-again.html>,
 
which leads to:

- JavaScripthon <https://github.com/metapensiero/metapensiero.pj>: a Python 
3 to ES6 JavaScript translator.
- RapyScript <https://github.com/atsepkov/RapydScript>: pre-compiler for 
JavaScript.
  The syntax is very similar to Python but allows JavaScript as well.
- Transcript <http://www.transcrypt.org/>: compile python to JS.
- Pscript <https://github.com/flexxui/pscript>: the compiler part of flexx 
<https://flexx.readthedocs.io/en/stable/index.html>.

*Summary*

This has been a much shorter post than I first imagined :-) One or more of 
the tools listed above will likely suffice. A little googling pays off!

leoInteg requires Leo's bridge to provide most of Leo's functionality. The 
communication between Leo's bridge and leoInteg is fraught with 
difficulties. Transcribing the essentials of Leo's core into JS will 
eliminate many of those difficulties.

Besides transliteration, other problems will surely arise. Félix and I will 
deal with those problems as they arise. Time to evaluate transpilers!

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/318373a1-1b55-425c-93b3-f7d39f9447fbn%40googlegroups.com.

Reply via email to