It's time for me to see what's next after Leo. I won't be happy not 
programming :-)

I am looking for an "impossible" project. That will get the creative juices 
flowing.

As a starting point, I envisage a tool that collects data about programs at 
runtime, and associates that data with corresponding Leo nodes. Python's 
pdb debugger (or Leo's SherlockTracer class) is an obvious starting point.

Similar thinking led me to study the coverag 
<https://coverage.readthedocs.io/en/6.5.0/>e sources. Wow--the complexities 
that lie beneath coverage's simple interfaces!  I have just uploaded 
coverage.leo 
<https://github.com/leo-editor/leo-editor-contrib/blob/master/StudyOutlines/coverage.leo>
 
to leo-editor-contrib.

We recently discussed the role of comments and narratives in our programs. 
coverage has some of the best docstrings I've ever seen.  Two longish 
examples:

>From the PyTracer class, in pytracer.py (right after the docstring):

   # Because of poor implementations of trace-function-manipulating tools,
    # the Python trace function must be kept very simple.  In particular, 
there
    # must be only one function ever set as the trace function, both through
    # sys.settrace, and as the return value from the trace function.  Put
    # another way, the trace function must always return itself.  It cannot
    # swap in other functions, or return None to avoid tracing a particular
    # frame.
    #
    # The trace manipulator that introduced this restriction is 
DecoratorTools,
    # which sets a trace function, and then later restores the pre-existing 
one
    # by calling sys.settrace with a function it found in the current frame.
    #
    # Systems that use DecoratorTools (or similar trace manipulations) must 
use
    # PyTracer to get accurate results.  The command-line --timid argument 
is
    # used to force the use of this tracer.

Notice how self-contained these comments are.

Here is another example, from encodings.py:

"""Imposter encodings module that installs a coverage-style tracer.

This is NOT the encodings module; it is an imposter that sets up tracing
instrumentation and then replaces itself with the real encodings module.

If the directory that holds this file is placed first in the PYTHONPATH when
using "coverage" to run Python's tests, then this file will become the very
first module imported by the internals of Python 3.  It installs a
coverage.py-compatible trace function that can watch Standard Library 
modules
execute from the very earliest stages of Python's own boot process.  This 
fixes
a problem with coverage.py - that it starts too late to trace the coverage 
of
many of the most fundamental modules in the Standard Library.
"""

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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/c8400a0f-4608-4ef0-8417-b05179b5b7cen%40googlegroups.com.

Reply via email to