Re: Impressive ChatGPT responses

2023-04-18 Thread Thomas Passin
And look at this (Stan is a very sophisticated system for doing Bayesian 
calculations by generating an sampling distributions -

ChatGPT4 writes Stan code so I don’t have to. 


The author's conclusions:

" I thought I had learned some lessons on my other project and that with 
this one here I would indeed be able to get good code right away. For 
instance, it seems to help if you say “please implement features X, Y, and 
Z, and identify where in the code these are implemented”, so I tried that 
above…and it still wasn’t enough.

But: This has already changed the way I code. I am not sure I am ever going 
to write code completely by hand again! And I expect these tools to get 
better fast."

On Monday, April 17, 2023 at 8:11:26 AM UTC-4 Thomas Passin wrote:

> And there's this slashdot report -
>
>
> https://slashdot.org/story/23/04/14/2152250/overemployed-hustlers-exploit-chatgpt-to-take-on-even-more-full-time-jobs?utm_source=rss1.0mainlinkanon&utm_medium=feed
>
> People are using ChatGPT to be able to take on additional side hustles.  
> it does much of the extra work.
>
> On Monday, April 17, 2023 at 7:37:34 AM UTC-4 Edward K. Ream wrote:
>
>> ChatGPT generates impressive answers for the following queries:
>>
>> "Disprove the assertion that the earth is flat."
>> "Prove that the earth is flat."
>>
>> Imo, the responses to these queries are more compelling than any I have 
>> seen.
>>
>> Other example queries :
>>
>> "Disprove the theory of intelligent design."
>> "Are vaccines safe?"
>> "Are abortions safe?"
>> "Did the Holocaust happen?"
>> "Is the climate warming?"
>> "Is the 'Limits to Growth' model reliable?"
>>
>> The responses to all the above questions seem pithy, informative, and 
>> correct.
>>
>> Presumably, truth deniers are hard at work on disinformation bots.
>>
>> 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/90aad224-e9c8-4224-bf68-0e6fd28d0682n%40googlegroups.com.


Re: PR #3286 merged into devel. Please continue testing

2023-04-18 Thread Edward K. Ream
On Tue, Apr 18, 2023 at 12:03 PM Thomas Passin  wrote:

> This whole exercise puts me in mind of the several levels of testing:
> unit, integration, and system.  Unit tests can only take you so far.  In
> the case of these os.path-like functions, a unit test could prove that the
> output equals the intended output, but it could not show that all consuming
> modules expect the function to act that way.
>

Yes. And this exercise shows the limits of waiting for approving reviews of
PRs, hehe.

I think our travails were worthwhile. The new code, and the new names, are
better.

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/CAMF8tS1HtnHiPxE1HosFucGH6UkAjXOyhqXwuZ66kACmpMRMDQ%40mail.gmail.com.


Re: PR #3286 merged into devel. Please continue testing

2023-04-18 Thread Thomas Passin
This whole exercise puts me in mind of the several levels of testing: unit, 
integration, and system.  Unit tests can only take you so far.  In the case 
of these os.path-like functions, a unit test could prove that the output 
equals the intended output, but it could not show that all consuming 
modules expect the function to act that way.

On Tuesday, April 18, 2023 at 12:58:46 PM UTC-4 Thomas Passin wrote:

> g.os_path_join() is still doing the right thing on my system.
>
> On Tuesday, April 18, 2023 at 12:34:10 PM UTC-4 Edward K. Ream wrote:
>
>> On Tuesday, April 18, 2023 at 11:10:29 AM UTC-5 Edward K. Ream wrote:
>>
>> I've made copies of the g.os_path_expanduser and g.os_path_join as they 
>> existed in Leo 6.7.2.  We can't go back to the exact legacy code, but I'll 
>> take yet another look after I take a break.
>>
>>
>> As of rev ca92d1f 
>> 
>>  
>> in devel, g.os_path_expanduser calls os.path.normpath, as in Leo 6.7.2.
>>
>> This change should ensure that all legacy scripts and plugins work 
>> exactly as before.
>>
>> As always, please report any problems.
>>
>> Edward
>>
>> P.S. g.os_path_join needs no further changes. It should be exactly 
>> equivalent to the legacy version.
>>
>> EKR
>>
>

-- 
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/29ec3f4a-2dba-45c2-bbc1-ea7d3575d059n%40googlegroups.com.


Re: PR #3286 merged into devel. Please continue testing

2023-04-18 Thread Thomas Passin
g.os_path_join() is still doing the right thing on my system.

On Tuesday, April 18, 2023 at 12:34:10 PM UTC-4 Edward K. Ream wrote:

> On Tuesday, April 18, 2023 at 11:10:29 AM UTC-5 Edward K. Ream wrote:
>
> I've made copies of the g.os_path_expanduser and g.os_path_join as they 
> existed in Leo 6.7.2.  We can't go back to the exact legacy code, but I'll 
> take yet another look after I take a break.
>
>
> As of rev ca92d1f 
> 
>  
> in devel, g.os_path_expanduser calls os.path.normpath, as in Leo 6.7.2.
>
> This change should ensure that all legacy scripts and plugins work exactly 
> as before.
>
> As always, please report any problems.
>
> Edward
>
> P.S. g.os_path_join needs no further changes. It should be exactly 
> equivalent to the legacy version.
>
> EKR
>

-- 
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/f16ae801-016c-4530-84f7-3a6e5e0f6722n%40googlegroups.com.


Re: PR #3286 merged into devel. Please continue testing

2023-04-18 Thread Edward K. Ream
On Tuesday, April 18, 2023 at 11:10:29 AM UTC-5 Edward K. Ream wrote:

I've made copies of the g.os_path_expanduser and g.os_path_join as they 
existed in Leo 6.7.2.  We can't go back to the exact legacy code, but I'll 
take yet another look after I take a break.


As of rev ca92d1f 

 
in devel, g.os_path_expanduser calls os.path.normpath, as in Leo 6.7.2.

This change should ensure that all legacy scripts and plugins work exactly 
as before.

As always, please report any problems.

Edward

P.S. g.os_path_join needs no further changes. It should be exactly 
equivalent to the legacy version.

EKR

-- 
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/0ce8b161-41b8-4936-ae4f-21cf46b4855an%40googlegroups.com.


Re: PR #3286 merged into devel. Please continue testing

2023-04-18 Thread Edward K. Ream
On Tue, Apr 18, 2023 at 11:02 AM Thomas Passin  wrote:

> This has fixed the g.os_path_join() problem.
>

Whew.  Thanks for the testing.

I've made copies of the g.os_path_expanduser and g.os_path_join as they
existed in Leo 6.7.2.  We can't go back to the exact legacy code, but I'll
take yet another look after I take a break.

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/CAMF8tS2tLovJ-Ra_VBCv3YOQn_Ci1NYoy58OFsUDfsgO%2B%2B6E9Q%40mail.gmail.com.


Re: PR #3286 merged into devel. Please continue testing

2023-04-18 Thread Thomas Passin
This has fixed the g.os_path_join() problem.

On Tuesday, April 18, 2023 at 11:50:23 AM UTC-4 Edward K. Ream wrote:

> On Tuesday, April 18, 2023 at 10:46:39 AM UTC-5 Edward K. Ream wrote:
>
> PR #3286  is now in 
> devel. It restores some legacy functions and fixes a missing alias.
>
> Please continue testing. The latest code fixes several brain spikes on my 
> part, but more problems may remain.
>
>
> Meh.  g.os_path_expanduser does *not* (now) finalize its result. That may 
> be wrong, but I can't be sure yet.
>
> 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/cbe41ce9-7de5-4796-9ed6-0a3984b080ean%40googlegroups.com.


Re: PR #3286 merged into devel. Please continue testing

2023-04-18 Thread Edward K. Ream


On Tuesday, April 18, 2023 at 10:46:39 AM UTC-5 Edward K. Ream wrote:

PR #3286  is now in 
devel. It restores some legacy functions and fixes a missing alias.

Please continue testing. The latest code fixes several brain spikes on my 
part, but more problems may remain.


Meh.  g.os_path_expanduser does *not* (now) finalize its result. That may 
be wrong, but I can't be sure yet.

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/16ed0c8a-38c3-44ec-bb34-439cda518c9an%40googlegroups.com.


PR #3286 merged into devel. Please continue testing

2023-04-18 Thread Edward K. Ream
PR #3286  is now in 
devel. It restores some legacy functions and fixes a missing alias.

Please continue testing. The latest code fixes several brain spikes on my 
part, but more problems may remain.

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/4c20ec4a-d791-4be5-a445-88e897799ea8n%40googlegroups.com.


Re: PR #3277 has been merged into devel

2023-04-18 Thread Edward K. Ream
On Tue, Apr 18, 2023 at 6:01 AM lewis  wrote:

AttributeError: module 'leo.core.leoGlobals' has no attribute
> 'os_path_finalize_join'
>

Thanks for this report. I'll fix #3285
 immediately.

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/CAMF8tS2vZ9HkaqLZPL7WwgCBMvzk7jkBOKCDPwRN9Qa8w7vQhw%40mail.gmail.com.


Re: PR #3277 has been merged into devel

2023-04-18 Thread Thomas Passin
However, the function *did* exist on the previous changeset:

Leo 6.7.3-devel, devel branch, build edf4b48991
2023-04-16 08:20:16 -0500

Python 3.11.3, PyQt version 6.4.3
Windows 10 AMD64 (build 10.0.19044) SP0

On Tuesday, April 18, 2023 at 7:01:50 AM UTC-4 lewis wrote:

> Running this script from the Leo scripting tutorial:
>
>
>
>
>
>
> *fn = g.os_path_finalize_join(g.app.homeDir, 'leo_output_file.txt')with 
> open(fn, 'w') as f:f.write(c.p.b)with open(fn, 'r') as f:for line 
> in f.readlines():g.es (line.rstrip())*
>
> Gives traceback:
> Leo 6.7.3-devel, devel branch, build e2c9fa06e0
> 2023-04-17 20:36:03 -0500
> Python 3.11.3, PyQt version 6.5.0
> Windows 10 AMD64 (build 10.0.19044) SP0
> exception executing script
> Traceback (most recent call last):
>   File "N:\git\leo-editor\leo\core\leoCommands.py", line 1194, in 
> executeScript
> c.executeScriptHelper(args, define_g, define_name, namespace, script)
>   File "N:\git\leo-editor\leo\core\leoCommands.py", line 1239, in 
> executeScriptHelper
> exec(compile(script, scriptFile, 'exec'), d)
>   File "C:/Users/lewisneal/.leo/scriptFile.py", line 3, in 
> fn = g.os_path_finalize_join(g.app.homeDir, 'leo_output_file.txt')
> ^^^
> AttributeError: module 'leo.core.leoGlobals' has no attribute 
> 'os_path_finalize_join'
> On Tuesday, April 18, 2023 at 11:44:49 AM UTC+10 Edward K. Ream wrote:
>
>> PR #3277  changes 
>> g.os_path_finalize and g.os_path_finalize_join, and rev 32c9f 
>> 
>>  
>> adds a missing alias.
>>
>>
>> These changes are non-trivial. Please report any problems immediately.
>>
>>
>> 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/526b8239-a436-47ee-b575-386d9993d51fn%40googlegroups.com.


Re: PR #3277 has been merged into devel

2023-04-18 Thread lewis
Running this script from the Leo scripting tutorial:






*fn = g.os_path_finalize_join(g.app.homeDir, 'leo_output_file.txt')with 
open(fn, 'w') as f:f.write(c.p.b)with open(fn, 'r') as f:for line 
in f.readlines():g.es(line.rstrip())*

Gives traceback:
Leo 6.7.3-devel, devel branch, build e2c9fa06e0
2023-04-17 20:36:03 -0500
Python 3.11.3, PyQt version 6.5.0
Windows 10 AMD64 (build 10.0.19044) SP0
exception executing script
Traceback (most recent call last):
  File "N:\git\leo-editor\leo\core\leoCommands.py", line 1194, in 
executeScript
c.executeScriptHelper(args, define_g, define_name, namespace, script)
  File "N:\git\leo-editor\leo\core\leoCommands.py", line 1239, in 
executeScriptHelper
exec(compile(script, scriptFile, 'exec'), d)
  File "C:/Users/lewisneal/.leo/scriptFile.py", line 3, in 
fn = g.os_path_finalize_join(g.app.homeDir, 'leo_output_file.txt')
^^^
AttributeError: module 'leo.core.leoGlobals' has no attribute 
'os_path_finalize_join'
On Tuesday, April 18, 2023 at 11:44:49 AM UTC+10 Edward K. Ream wrote:

> PR #3277  changes 
> g.os_path_finalize and g.os_path_finalize_join, and rev 32c9f 
> 
>  
> adds a missing alias.
>
>
> These changes are non-trivial. Please report any problems immediately.
>
>
> 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/d2b5ade2-c589-43c9-98cf-fae1f3e6b1f6n%40googlegroups.com.


Re: VR3 can now be opened in a tab

2023-04-18 Thread Edward K. Ream
On Tue, Apr 18, 2023 at 2:28 AM jkn  wrote:

>
> To be fair, many/most modern editors have some sort of 'find definition'
> and 'find references' feature
>

But only cff gives you the ability to organize the results.

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/CAMF8tS2m%3DAXN5%3DLtKUmzFoCSp3Wf_uzE1CqsVSfp5Wp66CtPiA%40mail.gmail.com.


Re: VR3 can now be opened in a tab

2023-04-18 Thread jkn

To be fair, many/most modern editors have some sort of 'find definition' 
and 'find references' feature

On Sunday, April 9, 2023 at 1:50:50 PM UTC+1 tbp1...@gmail.com wrote:

> Yes:
>
> log = c.frame.log
> g.es(log.orderedTabNames())
>
> BTW, here's how I found this.  I certainly didn't remember, and you may 
> have a better way.  Start with the script for your button. It calls a 
> method log.deleteTab.  In Leo's core code, similar methods are generally 
> grouped together under the same parent node.  So I used the Nav tab - my 
> favorite for searches - and typed in "deleteTab".  It returned two 
> headlines that matched, one of which was "LeoLog.deleteTab".  I clicked on 
> that entry and was navigated to that part of the code.  Then I just scanned 
> the other names until I noticed "LeoLog.orderedTabNames".  That was it.
>
> I usually find this to be the most effective way to proceed.  Sometimes 
> you don't get a hit on a method or class definition but you find a place 
> that it is called.  You can CTRL-click on its name in the code and Leo will 
> (usually) succeed at navigating you to its *def: *or *class: *definition.
>
> Now that I've gotten used to working this way, I don't know how I could 
> stand going back to non-Leo ways of managing of code bases.
> On Sunday, April 9, 2023 at 7:22:19 AM UTC-4 lewis wrote:
>
>> I use an @button Delete-TAB
>>
>> TAB_name = g.app.gui.runAskOkCancelStringDialog(c,'Delete TAB',"Enter 
>> Tab name: ").strip()
>> c.frame.log.deleteTab(TAB_name)  # delete named Tab
>>
>> Is there a way to get a list of Tab names?
>> On Sunday, April 9, 2023 at 12:28:45 AM UTC+10 tbp1...@gmail.com wrote:
>>
>>> Yes, as long as you know its name, which you do from its label:
>>>
>>> log.deleteTab(TABNAME)
>>>
>>> On Saturday, April 8, 2023 at 10:26:30 AM UTC-4 jkn wrote:
>>>
 This look interesting, thanks.

 One thing I have never really needed, but occasionally wondered about; 
 it is possible to *delete* a tab in the log pane? (perhaps it should be 
 called the 'tab pane'?...)

 J^n

 On Friday, April 7, 2023 at 3:04:48 PM UTC+1 tbp1...@gmail.com wrote:

> The VR3 plugin can now optionally open in a tab in the log pane 
> instead of in its own panel in the main Leo window (also referred to as a 
> pane in the splitter).  I have attached a screen shot that shows the 
> panel 
> layout that I like when using VR3 in a tab.
>
> There are two new commands to control that tab behavior:
>
> vr3-tab -- opens VR3 in a tab
> vr3-toggle-tab -- opens or closes VR3 in a tab.
>
> I like to use an @button node in the @settings tree to make a button 
> for vr3-toggle-tab. The button runs
>  c.k.simulateCommand('vr3-toggle-tab').
>
> vr3-toggle will close VR3 if open in a splitter pane as well as in a 
> tab.  Next time, the command will open it in the splitter.  Conversely, 
> vr3-toggle-tab will close VR3 in either a tab or the splitter, but 
> will re-open it in a tab the next time the command is run.
>
> An advantage to running VR3 in a tab is that you can open something 
> else in a new splitter pane without interfering with VR3.
>
> One minor drawback is that focus will switch to the log pane when 
> something is written there - most likely when the outline has been saved. 
>  
> Then you have to click in the VR3 tab to see it again.  I haven't found 
> this to bother me much.
>
> This new behavior has now been merged into the devel branch, so it's 
> ready to try out.
>


-- 
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/23ecd3dd-3f67-4a78-ab05-f5c9e0324651n%40googlegroups.com.