Re: 女 leojs and leointeg status update 女

2021-03-03 Thread Félix
To Edward > What do you mean "it's an emacs script syntax"? I made a typo, i meant ECMAS script syntax, which is something very similar to c, actionscript, javascript, on the syntactic level. ( semicolons at end of expressions , parenthesis use, available code structural and control flow

Re: ENB: A *valid* mypy complaint

2021-03-03 Thread vitalije
Setting p.v to None is just a convention. I don't think that any other part of Leo depends on this convention except p.__bool__ It would be trivial to change p.__bool__ implementation for example: instead of: return self.v is not None, we could have return self._valid. And then instead of

Re: Clones - How To Return To "Original" Node?

2021-03-03 Thread tbp1...@gmail.com
Good on you for sticking with it! On Wednesday, March 3, 2021 at 2:34:19 PM UTC-5 vili wrote: > Success! Now, the devel version of Leo on my Mac works like a charm, > “clone-find-parents” included! > > The problem was obviously with symlinks to Python3. > Explanation: I got this computer when

Re: ENB: A *valid* mypy complaint

2021-03-03 Thread tbp1...@gmail.com
Oops, I see that I should ave written about a special value for p.v, not for p. For example, leo.core.leoNodes.VNode could have an "invalid" flag that would be tested for in p.__bool__. Would that make it more feasible? OTOH, this is legacy code, so probably your solution of having mypy

Re: Clones - How To Return To "Original" Node?

2021-03-03 Thread vili
Success! Now, the devel version of Leo on my Mac works like a charm, “clone-find-parents” included! The problem was obviously with symlinks to Python3. Explanation: I got this computer when Apple issued the latest MacOS Big Sur. Homebrew was not ready for Big Sur at that time and Python3

Re: ENB: A *valid* mypy complaint

2021-03-03 Thread Edward K. Ream
On Wednesday, March 3, 2021 at 10:37:01 AM UTC-6 tbp1...@gmail.com wrote: Thanks for these comments. They inspired me to dig a little deeper into what is going on. There could be a special instance of p that plays the role of null, in that > it returns None when tested. Call it p_none. mypy

Re: 女 leojs and leointeg status update 女

2021-03-03 Thread Offray Vladimir Luna Cárdenas
Hi, Thanks for this work and the link to the issue about what inspired LeoJS at https://github.com/leo-editor/leo-editor/issues/1025 . Even as a long time Leo user (not so much now) I find the succinct definition of the defining features pretty enlightening. In fact I would like to have links

Re: ENB: A *valid* mypy complaint

2021-03-03 Thread tbp1...@gmail.com
There could be a special instance of p that plays the role of null, in that it returns None when tested. Call it p_none. mypy would recognize it as the same type as type(p) so it would be type safe, and p.__bool__ would return False when tested if p were p_none. There would only need to be

ENB: A *valid* mypy complaint

2021-03-03 Thread Edward K. Ream
This Engineering Notebook post discusses a mypy complaint that probably should never be eliminated. Feel free to ignore, unless you are Félix :-) Two Position methods, p.moveToNthChild and p.moveToParent, set p.v = None if there is no such position. This is a fundamental feature of *all* of

A fundamental irony

2021-03-03 Thread Edward K. Ream
It's great to have mypy pass Leo's code base. This is an important milestone. Ironically though, the changes made to please mypy (or pylint) could have introduced bugs. Leo's unit tests do *not* ensure that changes have no unintended consequences. This state of affairs is likely to continue

Re: 女 leojs and leointeg status update 女

2021-03-03 Thread Edward K. Ream
On Tue, Mar 2, 2021 at 11:08 PM Félix wrote: > I'm now switching to fixing & releasing leointeg 1.0!  Well done, you. > What has been up with leojs so far in the last 3 months or so? well, > leojs doesn't 'fake' its outline and leo-documents anymore: I've translated > the core of Leo's Node