On Sun, Dec 11, 2016 at 12:24 PM, Sr U <[email protected]> wrote: > > I just found Leo yesterday after looking for years - more than a decade, > actually -for such a programming tool. > > At least that is what I think I am looking at in Leo. >
> > I see lots of video examples of using Leo to write outlines in general and > even a few with snippets of code. And I even saw the video showing how > some examples of searching the large Leo codebase. > > But I haven't yet found even one > [example] > which shows, in straightforward fashion, how to begin developing a > complete, stand alone program in Leo. Is such a thing available? I think > it would help perhaps more than any other one tutelage effort. If not, > may I suggest that a few hours devoted to tutoring step-by-step in how to > write a complete, interesting but simple python program in Leo might work > wonders in getting the word out further? > The Programming with Leo tutorial <http://leoeditor.com/tutorial-programming.html> is the place to start. Admittedly, it is not easy going. In fact, I've recently seen that detail is often the enemy of clarity and understanding. I call this "the less said the better principle". Following this principle, you could say that the essential steps in developing a stand-alone app are: 1. Create one or more @file nodes (trees), one for each external file that will create your app. 2. Use @others (mostly) to tell Leo which nodes of those trees comprise the external files. Use << section references >> where order is important: usually for python imports. That's the big picture that the tutorial is trying to impart. The complicating factor is @clean, but you can ignore that and just use @file if you are developing an app yourself. > > Do I understand that Leo itself is written in -- or at least maintained > now -- entirely in Leo? > Yes. The file leoPyRef.leo (also known as leoPy.leo) contains all of Leo's core sources. The file leoPluginsRef.leo (aka leoPlugins.leo) contains the sources for all of Leo's official plugins. The file LeoDocs.leo contains all of Leo's official documentation. If so, I would absolutely love tutoring on how to use the tool effectively > in the context of learning how to handle the complexity of Leo > maintenance. I have some C background but little python experience. > First, familiarize yourself with Leo's sources. The fundamental principle in managing large projects, no matter what language(s) they are written in, is information hiding. That is, it is imperative to limit the interactions between classes. We don't want a change in one class to affect, in any way, any other classes. Please keep me up to date on developments. I think I could really get > behind this project in time but right now I could mostly use some > encouragement that this editor will help me manage the complexity of > learning to program > I would suggest taking a look at Leo's sources. I think they are proof that Leo is up to the task of managing any app. I would also suggest looking at the scripts in leo/scripts/scripts.leo. You can learn all you need about python programming just by executing stand-alone scripts in any Leo nodes. No needed even to create an external file. Leo doesn't promise a great deal of help in learning to program. What it does do is organize code so that it will make sense to you forever. > BTW, am I correct that it wouldn't be too hard to get Leo to recognize > racket (scheme) programs for purposes of maintaining indentation and > bracket highlighting, etc (I see you have something for emacs lisp)? Is > THAT tutoring available on video anywhere? > There is no *video* tutorial about Leo's emacs bridge <http://leoeditor.com/emacs.html#controlling-leo-from-emacs-using-pymacs>. However, that's an advanced topic. You should have no need to go down the elisp rabbit hole if Python is your main language. Python already has many tools to handle indentation, etc., including Leo's beautify commands. HTH. Feel free to ask more questions. The next step should be to find and glance at Leo's sources and scripts. No need to study them in detail. Just see what each module does in general, and, if you like, get a feel for the rough complexity of each module and class. In other words, get a feel for the shape of each tree. 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
