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
>>>  

How to extract whole text from a PDF file with the PDF widget?

2021-12-10 Thread Torsten Holmer via use-livecode
Hi,

I have a PDF file with text and pictures, but I just want the text.

I can do it manually with Ctrl-A and Ctrl-Copy by viewing the file with Preview 
on MacOS. 

I have a business licence and want to use the PDF widget but I cannot find a 
way to do it.

Can someone help me out?

Cheers,
Torsten
___
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


Browser widget does not support WebGL2

2020-08-16 Thread Torsten Holmer via use-livecode
Hi,

I want to test how to display a WebGL-Page in the browser widget, but get this 
message on this page (https://get.webgl.org/webgl2/) :

"Oh no! We are sorry, but your browser does not seem to support WebGL2."

Is there a way to update the widget?

Chrome does support WebGL 2.0

Cheers,
Torsten


___
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


Redirecting stdout to file on server

2020-07-06 Thread Torsten Holmer via use-livecode
Hi,

I use Livecode server as an API for uploading some files from another 
application with the POST command. 
The problem is, that I cannot see the error messages if something fails.
In browser based interaction the command "set the errorMode to „inline"" is 
fine, but between apps I cannot see the reply.

There seems to be a way to redirect the error messages from the server to a 
file (like errors.txt), but I could not find any sources.

Can somebody help me out?

Kind regards,
Torsten
___
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: WebSites made using Livecode.

2020-07-03 Thread Torsten Holmer via use-livecode
Do you know revIgniter, the Livecode Framework for Websites? 
https://revigniter.com/

"Many websites have been successfully built with revIgniter including the 
presumably largest Hindu website  in 
existence."
https://www.himalayanacademy.com/ 

Best regards,
Torsten


> Am 02.07.2020 um 21:39 schrieb Heriberto Torrado via use-livecode 
> :
> 
> Dear LiveCode experts:
> 
> I am trying to convince a customer to create their next website with LiveCode 
> Server instead PHP.  The client asks me what other popular sites are created 
> with LiveCode server.
> 
> I have seen this in the Livecode forums , but it seems to be very old:
> 
> https://forums.livecode.com/viewtopic.php?t=15689
> 
> Do you know modern websites created with LiveCode?
> 
> I have seen that the current LiveCode site runs Wordpress + PHP.
> Do you know why?
> -- 
> 
> Best regards/ Saludos cordiales/ Cordialement
> 
> Heriberto Torrado
> ​Chief Technology Officer (CTO)
> ​Director de informática
> Directeur informatique
> 
> *NetDreams S.C.*
> http://www.networkdreams.net
> 
>  Address / Dirección / Adresse:​
> 
> *USA: *538 East 85th Street, #1C Manhattan NY, NY 10028 USA
> *Europe / Europa: *Paseo de la Castellana 135 10ª Planta Madrid 28024 Spain / 
> España
> 
> *Tel - Phone - Fax:*
> 
> Phone / Tel USA : +1 917 287 5644 / +1 646 596 8787
> Phone / Tel Spain :+34 627 556 500 / + 34 91 063 74 48
> 
>Please consider the environment before printing this email / Por favor 
> considera tu responsabilidad medioambiental antes de imprimir esta página.
> 
> Confidentiality: The information contained in this message as well as the 
> attached file(s) is confidential/privileged and is only intended for the 
> person(s) to whom it is addressed. If the reader of this message is not the 
> intended recipient or the employee or agent responsible for delivering the 
> message to the intended recipient, or you have received this comunication in 
> error, please be aware that any dissemination, distribution or duplication is 
> strictly prohibited, and can be illegal, and please notify us immediately and 
> return the original message to us at the address above. Thank you.
> 
> Confidencialidad: La información contenida en este mensaje y/o archivo(s) 
> adjunto(s) es confidencial/privilegiada y está destinada a ser leída sólo por 
> la(s) persona(s) a la(s) que va dirigida. Si usted lee este mensaje y no es 
> el destinatario señalado, el empleado o el agente responsable de entregar el 
> mensaje al destinatario, o ha recibido esta comunicación por error, le 
> informamos que está totalmente prohibida, y puede ser ilegal, cualquier 
> divulgación, distribución o reproducción de esta comunicación, y le rogamos 
> que nos lo notifique inmediatamente y nos devuelva el mensaje original a la 
> dirección arriba mencionada. Gracias.
> 
> Viruses: Although we have taken steps to insure that this e-mail and 
> attachments are free from any virus, we advise that in keeping with good 
> computing practice, the recipient should ensure they are actually virus free.
> 
> Virus: Aunque hemos tomado las medidas para asegurarnos que este correo 
> electrónico y sus ficheros adjuntos están libres de virus, le recomendamos 
> que a efectos de mantener buenas prácticas de seguridad, el receptor debe 
> asegurarse que este correo y sus ficheros adjuntos están libres de virus.
> 
> ___
> 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: Possible Catalina problem...

2020-06-08 Thread Torsten Holmer via use-livecode
Hi Paul,

I have started three LiveCode standalones on Catalina with no problems. But 
they are just standalones created frome the IDE with no signing etc.

If you like, I can test your apps on my MacBook with Catalina in order to check 
if the problems are replicable.

CU,
Torsten


> Am 08.06.2020 um 16:55 schrieb Paul Dupuis via use-livecode 
> :
> 
> We have run into a possible problem. Researchware makes two applications, 
> HyperRESEARCH and HyperTRANSCRIBE. We have new forthcoming versions of both 
> built on LiveCode 9.5.1.
> 
> These two applications are code signed and the DMG is code signed, notarized, 
> and stapled for Catalina. They both work fine on testing on macOS ranging 
> from Mavericks (10.9) to Mojave (10.14).
> 
> We also only have a single Catalina system to test on. On that single system, 
> each application seems to work fine, but if we run them at the same time, the 
> second app to launch throws a script error on startup - and it looks like it 
> may be related to network actions on startup.
> 
> We have a TON more testing to do, but I wanted to ask if anyone have seen ANY 
> Catalina specific problems running multiple LiveCode standalones at the same 
> time?
> 
> Our hope is that this is a problem SPECIFIC to our single Catalina mac and 
> not a LC Engine or tsNet Catalina specific bug of some sort. To know that 
> some one else has run multiple LC 9 standalones at the same time on Catalina 
> and seen no errors would be kind of encouraging right now.
> 
> 
> 
> 
> 
> 
> ___
> 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: OT: How to graph a specific data set?

2020-05-08 Thread Torsten Holmer via use-livecode
Hi,

this looks to me as a graph and this is the way it should be visualized.

I have written a small Livecode stack which creates Graphviz files for 
different layouts. This are the results:

http://www.thinkworx.de/graphs/Graph-sfdp.png
http://www.thinkworx.de/graphs/Graph-neato.png
http://www.thinkworx.de/graphs/Graph-dot.png
http://www.thinkworx.de/graphs/Graph-circo.png

If you like, I can explain how to make these graphs.

Cheers,
Torsten


> Am 05.05.2020 um 16:52 schrieb Paul Dupuis via use-livecode 
> :
> 
> This is NOT a "How to do this in LiveCode" question.
> 
> I have a data set (below), produced by a LiveCode program and the data is 
> exported to Excel.
> 
> I am trying to figure out:
> 
> 1) What the "best" style of graph to visualize this data is? I thought 
> perhaps a "Bubble Chart" but  - in Excel at least - does not seem to work for 
> this data.
> 
> 
> 2) After determining the "best" chart style is, what charting tool (if not 
> Excel) can generate that style of chart for this data?
> 
> Any tips anyone may have would be very welcome.
> 
> The data set is below. This shows that "A" intersects with B once and C 
> intersects with J 4 times (as example of how to read the data). I have 
> replaced the actual labels (text strings for rows and columns) with the 
> English alphabet for simplicity.
> 
> 
> 
>   A   B   C   D   E   F   G   H   I   
> J   K   L   M   N   O   P   Q   R   S 
>   T   U   V   W   X Y Z
> A 0   1   0   0   0   0   0   0   0   
> 0   0   0   0   0   0   0   0   0   0 
>   0   0   0   0 0 0   0
> B 
>   0   0   0   0   0   0   0   0   0   
> 0   0   0   0   0   0   0   0   0   0 
>   0   0   0   0   0   0
> C 
>   
>   0   0   0   0   0   1   0   4   1   
> 0   2   0   0   1   1   0   0   1   0 
>   0   1   0   1   1
> D 
>   
>   
>   0   0   0   1   0   0   0   1   0   
> 0   0   1   0   0   0   1   0   0   0 
>   0   0   1   0
> E 
>   
>   
>   
>   0   1   0   0   0   0   1   0   1   
> 0   0   0   0   0   0   0   0   0   0 
>   0   0   0
> F 
>   
>   
>   
>   
>   0   0   0   0   0   0   0   0   0   
> 0   0   0   0   0   0   0   0   0   0 
>   0   0
> G 
>   
>   
>   
>   
>   
>   0   0   0   0   0   0   0   0   0   
> 0   0   0   0   0   0   0   0   0   1 
>   0
> H 
>   
>   
>   
>   
>   
>   
>   0   0   0   0   0   0   0   0   1   
> 0   0   0   0   0   0   0   0   0   0
> I 
>   
>   
>   
>   
>   
>   
>   
>   0   0   0   1   0   0   0   0   0   
> 0   0   0   0   0   0   0   0   0
> J 
>   
>   
>   
>   
>   
>   
>   
>   
>   0   1   0   1   0   0   0   0   0   
> 0   0   0   0   0   0   0   0
> K 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   0   0   1   0   0   0   0   0   1   
> 0   0   1   1   0   0   0
> L 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   0   0   0   2   0   0   0   0   0   
> 0   0   0   0   0   0
> M 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   0   0   0   0   0   0   0   0   0   
> 0   0   0   0   0
> N 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   0   0   0   0   0   0   0   0   0   
> 0   0   0   0
> O 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   1   0   0   0   1   0   0   0   0   
> 1   0   0
> P 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>