Re: Training the AI to write better LiveCode

2023-01-16 Thread Kaveh via use-livecode
 ChatGPT clearly likes me more that you. ;-) At least I have one friend!!!

On Tue, 17 Jan 2023 at 06:28, Torsten Holmer via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I also used chatGPT for looking uo code and I repeated your question. But
> this time chatGPT gives a wrong answer!
>
> —chatGPT:
> You will need to specify the group that the button should be added to by
> setting the group property of the button. The syntax for this is as follows:
> set the group of button [name of button] to [name of group]
>
> For example, if you wanted to create a button called "myButton" and add it
> to a group called "myGroup", you would use the following script:
>
> create button "myButton“
>
> set the group of button "myButton" to "myGroup"
>
> create button "myButton“
> set the group of button "myButton" to „myGroup"
> ---
>
> It is an error because  group is not a property of a button!
> So, really be careful with copy programming ;-)
>
> Cheers
> Torsten
>
>
>
> > Am 14.01.2023 um 22:14 schrieb Kaveh via use-livecode <
> use-livecode@lists.runrev.com>:
> >
> > I just tried Google to the answer to a problem. Didn't get it first time,
> > so tried ChatGPT. I asked:
> >
> > *How do I add a button to a group in LiveCode using a script?*
> >
> > I got:
> >
> > *create button "myButton" in group "myGroup"*
> >
> >
> > *This command creates a new button object with the name "myButton" and
> > places it inside the group "myGroup".*
> > Just what I needed.
> >
> > You can also set properties of the button
> >
> > On Sat, 14 Jan 2023 at 20:09, Mark Smith via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> >> Thanks for posting this Geoff. It’s the first time I've seen a ongoing
> >> dialog between a programmer and Chat GPT and the first thing I am
> struck by
> >> (but not the only thing) is it’s ability to deal with human ambiguity.
> For
> >> example, you ask it to modify the code to be an “on mouseUp handler in a
> >> button". But nowhere in its response is there any sign of a button. It
> just
> >> totally ignored that part of your request. The code it provides works
> in a
> >> card, a stack, a graphic image, an svg widget, in fact, in anything that
> >> accepts mouseUp input. And yet, it didn’t worry itself about that. Very
> >> interesting. It’s kind of like, “this works in a button, so good
> enough”.
> >> That is not the kind of “nuance” I am used to expecting from an AI. So,
> >> progress has clearly been made in interpreting what humans say (or ask)
> in
> >> a very loose way.
> >>
> >> The 2nd, and perhaps more astounding example, is when you ask it to
> >> "rewrite the code to be a function that takes an argument "n", repeats
> with
> >> 1 to n, and returns the results”.
> >>
> >> The really clever bit here is not that it rewrites the previous code
> into
> >> a function, but that it removes the bit about "put fizzbin into field
> >> “display””. How does it know that putting the result in a field is NOT
> the
> >> typical responsibility of a function? How does it know that that step
> needs
> >> to occur AFTER the function call? That is so high-level that I am sure
> lots
> >> of beginning programmers have made that mistake. It even comments on it
> in
> >> the documentation. So there is some very deep semantic understanding of
> >> programming code that is going on here. Because,  you did not ask it to
> do
> >> that, but the fact that it did it anyway indicates it clearly
> understands
> >> what the purpose of a function is.
> >>
> >> Quite weird for me to comprehend how it knows that. Unless of course,
> you
> >> were somehow more specific than your examples illustrate.
> >>
> >> Mark
> >>
> >>> On 14 Jan 2023, at 3:22 am, Geoff Canyon via use-livecode <
> >> use-livecode@lists.runrev.com> wrote:
> >>>
> >>> So just now I put this in to chatgpt:
> >>>
> >>> "fizz bin" is a program that counts from 1 to 100, replacing every
> number
> >>> divisible by 5 with "fizz" and every number divisible by 7 with "bin";
> >> and
> >>> numbers divisible by both 5 and 7 with "fizz bin". Write code in the
> >>> programming language livecode to execute "fizz bin"
> >>>
> >>> This is what ChatGPT responded with:
> >>>
> >>> repeat with x = 1 to 100
> >>>   if x mod 5 = 0 and x mod 7 = 0 then
> >>>   put "fizz bin"
> >>>   else if x mod 5 = 0 then
> >>>   put "fizz"
> >>>   else if x mod 7 = 0 then
> >>>   put "bin"
> >>>   else
> >>>   put x
> >>>   end if
> >>> end repeat
> >>>
> >>> That works as-is, but obviously the results fly by in the message box.
> >> So I
> >>> put a field and a button on a card, and edited to this, and it works
> >>> perfectly:
> >>>
> >>> on mouseUp
> >>>  repeat with x = 1 to 100
> >>> if x mod 5 = 0 and x mod 7 = 0 then
> >>>put "fizz bin" & cr after fld 1
> >>> else if x mod 5 = 0 then
> >>>put "fizz" & cr after fld 1
> >>> else if x mod 7 = 0 then
> >>>put "bin" & cr after fld 1
> >>> else
> >>>put x & 

