x.reload: a possible pattern for test-driven development

2016-12-06 Thread Edward K. Ream
*tl;dr:* Important core classes, including importer classes, could support a reload method, that would reload the file containing the class, *and *return a new instance of the class, ready to be used by unit tests. This is an experimental idea. It won't revolutionize Leo's unit tests, but it m

Re: All importers are ready for real testing

2016-12-06 Thread Edward K. Ream
On Tuesday, December 6, 2016 at 12:00:39 PM UTC-6, Edward K. Ream wrote: > > > > On Tue, Dec 6, 2016 at 11:40 AM, Largo84 wrote: > >> @auto-rst files are not reading correctly. I'm even getting the dreaded >> ​ [big text warning]. >> > > >> The @auto-md files are restoring fine, but all of the

Re: Clone documentation re. @ directives

2016-12-06 Thread Largo84
OK, will look into how to do that. I'm sure I don't have checkout permission. With that, will I be able commit changes to the repo? Thanks! Rob. On Tuesday, December 6, 2016 at 2:42:39 PM UTC-5, Edward K. Ream wrote: > > On Tue, Dec 6, 2016 at 12:19 PM, Largo84 > > wrote: > >> Sure, I w

Re: Clones - what are they good for?

2016-12-06 Thread Zoom.Quiet
On Tue, Dec 6, 2016 at 12:47 PM, 'Terry Brown' via leo-editor wrote: > (How I feel about clones, YMMV) > ... > I can see why people are attracted to clones for this second category of > In code, wanting to > repeat things may indicate bad design, you can usually define something > somewhere a

Re: Clone documentation re. @ directives

2016-12-06 Thread Edward K. Ream
On Tue, Dec 6, 2016 at 12:19 PM, Largo84 wrote: > Sure, I would be glad to, but how? > ​Get checkout permission, if you don't have it, then alter LeoDocs.leo. When you're finished, I'll run rst3 on the changed @rst outline and upload the relevant file to Leo's web site.​ ​EKR -- You received

Re: Overwrite file prompts

2016-12-06 Thread Edward K. Ream
On Tue, Dec 6, 2016 at 12:29 PM, Largo84 wrote: the common link (drives that did versus drives that didn't prompt) was > Amazon Cloud backup running in the background on the drives that did. I'm > not sure what Amazon Cloud is doing to the files, maybe setting an archive > flag or something that'

Re: Clones - what are they good for?

2016-12-06 Thread Largo84
Nice post, Terry. I use clones extensively for both scenarios you mention below. I try to avoid using them for repeatable text snippets wherever possible by creating and referencing small external text files, but that's not always practical. The biggest problem I would have in getting away from

Clones - what are they good for?

2016-12-06 Thread 'Terry Brown' via leo-editor
(How I feel about clones, YMMV) Clones are really really good for creating task specific views of code, by gathering together all the nodes relevant to a particular development task, so you don't have to constantly scroll up and down the outline to get to the relevant pieces.  "Code" could be a

Re: Overwrite file prompts

2016-12-06 Thread Largo84
More weirdness! After further testing, it turns out that this behavior only occurred in files on some of my drives and not others. I determined that the common link (drives that did versus drives that didn't prompt) was Amazon Cloud backup running in the background on the drives that did. I'm n

Re: Clone documentation re. @ directives

2016-12-06 Thread Largo84
Sure, I would be glad to, but how? Rob.. On Tuesday, December 6, 2016 at 12:08:20 PM UTC-5, Largo84 wrote: > > I found out the hard way that clones don't survive as clones if they're > used inside @auto-... In hindsight, it makes sense to me why that would be > the case. However, there'

Re: Code Academy: how to learn Leo, or python, or anything ;-)

2016-12-06 Thread Edward K. Ream
On Tuesday, December 6, 2016 at 9:39:05 AM UTC-6, Edward K. Ream wrote: > I *do* want to revise [c2py]. Never mind. I've already done so. Leo has an integrated c-to-python command, customizable via @data nodes. EKR -- You received this message because you are subscribed to the Google Groups

Re: Clone documentation re. @ directives

2016-12-06 Thread Edward K. Ream
On Tue, Dec 6, 2016 at 11:08 AM, Largo84 wrote: > I found out the hard way that clones don't survive as clones if they're > used inside @auto-... In hindsight, it makes sense to me why that would be > the case. However, there's no indication from the documentation >

Re: All importers are ready for real testing

2016-12-06 Thread Edward K. Ream
On Tue, Dec 6, 2016 at 11:40 AM, Largo84 wrote: > @auto-rst files are not reading correctly. I'm even getting the dreaded > ​ [big text warning]. > > The @auto-md files are restoring fine, but all of the @auto-rst files are > coming in 'flat'. > ​Thanks for the report. I'll attempt a fix toda

Re: All importers are ready for real testing

2016-12-06 Thread Largo84
@auto-rst files are not reading correctly. I'm even getting the dreaded (wasn't getting that before): Loading big text: 34834 characters. Limit is 3. Beware of a Qt bug: You will **lose data** if you change the text before it is fully loaded (before the scrollbar stops moving). The @aut

