> > You found archived positions. That's all that matters.
I sure fuck*ng did... haha!! That's really the one most impactful thing that got the ball rolling! :D Just a thought I often had: vscode is now, and going to be for many years, the top editor used by the most people on the planet. It has dethroned sublime-text, which had the crown for many years. (or belt, if you're a wrestling fan) And it so happens that sublime is scriptable in python... And so I often raged at myself for not doing a Leo integration when the target IDE would have been python! There would have been no complicated websocket bridging and all that ! just simple 'import leo.core.leoBridge as leoBridge' or whatever, and directly call stuff in leoBridge.py... haha! (but i'm oversimplifying obviously!) I can't really comment on stuff relating to Vim and Emacs because I know next to nothing about those except that they're popular editors with their own 'system' of editing text. sorry for this rambling I'm going back to work on leoInteg now ! btw last night I made ctrl+b on selected text a reality, - did'nt know this handled @others and the like- and also fixed headline editing with double quotes and special characters. So this makes it so that it is now possible to re-do this video in its entirety. https://www.youtube.com/watch?v=tuM8MvI9g6k Which I will do. : ) Félix On Wednesday, June 17, 2020 at 7:38:18 AM UTC-4, Edward K. Ream wrote: > > On Wed, Jun 17, 2020 at 12:48 AM Félix <[email protected] <javascript:>> > wrote: > > >> flexx handles this with @action and @reaction decorators. In flexx, > everything *looks* like python, but in fact everything on the js side is, > perforce, javascript. > > > I will admit to you that I have not looked into flexx enough to > understand / acknowledge this. I have barely spent enough time and effort > in flexx to get to those methods. > > You found archived positions. That's all that matters. > > >> flexx simulates/allows arbitrary two-way interactions between the js > and python sides. Your code gets the same effect with a *single* server. > Requests flow from vs-code to Leo's bridge. Responses to those requests are > the only data that need to flow in the other direction. You have shown that > these messages suffice. > > > It's not exactly right. That's where the /src/leoAsync.ts class comes > into play: Some events may be initiated by Leo itself and so JSON messaging > may sprout from the python side without being suspected as usual when just > responding to a request initiated from the user's (vscode) side. > > Thanks for this important clarification. > > > But otherwise for user interaction it's just do action->wait response > from python. one by one, in a stack, no random order. > > Does this mean that the interaction is actually synchronous? > > >> use "await" to make all this asynchronous. Thank you python devs! > > > I just followed the 'websockets' documentation for a basic server that > waits/responds to simple serial queries. > > Heh. You make it sound so easy. For the last several days I've been > working on a python version of your typescript code. This would be helpful > "documentation". I would use it as a prototype for a leoPyzoInteg. Imo, > embedding Leo in pyzo or vice versa is hopeless. You have shown the correct > way forward. > > For this newbie, just attempting to follow the websockets documentation > can be, um, challenging. I'm busy making all the usual newbie mistakes and > googling the resulting error messages. And reading, reading, reading, > attempting to separate what I need from what I don't. > > The names of methods and various code patterns are starting to become > familiar, but no joy yet. I'll continue to study your code to see what you > have done. If I get stuck I'll ask you for advice. > > >> 2. The second fundamental task is to implement Leonine widgets. Flexx > makes this easy with pre-built js widgets. I assume you use the vs-code api > to create your Leonine widgets in vs-code. > > > Being an integration into vscode, there is indeed, mostly just a ton of > vs-code api shenanigans going on :) have not gone mad when trying to go > about this api, yet... :) > > Hehe. It's never going to be easy, even in pyzo. > > > Vscode and Leo are the 2 coolest and useful tools in a programmer's > arsenal. So I really enjoy discussing them! > > Many thanks for your comments. They will help me create a prototype (of > two-way communication) for leoPyzoInteg. They should also help tfer (Tom > Fetherston) with his leoVimInteg project. I'm also considering > leoEmacsInteg, but that will wait. > > 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/a15146dd-0a17-4b17-9f97-99cb3f3b8fffo%40googlegroups.com.