Re: Training the AI to write better LiveCode

2023-01-16 Thread Torsten Holmer via use-livecode
I also used chatGPT for looking uo code and I repeated your question. But this 
time chatGPT gives a wrong answer!

—chatGPT:
You will need to specify the group that the button should be added to by 
setting the group property of the button. The syntax for this is as follows:
set the group of button [name of button] to [name of group]

For example, if you wanted to create a button called "myButton" and add it to a 
group called "myGroup", you would use the following script:

create button "myButton“ 

set the group of button "myButton" to "myGroup"

create button "myButton“ 
set the group of button "myButton" to „myGroup"
---

It is an error because  group is not a property of a button!
So, really be careful with copy programming ;-)

Cheers
Torsten



> Am 14.01.2023 um 22:14 schrieb Kaveh via use-livecode 
> :
> 
> I just tried Google to the answer to a problem. Didn't get it first time,
> so tried ChatGPT. I asked:
> 
> *How do I add a button to a group in LiveCode using a script?*
> 
> I got:
> 
> *create button "myButton" in group "myGroup"*
> 
> 
> *This command creates a new button object with the name "myButton" and
> places it inside the group "myGroup".*
> Just what I needed.
> 
> You can also set properties of the button
> 
> On Sat, 14 Jan 2023 at 20:09, Mark Smith via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Thanks for posting this Geoff. It’s the first time I've seen a ongoing
>> dialog between a programmer and Chat GPT and the first thing I am struck by
>> (but not the only thing) is it’s ability to deal with human ambiguity. For
>> example, you ask it to modify the code to be an “on mouseUp handler in a
>> button". But nowhere in its response is there any sign of a button. It just
>> totally ignored that part of your request. The code it provides works in a
>> card, a stack, a graphic image, an svg widget, in fact, in anything that
>> accepts mouseUp input. And yet, it didn’t worry itself about that. Very
>> interesting. It’s kind of like, “this works in a button, so good enough”.
>> That is not the kind of “nuance” I am used to expecting from an AI. So,
>> progress has clearly been made in interpreting what humans say (or ask) in
>> a very loose way.
>> 
>> The 2nd, and perhaps more astounding example, is when you ask it to
>> "rewrite the code to be a function that takes an argument "n", repeats with
>> 1 to n, and returns the results”.
>> 
>> The really clever bit here is not that it rewrites the previous code into
>> a function, but that it removes the bit about "put fizzbin into field
>> “display””. How does it know that putting the result in a field is NOT the
>> typical responsibility of a function? How does it know that that step needs
>> to occur AFTER the function call? That is so high-level that I am sure lots
>> of beginning programmers have made that mistake. It even comments on it in
>> the documentation. So there is some very deep semantic understanding of
>> programming code that is going on here. Because,  you did not ask it to do
>> that, but the fact that it did it anyway indicates it clearly understands
>> what the purpose of a function is.
>> 
>> Quite weird for me to comprehend how it knows that. Unless of course, you
>> were somehow more specific than your examples illustrate.
>> 
>> Mark
>> 
>>> On 14 Jan 2023, at 3:22 am, Geoff Canyon via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> So just now I put this in to chatgpt:
>>> 
>>> "fizz bin" is a program that counts from 1 to 100, replacing every number
>>> divisible by 5 with "fizz" and every number divisible by 7 with "bin";
>> and
>>> numbers divisible by both 5 and 7 with "fizz bin". Write code in the
>>> programming language livecode to execute "fizz bin"
>>> 
>>> This is what ChatGPT responded with:
>>> 
>>> repeat with x = 1 to 100
>>>   if x mod 5 = 0 and x mod 7 = 0 then
>>>   put "fizz bin"
>>>   else if x mod 5 = 0 then
>>>   put "fizz"
>>>   else if x mod 7 = 0 then
>>>   put "bin"
>>>   else
>>>   put x
>>>   end if
>>> end repeat
>>> 
>>> That works as-is, but obviously the results fly by in the message box.
>> So I
>>> put a field and a button on a card, and edited to this, and it works
>>> perfectly:
>>> 
>>> on mouseUp
>>>  repeat with x = 1 to 100
>>> if x mod 5 = 0 and x mod 7 = 0 then
>>>put "fizz bin" & cr after fld 1
>>> else if x mod 5 = 0 then
>>>put "fizz" & cr after fld 1
>>> else if x mod 7 = 0 then
>>>put "bin" & cr after fld 1
>>> else
>>>put x & cr after fld 1
>>> end if
>>>  end repeat
>>> end mouseUp
>>> 
>>> Then as I was typing this email I realized I was potentially selling
>>> chatgpt short, so I put this in:
>>> 
>>> Modify that code so it works as an "on mouseUp" handler in a button, and
>>> concatenates the results on individual lines, and puts the final result
>>> into the field "display"
>>> 
>>> And it output this:
>>> 
>>> 
>>> on mouseUp
>>>  put "" into fizzbin
>>>  