Clone documentation re. @ directives

2016-12-06 Thread Largo84
I found out the hard way that clones don't survive as clones if they're used inside @auto-... In hindsight, it makes sense to me why that would be the case. However, there's no indication from the documentation (at lea

Re: Code Academy: how to learn Leo, or python, or anything ;-)

2016-12-06 Thread Edward K. Ream
On Tue, Dec 6, 2016 at 10:18 AM, Zoom.Quiet wrote: > WoW ! very very suggest record type for later pythonista learning ;-) > ​It's on the to-be-document list. EKR -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group a

Re: Code Academy: how to learn Leo, or python, or anything ;-)

2016-12-06 Thread Zoom.Quiet
WoW ! very very suggest record type for later pythonista learnning ;-) On Tue, Dec 6, 2016 at 9:39 AM, Edward K. Ream wrote: > On Tue, Dec 6, 2016 at 9:25 AM, Edward K. Ream wrote: > >> Furthermore, I want to leave c2py exactly as it was when I first wrote it. >> No docstrings, sub-optimal use o

Re: Overwrite file prompts

2016-12-06 Thread Edward K. Ream
On Tue, Dec 6, 2016 at 8:49 AM, Largo84 wrote: > I just started seeing this the other day (I update Leo regularly using > GitHub). Every time I save a .leo after making changes to an external file > (@auto-md and @file), I get two prompts asking me if I want to overwrite > the Leo file and overwr

Re: Code Academy: how to learn Leo, or python, or anything ;-)

2016-12-06 Thread Edward K. Ream
​​ On Tue, Dec 6, 2016 at 9:25 AM, Edward K. Ream wrote: Furthermore, I want to leave c2py exactly as it was when I first wrote it. > No docstrings, sub-optimal use of Python's string split/join functions, > etc. Newbies take note: your first efforts don't have to be perfect. > ​Heh. The thing

Re: Code Academy: how to learn Leo, or python, or anything ;-)

2016-12-06 Thread Edward K. Ream
On Tuesday, December 6, 2016 at 7:29:38 AM UTC-6, Edward K. Ream wrote: > EKR's first python program was [leo/scripts/c2py.md] I have deleted this file. It quickly become apparent that converting a Leo script to a markdown file is a bad idea, for at least two reasons: 1. Leo's markup isn't comp

Overwrite file prompts

2016-12-06 Thread Largo84
I just started seeing this the other day (I update Leo regularly using GitHub). Every time I save a .leo after making changes to an external file (@auto-md and @file), I get two prompts asking me if I want to overwrite the Leo file and overwrite the external file, the prompts suggesting that th

Re: Code Academy: how to learn Leo, or python, or anything ;-)

2016-12-06 Thread Edward K. Ream
On Tuesday, December 6, 2016 at 7:29:38 AM UTC-6, Edward K. Ream wrote: Two principles emerge: > > 1. The less said, the better. > 2. Invite people to learn for themselves. > Students should always feel free to ask for help, but it is struggle that teaches us the most. It's about attitude... *

Code Academy: how to learn Leo, or python, or anything ;-)

2016-12-06 Thread Edward K. Ream
The docs for the new importer are a personal Aha. Imo, they are some of best docs ever because they consciously avoid *all* detail. The Notes section is an exception: it discusses things that appear nowhere in the sourc