On Fri, Aug 30, 2019 at 11:42 PM Robert Cholette <[email protected]>
wrote:

> I got caught with my pants down! Not even having a .leo file at the
center of my development for this project! Caught by the creator of Leo
itself!

Hehe.  Actually, I hadn't noticed :-)  I typically use c.recursiveImport to
study other people's code.  In your case, I guess I hadn't expected that
there would be a .leo file involved, since you might have been developing
within vs code.

> Jokes aside, I am honored. This is a great way to start my weekend!
>

Glad to hear it.  Your project was, likewise, a great way to start my
weekend.

> Going forward, I'll take a couple hours to study leoVue a little bit, to
> maybe make a tcp/ip communication instead of just stdIn/Out...
> I also have to study your leoFlexx plugin a bit more to see what else I
> can gather again from it to make everything easy and smooth! :)
>

Excellent!  Imo, improving the various "bridges" between the python and JS
worlds is pretty much the most important thing in Leo's world, and perhaps
(via web assembly) the wider world. Despite having written leoflexx.py, the
whole topic still seems mysterious to me.

The genius of flexx is that the JS side looks like python. That helped a
lot.  As I write this, I am starting to remember the overall drill: all
communication between the Python and JS sides must use something like json:
there is no way to share "real" objects directly.  The mind set that I had
to develop was to keep firmly in mind that "calls" didn't happen
immediately.  It's was a new way of thinking. Presumably, promises
<https://en.wikipedia.org/wiki/Futures_and_promises>are related to this way
of thinking.

> The main mechanic is that I'm using a simple stack of promises to keep
track of what's asked of the leoBridge's side of things. The first 'asked'
command by vscode interface is pushed on top of this stack, and resolved
from the bottom so its first-asked first-served kind-of logic. The set of
possible commands that it responds to is limited for now obviously.

Thanks for this.

> Please don't hesitate to ask for any clarification whatsoever,

Thank you.  For now, I'm reasonably happy with my general notion of what
you are doing.  I'll leave the "how" details to you.

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/CAMF8tS2qcxeCJ38SWNAVyakFCt96hwNVX9p2Rb_i4vfgy%3DEuPg%40mail.gmail.com.

Reply via email to