Re: Standalone riddle

2023-01-16 Thread panagiotis m via use-livecode
Hello all,

*>Can we turn off remote debugger for a test build so we can, how can I
say*
*it, hmm... I got it! Test?*

I think if you choose to "Select Inclusions manually" and you do not
include the Remote Debugger, it is not included in the standalone.

Kind regards,
Panos
--

On Mon, 16 Jan 2023 at 21:43, J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I don't think so, it's part of the built-in build process. I suppose you
> could trawl through the IDE scripts and see if there's a scripted line
> that
> could be disabled.
>
> It's never been a problem for me except in this one instance where I had
> an
> errorDialog handler.
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On January 16, 2023 9:02:38 AM Ralph DiMola via use-livecode
>  wrote:
>
> > Can we turn off remote debugger for a test build so we can, how can I say
> > it, hmm... I got it! Test?
> >
> > Ralph DiMola
> > IT Director
> > Evergreen Information Services
> > rdim...@evergreeninfo.net
> >
> > -Original Message-
> > From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On
> Behalf
> > Of J. Landman Gay via use-livecode
> > Sent: Sunday, January 15, 2023 6:58 PM
> > To: How to use LiveCode
> > Cc: J. Landman Gay
> > Subject: Re: Standalone riddle
> >
> > On 1/15/23 2:44 PM, Ralph DiMola via use-livecode wrote:
> >> I'd be interested to see if what difference there is between the test
> >> apk and the standalone builder apk. This has me a bit worried. If you
> >> want to send me the 2 apks I will dive in and see at least what
> >> file(s) are different.
> >
> > I think I've figured it out; the files won't be any different. Test
> builds
> > always include the remote debugger, standalones do not unless you
> > specifically select it in Inclusions. I didn't do that, and I have an
> > errorDialog handler in the stack, so I think that's causing the
> appearance
> > of the error dialog in the standalone. In the test app the error seems
> to be
> > ignored (but don't ask me why...)
> >
> > I've submitted a bug report:
> > 
> >
> > The stack is for my own use, a very (not so attractive) minimal LC
> > dictionary lookup so I can check syntax when I'm not at my computer. You
> can
> > download it from the report. Maybe someone else will find it useful. It
> uses
> > James Hale's docset for reference. I couldn't get his Docset Reader to
> work
> > reliably on Android, and I didn't need all the extra LC Builder and
> Guides
> > documentation, so this is just a stripped-down list of dictionary terms.
> >
> > The fix is mentioned in the report. Just comment out line 71 and
> uncomment
> > the line with the fix. Checking the current card before initiating a
> search
> > is the workaround.
> >
> > --
> > Jacqueline Landman Gay | jac...@hyperactivesw.com
> > HyperActive Software   | http://www.hyperactivesw.com
> >
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription
> > preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: Standalone riddle

2023-01-16 Thread J. Landman Gay via use-livecode
I don't think so, it's part of the built-in build process. I suppose you 
could trawl through the IDE scripts and see if there's a scripted line that 
could be disabled.


It's never been a problem for me except in this one instance where I had an 
errorDialog handler.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On January 16, 2023 9:02:38 AM Ralph DiMola via use-livecode 
 wrote:



Can we turn off remote debugger for a test build so we can, how can I say
it, hmm... I got it! Test?

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of J. Landman Gay via use-livecode
Sent: Sunday, January 15, 2023 6:58 PM
To: How to use LiveCode
Cc: J. Landman Gay
Subject: Re: Standalone riddle

On 1/15/23 2:44 PM, Ralph DiMola via use-livecode wrote:

I'd be interested to see if what difference there is between the test
apk and the standalone builder apk. This has me a bit worried. If you
want to send me the 2 apks I will dive in and see at least what
file(s) are different.


I think I've figured it out; the files won't be any different. Test builds
always include the remote debugger, standalones do not unless you
specifically select it in Inclusions. I didn't do that, and I have an
errorDialog handler in the stack, so I think that's causing the appearance
of the error dialog in the standalone. In the test app the error seems to be
ignored (but don't ask me why...)

I've submitted a bug report:


The stack is for my own use, a very (not so attractive) minimal LC
dictionary lookup so I can check syntax when I'm not at my computer. You can
download it from the report. Maybe someone else will find it useful. It uses
James Hale's docset for reference. I couldn't get his Docset Reader to work
reliably on Android, and I didn't need all the extra LC Builder and Guides
documentation, so this is just a stripped-down list of dictionary terms.

The fix is mentioned in the report. Just comment out line 71 and uncomment
the line with the fix. Checking the current card before initiating a search
is the workaround.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Tab groups broken?

2023-01-16 Thread Mark Smith via use-livecode
Hi Geoff, 

I tried it here and its working ok (9.6.8 on an M1 MacBook.).

Mark


> On 16 Jan 2023, at 5:30 pm, Geoff Canyon via use-livecode 
>  wrote:
> 
> I have LC 9.6.8 on a Mac. I drag a tab group onto a card, and it shows up
> with the primary tab looking...disabled? And it doesn't work at all. It
> also doesn't receive mouseUp messages?
> 
> So confused.
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Tab groups broken?

2023-01-16 Thread Geoff Canyon via use-livecode
I have LC 9.6.8 on a Mac. I drag a tab group onto a card, and it shows up
with the primary tab looking...disabled? And it doesn't work at all. It
also doesn't receive mouseUp messages?

So confused.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: Standalone riddle

2023-01-16 Thread Ralph DiMola via use-livecode
Can we turn off remote debugger for a test build so we can, how can I say
it, hmm... I got it! Test?

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of J. Landman Gay via use-livecode
Sent: Sunday, January 15, 2023 6:58 PM
To: How to use LiveCode
Cc: J. Landman Gay
Subject: Re: Standalone riddle

On 1/15/23 2:44 PM, Ralph DiMola via use-livecode wrote:
> I'd be interested to see if what difference there is between the test 
> apk and the standalone builder apk. This has me a bit worried. If you 
> want to send me the 2 apks I will dive in and see at least what 
> file(s) are different.

I think I've figured it out; the files won't be any different. Test builds
always include the remote debugger, standalones do not unless you
specifically select it in Inclusions. I didn't do that, and I have an
errorDialog handler in the stack, so I think that's causing the appearance
of the error dialog in the standalone. In the test app the error seems to be
ignored (but don't ask me why...)

I've submitted a bug report:


The stack is for my own use, a very (not so attractive) minimal LC
dictionary lookup so I can check syntax when I'm not at my computer. You can
download it from the report. Maybe someone else will find it useful. It uses
James Hale's docset for reference. I couldn't get his Docset Reader to work
reliably on Android, and I didn't need all the extra LC Builder and Guides
documentation, so this is just a stripped-down list of dictionary terms.

The fix is mentioned in the report. Just comment out line 71 and uncomment
the line with the fix. Checking the current card before initiating a search
is the workaround.

-- 
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode