From Bernd.Niggemann at uni-wh.de Sat Jun 1 07:18:41 2024 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sat, 1 Jun 2024 11:18:41 +0000 Subject: Snapshot question Message-ID: <8DC380B5-23ED-49DC-87E4-955717BA7A49@uni-wh.de> Neville wrote > Now while referenced images such as png’s can be > rotated (more precisely, have their angle set) they lose their scaling, > reverting to their native size; and rotated images cannot be scaled (why?? set the resizeQuality of the image to good or best depending on your image (images get a bit fuzzy when rotated) you can resize a rotated image if you set the imageData of the rotated image to the imageData of the rotated image set the angle of image 1 to 15 set the imageData of image 1 to the imageData of image 1 As soon as you set the imageData of the image it is not referenced anymore. But it can be resized. I do not know your requirements exactly but if you want to set the angle repeatedly then it is best to store the original (non-rotated) text of the image and do your rotation every time from that starting point. i.e. store original set angle restore to origina set next angle Examples of rotating and resizing of image can be found in this topic of the Forum (old stuff but still working) https://forums.livecode.com/viewtopic.php?f=27&t=8042 Kind regards Bernd From Bernd.Niggemann at uni-wh.de Sat Jun 1 09:57:12 2024 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sat, 1 Jun 2024 13:57:12 +0000 Subject: Snapshot question Message-ID: <1E534C68-6918-4E46-B135-2AC1C7908995@uni-wh.de> Neville wrote Now while referenced images such as png’s can be rotated (more precisely, have their angle set) they lose their scaling, reverting to their native size; and rotated images cannot be scaled (why?? set the resizeQuality of the image to good or best depending on your image (images get a bit fuzzy when rotated) you can resize a rotated image if you set the imageData of the rotated image to the imageData of the rotated image set the angle of image 1 to 15 set the imageData of image 1 to the imageData of image 1 As soon as you set the imageData of the image it is not referenced anymore. But it can be resized. I do not know your requirements exactly but if you want to set the angle repeatedly then it is best to store the original (non-rotated) text of the image and do your rotation every time from that starting point. i.e. store original set angle restore to origina set next angle Examples of rotating and resizing of image can be found in this topic of the Forum (old stuff but still working) https://forums.livecode.com/viewtopic.php?f=27&t=8042 Kind regards Bernd From tom at makeshyft.com Mon Jun 3 12:02:03 2024 From: tom at makeshyft.com (Tom Glod) Date: Mon, 3 Jun 2024 12:02:03 -0400 Subject: oAuth in production? Message-ID: Hi Folks, Can anyone confirm that LCs oAuth works well in production and cross platform? Thanks, Tom From ambassador at fourthworld.com Mon Jun 3 19:22:04 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Mon, 03 Jun 2024 23:22:04 +0000 Subject: LiveCode on Social Media Message-ID: <37638b79f1777f1ae9a5158c518af995dac19af9@fourthworld.com> For LC support nothing beats this use-list and the LC Forums, but for spreading the word about LC and the cool stuff you're making with it nothing beat social media. Two of the largest social media discussion groups for LC are: LinkedIn: "LiveCode Developers" Best social media platform for professional interests https://www.linkedin.com/groups/50811/ Facebook: "LiveCode Users" One of the biggest platforms for general audiences https://www.facebook.com/groups/livecodeusers Is there a third I should include there? If you use those platforms please consider joining the LC groups. The more active discussion that takes place there, the more newcomers may be introduced to the language we love. -- Richard Gaskin FourthWorld.com From hakan at exformedia.se Tue Jun 4 04:55:13 2024 From: hakan at exformedia.se (=?utf-8?Q?H=C3=A5kan_Liljegren?=) Date: Tue, 4 Jun 2024 10:55:13 +0200 Subject: Snapshot question In-Reply-To: <8DC380B5-23ED-49DC-87E4-955717BA7A49@uni-wh.de> References: <8DC380B5-23ED-49DC-87E4-955717BA7A49@uni-wh.de> Message-ID: LiveCode refuses to scale rotated images if the angle is set and lockloc is false but if you set lockloc to true you can scale the rotated image. If you just rotate an image with lockloc set (to true) it will always keep the image inside the original bounding box which is normally not what you want. But if you want to rotate and keep the same scale you need to calculate the new width and height of the image based on the scale factor. But if you have the scale factor nd the wanted angle we can, with some trigonometry, calculate the new width and height and thus create a function: constant deg2Rad = pi/180 on rotateAndScaleImage pImgID pDeg pScale if pScale is empty then put 1 into pScale put the loc of pImgID into tLoc put the formattedwidth of pImgID * pScale into tWidth put the formattedheight of pImgID * pScale into tHeight put pDeg * deg2Rad into tRad put abs(sin(tRad)) into tSin put abs(cos(tRad)) into tCos put tWidth * tCos + tHeight * tSin into tNewWidth put tWidth * tSin + tHeight * tCos into tNewHeight lock screen set the angle of pImgID to pDeg set the width of pImgID to tNewWidth set the height of pImgID to tNewHeight set the loc of pImgID to tLoc end rotateAndScaleImage pImgID is the reference to the image, pDeg is the rotation angle in degrees and pScale is the scale factor for the image. E.g. rotateAndScaleImage the long id of image “MyImage”, 22, 0.5 Will rotate image “MyImage” by 22 degrees at half the original size NOTE! The function above rotates the image around it’s center and to get the function to work the lockloc needs to be set to true Happy coding! :-Håkan > 1 juni 2024 kl. 13:18 skrev Niggemann, Bernd via use-livecode : > > Neville wrote >> Now while referenced images such as png’s can be >> rotated (more precisely, have their angle set) they lose their scaling, >> reverting to their native size; and rotated images cannot be scaled (why?? > > set the resizeQuality of the image to good or best depending on your image (images get a bit fuzzy when rotated) > > you can resize a rotated image if you set the imageData of the rotated image to the imageData of the rotated image > > set the angle of image 1 to 15 > set the imageData of image 1 to the imageData of image 1 > > As soon as you set the imageData of the image it is not referenced anymore. But it can be resized. > > I do not know your requirements exactly but if you want to set the angle repeatedly then it is best to store the original (non-rotated) text of the image and do your rotation every time from that starting point. > > i.e. > store original > set angle > restore to origina > set next angle > > Examples of rotating and resizing of image can be found in this topic of the Forum (old stuff but still working) > > https://forums.livecode.com/viewtopic.php?f=27&t=8042 > > Kind regards > Bernd > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Tue Jun 4 08:10:52 2024 From: paul at researchware.com (Paul Dupuis) Date: Tue, 4 Jun 2024 08:10:52 -0400 Subject: LiveCode on Social Media In-Reply-To: <37638b79f1777f1ae9a5158c518af995dac19af9@fourthworld.com> References: <37638b79f1777f1ae9a5158c518af995dac19af9@fourthworld.com> Message-ID: <22d189d2-b90b-401e-8e5a-6e1b3347c090@researchware.com> I followed this one for a little while: https://www.reddit.com/r/livecode/ It was not very active, and, like many Reddit groups, prone to SPAM. Reddit, in general, does have a large developer community. On 6/3/2024 7:22 PM, Richard Gaskin via use-livecode wrote: > For LC support nothing beats this use-list and the LC Forums, but for spreading the word about LC and the cool stuff you're making with it nothing beat social media. > > Two of the largest social media discussion groups for LC are: > > > LinkedIn: "LiveCode Developers" > Best social media platform for professional interests > https://www.linkedin.com/groups/50811/ > > > Facebook: "LiveCode Users" > One of the biggest platforms for general audiences > https://www.facebook.com/groups/livecodeusers > > > Is there a third I should include there? > > If you use those platforms please consider joining the LC groups. The more active discussion that takes place there, the more newcomers may be introduced to the language we love. > > -- > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Tue Jun 4 10:24:40 2024 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 4 Jun 2024 10:24:40 -0400 Subject: Snapshot question In-Reply-To: <800B6231-EC7E-45C7-93D8-67F28A8664D4@optusnet.com.au> References: <800B6231-EC7E-45C7-93D8-67F28A8664D4@optusnet.com.au> Message-ID: <059CFA51-2219-4139-AC98-1BBA43A012D1@starfirelighting.com> The docs must be wrong. I just tested with all seven of the graphic options in the tools palette, and they all rotate just fine. Craig > On May 31, 2024, at 9:30 PM, Neville Smythe via use-livecode wrote: > > Many thanks Craig and Bernd for your suggestions > > Craig: Unfortunately the docs say revRotatePoly only works with lines, curves and polygons > > Bernd: Oh! Yes, exporting as png does work to give transparent corner bits! Obvious now! > > I think I had briefly considered this and rejected it because at the time I was conflating the problem with an issue I am going to have later in my project. The roundrect graphics are going to be used as niches for a collection of images: the images should be scaled and rotated to fit the graphic object (or now its png alter-ego). Now while referenced images such as png’s can be rotated (more precisely, have their angle set) they lose their scaling, reverting to their native size; and rotated images cannot be scaled (why?? Rather a strange restriction. I think the graphical engine for LC is showing its age rather badly). Which somehow led me to think I had to use the bitmap form for snapshots. But if I place and scale the original image, then export that as a png, the exported image should have the required size and so can then be rotated without changing its size. I hope. > > Neville > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Tue Jun 4 14:48:12 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 04 Jun 2024 18:48:12 +0000 Subject: Snapshot question Message-ID: Craig wrote: > The docs must be wrong. I just tested with all seven of the graphic > options in the tools palette, and they all rotate just fine. I'd guess that Dictionary entry was written before July 7, 2007. In the revcommonlibrary script you'll find the revRotatePoly command on lines 496 thru 532, with the comment block above it noting the date it was added. On line 506 it gets the EFFECTIVE points for any graphic styles that doesn't innately have a points property. On line 525 it changes the style of the target graphic object to polygon if needed. Those two changes are not present in the older revRotatePolygonOld command listed just below it. -- Richard Gaskin FourthWorld.com From neville.smythe at optusnet.com.au Tue Jun 4 20:30:11 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 5 Jun 2024 10:30:11 +1000 Subject: Snapshot question In-Reply-To: References: Message-ID: <8348FF57-300D-49E5-96AA-40C58DDF7E1A@optusnet.com.au> > On 5 Jun 2024, at 2:00 am, Craig wrote: > > The docs must be wrong. I just tested with all seven of the graphic options in the tools palette, and they all rotate just fine. You are absolutely right, a roundedRect graphic does rotate with revPolyRotate. Don’t know why I trusted the docs rather than testing for myself (In my defence, I have been thinking more about my later issue of rotating scaled images). Moreover when the graphic is selected the rotated boundary is hilighted rather than the bounding box boundary as with a rotated image, which is huge advantage. The graphic's label is not rotated, which is a small disadvantage - or a feature; I can live with it for my application. So I can now delete a hundred or more lines of work-around code. And Hakan, many thanks, this will be very useful. But who knew!? Which is rather my point - perhaps scaling of rotated images was prohibited by default just because LC thought developers couldn’t deal with the trigonometry? So much good stuff from Bernd, Craig and Hakan. Neville Smythe From craig at starfirelighting.com Wed Jun 5 10:06:55 2024 From: craig at starfirelighting.com (Craig Newman) Date: Wed, 5 Jun 2024 10:06:55 -0400 Subject: Snapshot question In-Reply-To: References: Message-ID: <43E484B7-7EF1-4A98-9231-D51DA5449A03@starfirelighting.com> Richard. Intersting stuff. When one first drags a roundRect from the toolbar, the PI has a field to enter a value for the “roundRadius” property. But after a rotation, where the graphic is now defined solely by its “points” property, the ability to get or set that property disappears. I suppose this makes sense. And if one sets the roundRadius property to a value greater than the geometry of the graphic will allow, that is, the radius of the corners is greater than that which will ‘fit” onto the graphic itself, one gets a circle, though defined by points as opposed to the usual startAngle and arcAngle. Craig > On Jun 4, 2024, at 2:48 PM, Richard Gaskin via use-livecode wrote: > > Craig wrote: >> The docs must be wrong. I just tested with all seven of the graphic >> options in the tools palette, and they all rotate just fine. > > I'd guess that Dictionary entry was written before July 7, 2007. > > In the revcommonlibrary script you'll find the revRotatePoly command on lines 496 thru 532, with the comment block above it noting the date it was added. > > On line 506 it gets the EFFECTIVE points for any graphic styles that doesn't innately have a points property. > > On line 525 it changes the style of the target graphic object to polygon if needed. > > Those two changes are not present in the older revRotatePolygonOld command listed just below it. > > -- > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From jaguayo at telur.es Thu Jun 6 11:05:18 2024 From: jaguayo at telur.es (JosebaTELUR) Date: Thu, 6 Jun 2024 17:05:18 +0200 Subject: Mosquitto library. In-Reply-To: References: Message-ID: Hello: I'm trying to get the Mosquitto library to work and can't get it to work. Any help from the forum? (LiveCode 9.6.9 and Mojave System). Un saludo. Joseba. From tom at makeshyft.com Fri Jun 7 12:43:12 2024 From: tom at makeshyft.com (Tom Glod) Date: Fri, 7 Jun 2024 12:43:12 -0400 Subject: Mosquitto library. In-Reply-To: References: Message-ID: How are you trying to get it to work with Livecode? On Thu, Jun 6, 2024 at 11:06 AM JosebaTELUR via use-livecode < use-livecode at lists.runrev.com> wrote: > Hello: > > I'm trying to get the Mosquitto library to work and can't get it to work. > Any help from the forum? > (LiveCode 9.6.9 and Mojave System). > > Un saludo. > > Joseba. > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From bogdanoff at me.com Fri Jun 7 14:24:48 2024 From: bogdanoff at me.com (Peter Bogdanoff) Date: Fri, 7 Jun 2024 14:24:48 -0400 Subject: Mosquitto library. In-Reply-To: References: Message-ID: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Related to Mosquitto and the publish/subscribe model: is there any method now in LiveCode for my application to receive outside messages without explicitly checking to see if anything is available? In other words, is there a way for a message from a server to directly enter the message path within LC? Or is this totally dependent on a plugin based on something like what Joseba is asking? Peter Bogdanoff > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode wrote: > >> Mosquitto library From MikeKerner at roadrunner.com Fri Jun 7 15:44:42 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Fri, 7 Jun 2024 15:44:42 -0400 Subject: Mosquitto library. In-Reply-To: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> References: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Message-ID: * if you're on mobile, you can use push * you can also set up a small web server in your app to receive messages. levure uses this technique to receive messages from a plugin in sublime text that a script has been updated (so livecode will reload the script) * if we get websockets working, that will be another way to make this work. On Fri, Jun 7, 2024 at 2:26 PM Peter Bogdanoff via use-livecode < use-livecode at lists.runrev.com> wrote: > Related to Mosquitto and the publish/subscribe model: is there any method > now in LiveCode for my application to receive outside messages without > explicitly checking to see if anything is available? In other words, is > there a way for a message from a server to directly enter the message path > within LC? > > Or is this totally dependent on a plugin based on something like what > Joseba is asking? > > Peter Bogdanoff > > > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > >> Mosquitto library > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From tom at makeshyft.com Fri Jun 7 18:13:30 2024 From: tom at makeshyft.com (Tom Glod) Date: Fri, 7 Jun 2024 18:13:30 -0400 Subject: Mosquitto library. In-Reply-To: References: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Message-ID: websockets ....again. On Fri, Jun 7, 2024 at 3:46 PM Mike Kerner via use-livecode < use-livecode at lists.runrev.com> wrote: > * if you're on mobile, you can use push > * you can also set up a small web server in your app to receive messages. > levure uses this technique to receive messages from a plugin in sublime > text that a script has been updated (so livecode will reload the script) > * if we get websockets working, that will be another way to make this work. > > On Fri, Jun 7, 2024 at 2:26 PM Peter Bogdanoff via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > Related to Mosquitto and the publish/subscribe model: is there any method > > now in LiveCode for my application to receive outside messages without > > explicitly checking to see if anything is available? In other words, is > > there a way for a message from a server to directly enter the message > path > > within LC? > > > > Or is this totally dependent on a plugin based on something like what > > Joseba is asking? > > > > Peter Bogdanoff > > > > > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > > > >> Mosquitto library > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > -- > On the first day, God created the heavens and the Earth > On the second day, God created the oceans. > On the third day, God put the animals on hold for a few hours, > and did a little diving. > And God said, "This is good." > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From tom at makeshyft.com Fri Jun 7 18:14:15 2024 From: tom at makeshyft.com (Tom Glod) Date: Fri, 7 Jun 2024 18:14:15 -0400 Subject: Mosquitto library. In-Reply-To: References: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Message-ID: I think it might be time to solve this. On Fri, Jun 7, 2024 at 6:13 PM Tom Glod wrote: > websockets ....again. > > On Fri, Jun 7, 2024 at 3:46 PM Mike Kerner via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> * if you're on mobile, you can use push >> * you can also set up a small web server in your app to receive messages. >> levure uses this technique to receive messages from a plugin in sublime >> text that a script has been updated (so livecode will reload the script) >> * if we get websockets working, that will be another way to make this >> work. >> >> On Fri, Jun 7, 2024 at 2:26 PM Peter Bogdanoff via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> >> > Related to Mosquitto and the publish/subscribe model: is there any >> method >> > now in LiveCode for my application to receive outside messages without >> > explicitly checking to see if anything is available? In other words, is >> > there a way for a message from a server to directly enter the message >> path >> > within LC? >> > >> > Or is this totally dependent on a plugin based on something like what >> > Joseba is asking? >> > >> > Peter Bogdanoff >> > >> > > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode < >> > use-livecode at lists.runrev.com> wrote: >> > > >> > >> Mosquitto library >> > >> > _______________________________________________ >> > use-livecode mailing list >> > use-livecode at lists.runrev.com >> > Please visit this url to subscribe, unsubscribe and manage your >> > subscription preferences: >> > http://lists.runrev.com/mailman/listinfo/use-livecode >> > >> >> >> -- >> On the first day, God created the heavens and the Earth >> On the second day, God created the oceans. >> On the third day, God put the animals on hold for a few hours, >> and did a little diving. >> And God said, "This is good." >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > From MikeKerner at roadrunner.com Sat Jun 8 10:12:11 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Sat, 8 Jun 2024 10:12:11 -0400 Subject: Mosquitto library. In-Reply-To: References: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Message-ID: it might be time for the compiler to come out of the vaporware or the web features to come out of the vaporware if you've never set up a web server, there is example code in levure for setting up a tiny one to receive and respond to events. On Fri, Jun 7, 2024 at 6:15 PM Tom Glod via use-livecode < use-livecode at lists.runrev.com> wrote: > I think it might be time to solve this. > > On Fri, Jun 7, 2024 at 6:13 PM Tom Glod wrote: > > > websockets ....again. > > > > On Fri, Jun 7, 2024 at 3:46 PM Mike Kerner via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > >> * if you're on mobile, you can use push > >> * you can also set up a small web server in your app to receive > messages. > >> levure uses this technique to receive messages from a plugin in sublime > >> text that a script has been updated (so livecode will reload the script) > >> * if we get websockets working, that will be another way to make this > >> work. > >> > >> On Fri, Jun 7, 2024 at 2:26 PM Peter Bogdanoff via use-livecode < > >> use-livecode at lists.runrev.com> wrote: > >> > >> > Related to Mosquitto and the publish/subscribe model: is there any > >> method > >> > now in LiveCode for my application to receive outside messages without > >> > explicitly checking to see if anything is available? In other words, > is > >> > there a way for a message from a server to directly enter the message > >> path > >> > within LC? > >> > > >> > Or is this totally dependent on a plugin based on something like what > >> > Joseba is asking? > >> > > >> > Peter Bogdanoff > >> > > >> > > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode < > >> > use-livecode at lists.runrev.com> wrote: > >> > > > >> > >> Mosquitto library > >> > > >> > _______________________________________________ > >> > use-livecode mailing list > >> > use-livecode at lists.runrev.com > >> > Please visit this url to subscribe, unsubscribe and manage your > >> > subscription preferences: > >> > http://lists.runrev.com/mailman/listinfo/use-livecode > >> > > >> > >> > >> -- > >> On the first day, God created the heavens and the Earth > >> On the second day, God created the oceans. > >> On the third day, God put the animals on hold for a few hours, > >> and did a little diving. > >> And God said, "This is good." > >> _______________________________________________ > >> use-livecode mailing list > >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From ambassador at fourthworld.com Sat Jun 8 21:11:54 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sun, 09 Jun 2024 01:11:54 +0000 Subject: Mosquitto library. Message-ID: <924925da58c2560273c1ce6345fe1a02c376e4f0@fourthworld.com> Mike Kerner wrote: > * if you're on mobile, you can use push Desktop push isn't supported in LC's notifications API? > * you can also set up a small web server in your app to receive messages. > levure uses this technique to receive messages from a plugin in sublime > text that a script has been updated (so livecode will reload the script) Good on a LAN, but how do you get past a firewall without port forwarding? > * if we get websockets working, that will be another way to make this work. Do we need websockets on this? XMPP, for example, runs over regular sockets. Either way, I'd imagine a subscribe client looking to avoid polling is going to depend on a long-lived socket, no? Richard Gaskin FourthWorld.com From bobsneidar at iotecdigital.com Mon Jun 10 11:37:16 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 10 Jun 2024 15:37:16 +0000 Subject: Mosquitto library. In-Reply-To: <924925da58c2560273c1ce6345fe1a02c376e4f0@fourthworld.com> References: <924925da58c2560273c1ce6345fe1a02c376e4f0@fourthworld.com> Message-ID: <28700611-BB31-4B6A-B744-EC8EBDA9B58A@iotecdigital.com> No, and Yes. ;-) Bob S On Jun 8, 2024, at 6:11 PM, Richard Gaskin via use-livecode wrote: * if we get websockets working, that will be another way to make this work. Do we need websockets on this? XMPP, for example, runs over regular sockets. Either way, I'd imagine a subscribe client looking to avoid polling is going to depend on a long-lived socket, no? Richard Gaskin FourthWorld.com From MikeKerner at roadrunner.com Tue Jun 11 17:08:26 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Tue, 11 Jun 2024 17:08:26 -0400 Subject: Mosquitto library. In-Reply-To: <28700611-BB31-4B6A-B744-EC8EBDA9B58A@iotecdigital.com> References: <924925da58c2560273c1ce6345fe1a02c376e4f0@fourthworld.com> <28700611-BB31-4B6A-B744-EC8EBDA9B58A@iotecdigital.com> Message-ID: >Either way, I'd imagine a subscribe client looking to avoid polling is going to depend on a long-lived socket, no? That's part of the point of a websocket. you don't have to keep reopening it, and both ends can use it, as needed. On Mon, Jun 10, 2024 at 11:38 AM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > No, and Yes. ;-) > > Bob S > > > On Jun 8, 2024, at 6:11 PM, Richard Gaskin via use-livecode < > use-livecode at lists.runrev.com> wrote: > > * if we get websockets working, that will be another way to make this work. > > Do we need websockets on this? XMPP, for example, runs over regular > sockets. > > Either way, I'd imagine a subscribe client looking to avoid polling is > going to depend on a long-lived socket, no? > > > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From tariel at mac.com Wed Jun 12 11:07:24 2024 From: tariel at mac.com (Tariel Gogoberidze) Date: Wed, 12 Jun 2024 19:07:24 +0400 Subject: Apple developer application and installer certificates In-Reply-To: References: Message-ID: Hello, I received message from apple that -- Your Developer ID Installer Certificate will no longer be valid in 30 days. To generate a new certificate, sign in and visit Certificates, Identifiers & Profiles. And Your Developer ID Application Certificate will no longer be valid in 30 days. To generate a new certificate, sign in and visit Certificates, Identifiers & Profiles. — We do have applications created in LiveCode that we are still selling (outside of apple store) but this applications were apple certified with the help of Matthias Rebbe and I have no idea how to renew or generate new Installer and Developer ID certificates. The remote colocation computer on which Matthias did this certification magic is still available to connect to and we do have apple developer account. So if Matthias or somebody else is willing to help (for a payment of course) I will appreciate it and will provide access to remote computer, apple developer ID and other necessary information. Regards Tariel Gogoveridze From bobsneidar at iotecdigital.com Wed Jun 12 11:20:47 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 15:20:47 +0000 Subject: Date Words Message-ID: <9A1C0830-0504-4373-91BB-ACBAC3BA4350@iotecdigital.com> Hi all. Did you ever want to use phrases like yesterday, last tuesday or next friday in a date field? function dateWords pDate if word 1 of pDate is not among the items of "last,next,yesterday,today,tomorrow" then \ return empty put date() into tCurrentDate convert tCurrentDate to dateItems if the number of words of pDate = 2 then put "sunday,monday,tuesday,wednesday,thursday,friday,saturday" into tDaysOfWeek put itemOffset(word 2 of pDate, tDaysOfWeek) into tDayNumber put item 7 of tCurrentDate into tThisDayNumber if tDayNumber = 0 then \ return empty end if switch case word 1 of pDate is "last" if tDayNumber >= tThisDayNumber then \ subtract 7 from item 3 of tCurrentDate add (tDayNumber - tThisDayNumber) to item 3 of tCurrentDate break case word 1 of pDate is "next" add 7-tDayNumber to item 3 of tCurrentDate break case pDate is "yesterday" subtract 1 from item 3 of tCurrentDate break case pDate is "today" -- don't do anything break case pDate is "tomorrow" add 1 to item 3 of tCurrentDate break end switch put formatDate(tCurrentDate, "standard") into pDate return pDate end dateWords FUNCTION formatDate theDate, theFormat /* Accepts any valid date for the first parameter. If not a valid date, it simply returns what was passed. Second parameter can be any of the following: sql date: date in the yyyy-mm-dd format short date, abbreviated date, internet date, long date: LC versions of the same julian date: Julian number based on (I believe) Jacques formula standard date: The date in the form of "mm/dd/yyyy" */ put theDate into tSavedDate put the itemdelimiter into theOldDelim set the itemdelimiter to "-" IF the length of item 1 of theDate = 4 AND \ the number of items of theDate = 3 AND \ item 1 of theDate is a number AND \ item 2 of theDate is a number AND \ item 3 of theDate is a number THEN put item 2 of theDate & "/" & \ item 3 of theDate & "/" & \ item 1 of theDate into theDate END IF -- replace "." with "/" in theDate convert theDate to dateitems set the itemdelimiter to theOldDelim -- if the number of items of theDate <> 7 then -- answer "'" & theDate & "' is not a valid date format!" -- return tSavedDate -- end if SWITCH word 1 of theFormat CASE "sql" /* put item 1 of theDate & "-" & \ format("%02d",item 2 of theDate) & "-" & \ format("%02d",item 3 of theDate) into theDate */ put format("%s-%02d-%02d", item 1 of theDate, item 2 of theDate, \ item 3 of theDate) into theDate break CASE "short" convert theDate from dateitems to short date break CASE "abbreviated" convert theDate from dateitems to abbreviated date break CASE "abbr" convert theDate from dateitems to abbreviated date break CASE "internet" convert theDate from dateitems to internet date break CASE "long" convert theDate from dateitems to long date break CASE "julian" put the date into theDate convert theDate to dateItems IF ((item 2 of theDate = 1) OR (item 2 of theDate = 2)) THEN put 1 into theDay ELSE put 0 into theDay END IF put item 1 of theDate + 4800 - theDay into theYear put item 2 of theDate + (12 * theDay) - 3 into theMonth put item 3 of theDate + \ ((153 * theMonth + 2) div 5) + \ (365 * theYear) + \ (theYear div 4) - \ (theYear div 100) + \ (theYear div 400) - \ 32045 into theDate break case "standard" put format("%02d/%02d/%04d", item 2 of theDate, item 3 of theDate, \ item 1 of theDate) into theDate break default -- answer info "'" & theFormat & "' is not a valid parameter." As sheet put tSavedDate into theDate END SWITCH return theDate END formatDate Bob S From ambassador at fourthworld.com Wed Jun 12 13:26:33 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 12 Jun 2024 17:26:33 +0000 Subject: Mosquitto library. Message-ID: Mike Kerner wrote: > Richard wrote: >> Either way, I'd imagine a subscribe client looking to avoid polling >> is going to depend on a long-lived socket, no? > > That's part of the point of a websocket. you don't have to keep > reopening it, and both ends can use it, as needed. Exactly, websockets are useful in browser apps because browsers don't offer direct socket support. LiveCode makes OS-native apps and supports sockets. The socketTimeoutInterval lets us set how long they live. What am I missing? -- Richard Gaskin FourthWorld.com From bobsneidar at iotecdigital.com Wed Jun 12 13:39:06 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 17:39:06 +0000 Subject: Mosquitto library. In-Reply-To: References: Message-ID: Hi Richard. This email thread now has me curious. If I have an app that starts listening on a port, does that server port have a timeout associated with it that needs refreshing, or does the timeout only exist when a client connects? I have always assumed the latter. Bob S > On Jun 12, 2024, at 10:26 AM, Richard Gaskin via use-livecode wrote: > > Mike Kerner wrote: > >> Richard wrote: >>> Either way, I'd imagine a subscribe client looking to avoid polling >>> is going to depend on a long-lived socket, no? >> >> That's part of the point of a websocket. you don't have to keep >> reopening it, and both ends can use it, as needed. > > Exactly, websockets are useful in browser apps because browsers don't offer direct socket support. > > LiveCode makes OS-native apps and supports sockets. > > The socketTimeoutInterval lets us set how long they live. > > What am I missing? > > -- > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 12 14:20:24 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 18:20:24 +0000 Subject: Pop Combo Menu Message-ID: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> Hi all. I have a Combo Menu button. I want to have it “pop” open and show the options via script, but I cannot find a command to do that. Bob S From MikeKerner at roadrunner.com Wed Jun 12 14:42:49 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 12 Jun 2024 14:42:49 -0400 Subject: Mosquitto library. In-Reply-To: References: Message-ID: the original question was about mosquitto and handling messaging, thus the remarks about websockets. bob: the server just opens the port and listens. there is no timeout on the server. the client sends the request, and then times out if it does not receive a reply. whether it receives a reply or times out, the request is closed, and the client stops listening. the server does not retain the ability to continue to communicate with the client, once it has replied. websockets keep that channel open. On Wed, Jun 12, 2024 at 1:40 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi Richard. > > This email thread now has me curious. If I have an app that starts > listening on a port, does that server port have a timeout associated with > it that needs refreshing, or does the timeout only exist when a client > connects? I have always assumed the latter. > > Bob S > > > > On Jun 12, 2024, at 10:26 AM, Richard Gaskin via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Mike Kerner wrote: > > > >> Richard wrote: > >>> Either way, I'd imagine a subscribe client looking to avoid polling > >>> is going to depend on a long-lived socket, no? > >> > >> That's part of the point of a websocket. you don't have to keep > >> reopening it, and both ends can use it, as needed. > > > > Exactly, websockets are useful in browser apps because browsers don't > offer direct socket support. > > > > LiveCode makes OS-native apps and supports sockets. > > > > The socketTimeoutInterval lets us set how long they live. > > > > What am I missing? > > > > -- > > Richard Gaskin > > FourthWorld.com > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From paul at researchware.com Wed Jun 12 15:01:14 2024 From: paul at researchware.com (Paul Dupuis) Date: Wed, 12 Jun 2024 15:01:14 -0400 Subject: Pop Combo Menu In-Reply-To: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> Message-ID: <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> On 6/12/2024 2:20 PM, Bob Sneidar via use-livecode wrote: > Hi all. I have a Combo Menu button. I want to have it pop open and show the options via script, but I cannot find a command to do that. > > Bob S > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode You can use: *click*at(rightofbtn1- 5,topofbtn1+ 5) assuming the combo button is 'btn 1' on your card or replace btn 1 with a reference to your combo button. The idea is to generate a "click" at the location of the pulldown arrow part of the combo button. You can create a new empty stack and place a combo btn on it and try line of code in the message box with the browse tool selected. From paul at researchware.com Wed Jun 12 16:01:21 2024 From: paul at researchware.com (Paul Dupuis) Date: Wed, 12 Jun 2024 16:01:21 -0400 Subject: Pop Combo Menu In-Reply-To: <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> Message-ID: <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> On 6/12/2024 3:01 PM, Paul Dupuis via use-livecode wrote: > *click*at(rightofbtn1- 5,topofbtn1+ 5) Sorry that line of code is: (paste of formatted text messed it up) click at (right of btn 1 - 5,top of btn 1 + 5) From bobsneidar at iotecdigital.com Wed Jun 12 16:23:07 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 20:23:07 +0000 Subject: Pop Combo Menu In-Reply-To: <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> Message-ID: Thanks I was hoping I could do it without a click. Something like pop menu . There is a popup menu command but I think that only works with popup menus. Bob S > On Jun 12, 2024, at 1:01 PM, Paul Dupuis via use-livecode wrote: > > On 6/12/2024 3:01 PM, Paul Dupuis via use-livecode wrote: >> *click*at(rightofbtn1- 5,topofbtn1+ 5) > > Sorry that line of code is: (paste of formatted text messed it up) > > click at (right of btn 1 - 5,top of btn 1 + 5) > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 12 16:25:59 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 20:25:59 +0000 Subject: Pop Combo Menu In-Reply-To: References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> Message-ID: <88F1E79F-FF0A-4BB3-8A12-A12F5F44D268@iotecdigital.com> Hmmm looks like I can use popup button and provide a location. Bob S > On Jun 12, 2024, at 1:23 PM, Bob Sneidar via use-livecode wrote: > > Thanks I was hoping I could do it without a click. Something like pop menu . There is a popup menu command but I think that only works with popup menus. > > Bob S > > >> On Jun 12, 2024, at 1:01 PM, Paul Dupuis via use-livecode wrote: >> >> On 6/12/2024 3:01 PM, Paul Dupuis via use-livecode wrote: >>> *click*at(rightofbtn1- 5,topofbtn1+ 5) >> >> Sorry that line of code is: (paste of formatted text messed it up) >> >> click at (right of btn 1 - 5,top of btn 1 + 5) >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 12 16:30:41 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 20:30:41 +0000 Subject: Pop Combo Menu In-Reply-To: <88F1E79F-FF0A-4BB3-8A12-A12F5F44D268@iotecdigital.com> References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> <88F1E79F-FF0A-4BB3-8A12-A12F5F44D268@iotecdigital.com> Message-ID: BUUUTTT… It looks like that detaches the menu from the button so any subsequent click on the actual menu button displays the button as a popup menu. Bob S > On Jun 12, 2024, at 1:25 PM, Bob Sneidar wrote: > > Hmmm looks like I can use popup button and provide a location. > > Bob S > > >> On Jun 12, 2024, at 1:23 PM, Bob Sneidar via use-livecode wrote: >> >> Thanks I was hoping I could do it without a click. Something like pop menu . There is a popup menu command but I think that only works with popup menus. >> >> Bob S >> >> >>> On Jun 12, 2024, at 1:01 PM, Paul Dupuis via use-livecode wrote: >>> >>> On 6/12/2024 3:01 PM, Paul Dupuis via use-livecode wrote: >>>> *click*at(rightofbtn1- 5,topofbtn1+ 5) >>> >>> Sorry that line of code is: (paste of formatted text messed it up) >>> >>> click at (right of btn 1 - 5,top of btn 1 + 5) >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > From marksmithhfx at gmail.com Wed Jun 12 16:36:25 2024 From: marksmithhfx at gmail.com (Mark Smith) Date: Wed, 12 Jun 2024 21:36:25 +0100 Subject: Date Words In-Reply-To: <9A1C0830-0504-4373-91BB-ACBAC3BA4350@iotecdigital.com> References: <9A1C0830-0504-4373-91BB-ACBAC3BA4350@iotecdigital.com> Message-ID: <83C09BB9-F0E4-40AC-B9FF-79029D7793CE@gmail.com> Hi Bob, I love the concept in principle but that’s a lot of code (to write and debug) and it does’t cover every possible permutation and combination of date requests. I long for a time when we can just capture a string like “a week from next Friday” and then call… function string2gptDate chatGPT “what is the date “ & “a week from next Friday” -- the latter being the captured input, probably expressed as a field or var return it end string2gptDate Which I just tried after prompting “when asked for a date please return the date and not an explanation as to how you arrived at the date” and in response to the above it returned "June 28, 2024”. Magnifico! Mark > On 12 Jun 2024, at 4:20 PM, Bob Sneidar via use-livecode wrote: > > Hi all. > > Did you ever want to use phrases like yesterday, last tuesday or next friday in a date field? > > function dateWords pDate > if word 1 of pDate is not among the items of "last,next,yesterday,today,tomorrow" then \ > return empty > > put date() into tCurrentDate > convert tCurrentDate to dateItems > > if the number of words of pDate = 2 then > put "sunday,monday,tuesday,wednesday,thursday,friday,saturday" into tDaysOfWeek > put itemOffset(word 2 of pDate, tDaysOfWeek) into tDayNumber > put item 7 of tCurrentDate into tThisDayNumber > > if tDayNumber = 0 then \ > return empty > end if > > switch > case word 1 of pDate is "last" > if tDayNumber >= tThisDayNumber then \ > subtract 7 from item 3 of tCurrentDate > add (tDayNumber - tThisDayNumber) to item 3 of tCurrentDate > break > case word 1 of pDate is "next" > add 7-tDayNumber to item 3 of tCurrentDate > break > case pDate is "yesterday" > subtract 1 from item 3 of tCurrentDate > break > case pDate is "today" > -- don't do anything > break > case pDate is "tomorrow" > add 1 to item 3 of tCurrentDate > break > end switch > > put formatDate(tCurrentDate, "standard") into pDate > return pDate > end dateWords > > FUNCTION formatDate theDate, theFormat > /* > Accepts any valid date for the first parameter. If not a valid date, it simply returns > what was passed. Second parameter can be any of the following: > sql date: date in the yyyy-mm-dd format > short date, abbreviated date, internet date, long date: LC versions of the same > julian date: Julian number based on (I believe) Jacques formula > standard date: The date in the form of "mm/dd/yyyy" > */ > > put theDate into tSavedDate > put the itemdelimiter into theOldDelim > set the itemdelimiter to "-" > > IF the length of item 1 of theDate = 4 AND \ > the number of items of theDate = 3 AND \ > item 1 of theDate is a number AND \ > item 2 of theDate is a number AND \ > item 3 of theDate is a number THEN > put item 2 of theDate & "/" & \ > item 3 of theDate & "/" & \ > item 1 of theDate into theDate > END IF > > -- replace "." with "/" in theDate > convert theDate to dateitems > set the itemdelimiter to theOldDelim > > -- if the number of items of theDate <> 7 then > -- answer "'" & theDate & "' is not a valid date format!" > -- return tSavedDate > -- end if > > SWITCH word 1 of theFormat > CASE "sql" > /* > put item 1 of theDate & "-" & \ > format("%02d",item 2 of theDate) & "-" & \ > format("%02d",item 3 of theDate) into theDate > */ > put format("%s-%02d-%02d", item 1 of theDate, item 2 of theDate, \ > item 3 of theDate) into theDate > break > CASE "short" > convert theDate from dateitems to short date > break > CASE "abbreviated" > convert theDate from dateitems to abbreviated date > break > CASE "abbr" > convert theDate from dateitems to abbreviated date > break > CASE "internet" > convert theDate from dateitems to internet date > break > CASE "long" > convert theDate from dateitems to long date > break > CASE "julian" > put the date into theDate > convert theDate to dateItems > IF ((item 2 of theDate = 1) OR (item 2 of theDate = 2)) THEN > put 1 into theDay > ELSE > put 0 into theDay > END IF > put item 1 of theDate + 4800 - theDay into theYear > put item 2 of theDate + (12 * theDay) - 3 into theMonth > put item 3 of theDate + \ > ((153 * theMonth + 2) div 5) + \ > (365 * theYear) + \ > (theYear div 4) - \ > (theYear div 100) + \ > (theYear div 400) - \ > 32045 into theDate > break > case "standard" > put format("%02d/%02d/%04d", item 2 of theDate, item 3 of theDate, \ > item 1 of theDate) into theDate > break > default > -- answer info "'" & theFormat & "' is not a valid parameter." As sheet > put tSavedDate into theDate > END SWITCH > > return theDate > END formatDate > > Bob S > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Wed Jun 12 18:10:19 2024 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Thu, 13 Jun 2024 00:10:19 +0200 Subject: Apple developer application and installer certificates In-Reply-To: References: Message-ID: Hello Tariel, renewing is very easy and takes only minutes. If you want, I can guide you through this process. Just contact me off-list. Regards, Matthias > Am 12.06.2024 um 17:07 schrieb Tariel Gogoberidze via use-livecode : > > Hello, > > I received message from apple that > > -- > Your Developer ID Installer Certificate will no longer be valid in 30 days. To generate a new certificate, sign in and visit Certificates, Identifiers & Profiles. > > And > > Your Developer ID Application Certificate will no longer be valid in 30 days. To generate a new certificate, sign in and visit Certificates, Identifiers & Profiles. > — > > We do have applications created in LiveCode that we are still selling (outside of apple store) but this applications were apple certified with the help of Matthias Rebbe and I have no idea how to renew or generate new Installer and Developer ID certificates. > > The remote colocation computer on which Matthias did this certification magic is still available to connect to and we do have apple developer account. So if Matthias or somebody else is willing to help (for a payment of course) I will appreciate it and will provide access to remote computer, apple developer ID and other necessary information. > > Regards > Tariel Gogoveridze > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alex at tweedly.net Wed Jun 12 19:33:25 2024 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 13 Jun 2024 00:33:25 +0100 Subject: Mosquitto library. In-Reply-To: References: Message-ID: On 12/06/2024 18:26, Richard Gaskin via use-livecode wrote: > Mike Kerner wrote: > >> Richard wrote: >>> Either way, I'd imagine a subscribe client looking to avoid polling >>> is going to depend on a long-lived socket, no? >> That's part of the point of a websocket. you don't have to keep >> reopening it, and both ends can use it, as needed. > Exactly, websockets are useful in browser apps because browsers don't offer direct socket support. > > LiveCode makes OS-native apps and supports sockets.\ If the "OS" is 'web', will LC support sockets? According to the dictionary, it doesn't = but that might (I hope) be out of date. But this might be the place we really need to use websockets. Alex. From MikeKerner at roadrunner.com Wed Jun 12 21:31:38 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 12 Jun 2024 21:31:38 -0400 Subject: Apple developer application and installer certificates In-Reply-To: References: Message-ID: for anyone else dropping into this thread, custom apps have to be rebuilt with a new cert, once per year. it's not a big deal, it's just something that has to be done. it takes a few minutes, max. On Wed, Jun 12, 2024 at 6:11 PM matthias rebbe via use-livecode < use-livecode at lists.runrev.com> wrote: > Hello Tariel, > > renewing is very easy and takes only minutes. If you want, I can guide you > through this process. > Just contact me off-list. > > Regards, > Matthias > > > Am 12.06.2024 um 17:07 schrieb Tariel Gogoberidze via use-livecode < > use-livecode at lists.runrev.com>: > > > > Hello, > > > > I received message from apple that > > > > -- > > Your Developer ID Installer Certificate will no longer be valid in 30 > days. To generate a new certificate, sign in and visit Certificates, > Identifiers & Profiles. > > > > And > > > > Your Developer ID Application Certificate will no longer be valid in 30 > days. To generate a new certificate, sign in and visit Certificates, > Identifiers & Profiles. > > — > > > > We do have applications created in LiveCode that we are still selling > (outside of apple store) but this applications were apple certified with > the help of Matthias Rebbe and I have no idea how to renew or generate new > Installer and Developer ID certificates. > > > > The remote colocation computer on which Matthias did this certification > magic is still available to connect to and we do have apple developer > account. So if Matthias or somebody else is willing to help (for a payment > of course) I will appreciate it and will provide access to remote computer, > apple developer ID and other necessary information. > > > > Regards > > Tariel Gogoveridze > > > > > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From scott at elementarysoftware.com Wed Jun 12 21:53:19 2024 From: scott at elementarysoftware.com (scott at elementarysoftware.com) Date: Wed, 12 Jun 2024 18:53:19 -0700 Subject: iPad Keyboard and rawKeyDown Message-ID: <00242C07-E0C5-4961-9E7F-4685E5419A2D@elementarysoftware.com> I’m new to using a physical keyboard with an iPad and haven’t ever done any testing to see if it worked in LiveCode. My recent experience using the new “Magic Keyboard for iPad Pro" is that rawKeyDown (and rawKeyUp) messages are not being handled by LiveCode. Is this a general failing of mobileKeyboards (the dictionary suggests not) an issue with just this newly released keyboard… or perhaps the more likely problem of developer error? Just checking in before I submit a bug (or enhancement?) report. -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com email scott at elementarysoftware.com booth 1-360-734-4701 ------------------------------------------------------ From tom at makeshyft.com Wed Jun 12 21:58:35 2024 From: tom at makeshyft.com (Tom Glod) Date: Wed, 12 Jun 2024 21:58:35 -0400 Subject: Mosquitto library. In-Reply-To: References: Message-ID: I was just viewitng the "livecode" tag on github. and saw this library. https://github.com/trevordevore/lc-mosquitto Trevor is prolific. Big respect. On Wed, Jun 12, 2024 at 7:33 PM Alex Tweedly via use-livecode < use-livecode at lists.runrev.com> wrote: > > On 12/06/2024 18:26, Richard Gaskin via use-livecode wrote: > > Mike Kerner wrote: > > > >> Richard wrote: > >>> Either way, I'd imagine a subscribe client looking to avoid polling > >>> is going to depend on a long-lived socket, no? > >> That's part of the point of a websocket. you don't have to keep > >> reopening it, and both ends can use it, as needed. > > Exactly, websockets are useful in browser apps because browsers don't > offer direct socket support. > > > > LiveCode makes OS-native apps and supports sockets.\ > > If the "OS" is 'web', will LC support sockets? > > According to the dictionary, it doesn't = but that might (I hope) be out > of date. But this might be the place we really need to use websockets. > > Alex. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From jbv at souslelogo.com Thu Jun 13 04:28:32 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Thu, 13 Jun 2024 04:28:32 -0400 Subject: Different borders for a group Message-ID: <6d092a14185510ca84acee1d4829ebd5@souslelogo.com> Hi list, Is there a way to have different border widths and colors for the top and the bottom of a group ? Or should I include graphic lines inside the group ? Thank you in advance. jbv From craig at starfirelighting.com Thu Jun 13 09:51:11 2024 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 13 Jun 2024 09:51:11 -0400 Subject: Different borders for a group In-Reply-To: <6d092a14185510ca84acee1d4829ebd5@souslelogo.com> References: <6d092a14185510ca84acee1d4829ebd5@souslelogo.com> Message-ID: <1F83D27E-51E2-49D8-8760-3B9B7917CB20@starfirelighting.com> Hi. The borderWidth is a property of the entire border. You will have to add your own one by one. Hey, at least that allows you to change colors and other things as well. Craig > On Jun 13, 2024, at 4:28 AM, jbv via use-livecode wrote: > > Hi list, > > Is there a way to have different border widths and colors > for the top and the bottom of a group ? > Or should I include graphic lines inside the group ? > > Thank you in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Thu Jun 13 09:54:53 2024 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 13 Jun 2024 09:54:53 -0400 Subject: Pop Combo Menu In-Reply-To: References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> Message-ID: <88036E20-765A-4951-8119-94909012CF9D@starfirelighting.com> "I was hoping I could do it without a click.” Why? That works like a charm, and does not even make the slightest sound. Craig > On Jun 12, 2024, at 4:23 PM, Bob Sneidar via use-livecode wrote: > > I was hoping I could do it without a click. From klaus at major-k.de Fri Jun 14 14:19:59 2024 From: klaus at major-k.de (Klaus major-k) Date: Fri, 14 Jun 2024 20:19:59 +0200 Subject: Survey: Would you buy one or more widgets from the PRO PACK separately? Message-ID: Hi friends, Livecode is selling most of their widgets separately, however not the ones from the PRO PACK: Mobile Debugger Script Profiler tsNet PRO mergAccessory PDF Viewer But unfortunately the PRO PACK is quite expensive: 328.90 Euro PLUS VAT! I am sure most of you do not need all the widgets in the PRO PACK, but maybe one or two of them. So please just write if you'd like to buy one or more of these, maybe we can induce LC to also sell them separately. ---------- I confess that this is a quite selfish idea from me, I only use the PDF Viewer widget in my freeware* app and the app exclusively made for my band mates, three of us use an iPad and two of us an Android tablet. *It's actually "donationware", but noone donated any money so far in the last couple of years. :-/ I bought the complete PRO Pack in the last three years, although I ONLY need the PDF viewer, but cannot afford this anymore. Especially since I do not earn any money with my apps and I need to renew my Apple Developer Membership in october. I would LOVE to buy just the PDF widget separately! Thank you for reading! P.S. Since Android browser cannot display PDF files out of the box, this is no alternative for me. Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From paul at researchware.com Fri Jun 14 15:01:24 2024 From: paul at researchware.com (Paul Dupuis) Date: Fri, 14 Jun 2024 15:01:24 -0400 Subject: Survey: Would you buy one or more widgets from the PRO PACK separately? In-Reply-To: References: Message-ID: <3d26732c-1135-4dd8-a891-cbd69e8181ba@researchware.com> Of those listed, I would pay for (if I needed to, but I have the full LC that includes extensions) the PDF Viewer and, possibly, tsNet PRO I do not develop for mobile, so mobile widgets are not of any immediate interest. On 6/14/2024 2:19 PM, Klaus major-k via use-livecode wrote: > Hi friends, > > Livecode is selling most of their widgets separately, > however not the ones from the PRO PACK: > Mobile Debugger > Script Profiler > tsNet PRO > mergAccessory > PDF Viewer > > But unfortunately the PRO PACK is quite expensive: > 328.90 Euro PLUS VAT! > > I am sure most of you do not need all the widgets in the > PRO PACK, but maybe one or two of them. > > So please just write if you'd like to buy one or more of these, > maybe we can induce LC to also sell them separately. > > ---------- > > I confess that this is a quite selfish idea from me, I only > use the PDF Viewer widget in my freeware* app and the > app exclusively made for my band mates, three of us use > an iPad and two of us an Android tablet. > > *It's actually "donationware", but noone donated any money > so far in the last couple of years. :-/ > > I bought the complete PRO Pack in the last three years, > although I ONLY need the PDF viewer, but cannot afford > this anymore. Especially since I do not earn any money > with my apps and I need to renew my Apple Developer > Membership in october. > > I would LOVE to buy just the PDF widget separately! > > Thank you for reading! > > P.S. > Since Android browser cannot display PDF files out of the box, > this is no alternative for me. > > > Best > > Klaus > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From MikeKerner at roadrunner.com Mon Jun 17 10:26:53 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Mon, 17 Jun 2024 10:26:53 -0400 Subject: Hacking LiveCode In-Reply-To: References: Message-ID: the lc hack repo has been updated with more goodness from mark wieder. mark added more patches to powerPlug and more ways to apply patches to powerStrip examples: * can handle object scripts * can now add missing functions * new PowerPlugs for additional bugfixes On Sun, Sep 25, 2022 at 5:57 PM Mike Kerner wrote: > that's one of the things i'm wondering about, like "did you uninstall it, > or just unload it, or did you uninstall it but not unload it? did you build > a new version in the test environment and test that against an existing > install?" > it's been days since i ran into this, and the only notes that i have on it > are that i ran into it. i didn't keep track of the recipe. > > > On Sun, Sep 25, 2022 at 5:08 PM Brian Milby via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Did you restart LiveCode after installing the updated widget? >> >> Brian Milby >> brian at milby7.com >> >> > On Sep 25, 2022, at 4:53 PM, Mike Kerner via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> > >> > 1. is that documented, somewhere, because i cannot find it. >> > 2. that isn't the problem i was having. the problem i was having was >> that >> > if i took a widget (navRad, for instance), and added code to it, then >> > installed the new version, preexisting copies of the widget would not >> > execute the new code. new copies would. >> > so, it's 100% possible that i discovered some other behavior, but after >> > testing it a few times, instead of documenting the recipe, i accepted >> that >> > this was the behavior, and went about addressing it. except, today, >> when i >> > tested it, the behavior is the one that you would want (in unbuilt apps, >> > behaviors in newer versions of the widget are reflected in existing >> copies >> > of the widget). so i have to go replicate the behavior, again and >> develop a >> > recipe, again. >> > 3. fortunately or not, chasing this particular bear for days has >> resulted >> > in a snippet in the hack repo which i hope extracts all properties for >> an >> > object, standard or specific. >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > > -- > On the first day, God created the heavens and the Earth > On the second day, God created the oceans. > On the third day, God put the animals on hold for a few hours, > and did a little diving. > And God said, "This is good." > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From klaus at major-k.de Tue Jun 18 06:34:57 2024 From: klaus at major-k.de (Klaus major-k) Date: Tue, 18 Jun 2024 12:34:57 +0200 Subject: Survey: Would you buy one or more widgets from the PRO PACK separately? In-Reply-To: <3d26732c-1135-4dd8-a891-cbd69e8181ba@researchware.com> References: <3d26732c-1135-4dd8-a891-cbd69e8181ba@researchware.com> Message-ID: <55BD4EEB-E61A-4B5A-88B8-C5A408C63BB1@major-k.de> Hi Paul, > Am 14.06.2024 um 21:01 schrieb Paul Dupuis via use-livecode : > > Of those listed, I would pay for (if I needed to, but I have the full LC that includes extensions) the PDF Viewer and, possibly, tsNet PRO > I do not develop for mobile, so mobile widgets are not of any immediate interest. sorry for the late response, thank you very much for you feedback! > On 6/14/2024 2:19 PM, Klaus major-k via use-livecode wrote: >> Hi friends, >> >> Livecode is selling most of their widgets separately, >> however not the ones from the PRO PACK: >> Mobile Debugger >> Script Profiler >> tsNet PRO >> mergAccessory >> PDF Viewer >> >> But unfortunately the PRO PACK is quite expensive: >> 328.90 Euro PLUS VAT! >> >> I am sure most of you do not need all the widgets in the >> PRO PACK, but maybe one or two of them. >> >> So please just write if you'd like to buy one or more of these, >> maybe we can induce LC to also sell them separately. >> >> ---------- >> >> I confess that this is a quite selfish idea from me, I only >> use the PDF Viewer widget in my freeware* app and the >> app exclusively made for my band mates, three of us use >> an iPad and two of us an Android tablet. >> >> *It's actually "donationware", but noone donated any money >> so far in the last couple of years. :-/ >> >> I bought the complete PRO Pack in the last three years, >> although I ONLY need the PDF viewer, but cannot afford >> this anymore. Especially since I do not earn any money >> with my apps and I need to renew my Apple Developer >> Membership in october. >> >> I would LOVE to buy just the PDF widget separately! >> >> Thank you for reading! >> >> P.S. >> Since Android browser cannot display PDF files out of the box, >> this is no alternative for me. Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From panos.merakos at livecode.com Thu Jun 20 09:49:17 2024 From: panos.merakos at livecode.com (panagiotis merakos) Date: Thu, 20 Jun 2024 16:49:17 +0300 Subject: [[ ANN ]] Release 9.6.12 Message-ID: Dear list members, We are pleased to announce the release of LiveCode 9.6.12 STABLE. LiveCode 9.6.12 STABLE comes with 19 bugfixes and performance improvements since the last stable version, including support for adding a privacy manifest in your iOS app, which is a new requirement for AppStore submissions. You can find more details on the bug fixes and improvements of this new release here: https://livecode.com/release-9-6-12-stable/ You can find the release in your LiveCode account area or get it via the automatic updater. Enjoy! Kind regards The LiveCode Team -- From jbv at souslelogo.com Fri Jun 21 07:15:41 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Fri, 21 Jun 2024 07:15:41 -0400 Subject: Copying groups Message-ID: <42d886e9d09d2582d52d0fb751dcd2ed@souslelogo.com> Hi list, I have a single card stack containing several groups, each group containing several fields and images. I need to copy these groups to a substack. I use : copy grp tname of cd 1 of this stack to cd 1 of stack myTarget The weird thing is that all groups are copied, but the text content of every field is missing. What did I miss ? Thank you in advance. jbv From merakosp at gmail.com Fri Jun 21 08:44:14 2024 From: merakosp at gmail.com (panagiotis merakos) Date: Fri, 21 Jun 2024 15:44:14 +0300 Subject: Copying groups In-Reply-To: <42d886e9d09d2582d52d0fb751dcd2ed@souslelogo.com> References: <42d886e9d09d2582d52d0fb751dcd2ed@souslelogo.com> Message-ID: Hello jbv, What is the sharedText property of the field(s)? I _think_ it has to be true in your use case. Kind regards, Panos -- On Fri, 21 Jun 2024 at 14:16, jbv via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi list, > > I have a single card stack containing several groups, > each group containing several fields and images. > I need to copy these groups to a substack. > I use : > copy grp tname of cd 1 of this stack to cd 1 of stack myTarget > > The weird thing is that all groups are copied, but the text > content of every field is missing. > What did I miss ? > > Thank you in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From jbv at souslelogo.com Fri Jun 21 08:57:24 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Fri, 21 Jun 2024 08:57:24 -0400 Subject: Copying groups In-Reply-To: References: <42d886e9d09d2582d52d0fb751dcd2ed@souslelogo.com> Message-ID: <871eb07b6b397a9e856232a56ef5272e@souslelogo.com> Hello, Yes, indeed, the sharedText property of the field(s) need to be set to true. Many thanks. jbv Le 2024-06-21 08:44, panagiotis merakos via use-livecode a crit : > Hello jbv, > > What is the sharedText property of the field(s)? I _think_ it has to be > true in your use case. > > Kind regards, > Panos > -- > > On Fri, 21 Jun 2024 at 14:16, jbv via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Hi list, >> >> I have a single card stack containing several groups, >> each group containing several fields and images. >> I need to copy these groups to a substack. >> I use : >> copy grp tname of cd 1 of this stack to cd 1 of stack myTarget >> >> The weird thing is that all groups are copied, but the text >> content of every field is missing. >> What did I miss ? >> >> Thank you in advance. >> jbv >> From jbv at souslelogo.com Fri Jun 21 11:13:35 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Fri, 21 Jun 2024 11:13:35 -0400 Subject: Printing to pdf Message-ID: <568ef2bd8e342c3c15b5db8ae5301d80@souslelogo.com> Hi list, I have a stack with several cards 750 x 1000px. I am trying to print these cards as pdf, but according to this lesson https://lessons.livecode.com/m/4071/l/29177-how-to-create-pdfs-using-livecode the stack size should be 575 x 800 to fit a A4 document ratio. Is it possible to "force" the printing to different sizes, without clipping the content of the cards ? I tried : print card x into 0,0,750,1000 but the cards are still clipped. The pdf I need to build is not for printing, only for reading on screen. Thank you in advance. jbv From jbv at souslelogo.com Fri Jun 21 11:21:34 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Fri, 21 Jun 2024 11:21:34 -0400 Subject: Printing to pdf In-Reply-To: <568ef2bd8e342c3c15b5db8ae5301d80@souslelogo.com> References: <568ef2bd8e342c3c15b5db8ae5301d80@souslelogo.com> Message-ID: <54c5259bacf1184498d0368549aefdbb@souslelogo.com> Nevermind, I found the solution : I modified the printScale property. Best From bobsneidar at iotecdigital.com Fri Jun 21 16:30:28 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 21 Jun 2024 20:30:28 +0000 Subject: Windows SE how to clone while dragging Message-ID: <323CA777-0D10-4B04-AC1E-D38377767FAC@iotecdigital.com> On the MacOS LC SE, I can hold the optionKey down while dragging some selected text and it will clone the selection rather than just move it. For some reason, in LC for Windows SE, it still only moves the selected text. Bummer! Is there a key combo for cloning? If not, WHY? Bob S From curry at pair.com Sun Jun 23 05:36:06 2024 From: curry at pair.com (Curry Kenworthy) Date: Sun, 23 Jun 2024 05:36:06 -0400 Subject: Windows SE how to clone while dragging In-Reply-To: <323CA777-0D10-4B04-AC1E-D38377767FAC@iotecdigital.com> References: <323CA777-0D10-4B04-AC1E-D38377767FAC@iotecdigital.com> Message-ID: Bob: > On the MacOS LC SE, I can hold the optionKey down while dragging > some selected text and it will clone the selection ... > Windows SE ... Is there a key combo for cloning? Ctrl. Best wishes, Curry Kenworthy Radically Innovative Christian LiveCode Development "PASSION for Elegant, Efficient Code!" https://livecodeconsulting.com/ From bobsneidar at iotecdigital.com Mon Jun 24 11:57:13 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 24 Jun 2024 15:57:13 +0000 Subject: Windows SE how to clone while dragging In-Reply-To: References: <323CA777-0D10-4B04-AC1E-D38377767FAC@iotecdigital.com> Message-ID: Right you are. I would have sworn I tried that! Bob S > On Jun 23, 2024, at 2:36 AM, Curry Kenworthy via use-livecode wrote: > > Bob: > > > On the MacOS LC SE, I can hold the optionKey down while dragging > > some selected text and it will clone the selection ... > > > Windows SE ... Is there a key combo for cloning? > > Ctrl. > > Best wishes, > > Curry Kenworthy > > Radically Innovative Christian LiveCode Development > "PASSION for Elegant, Efficient Code!" > https://livecodeconsulting.com/ From bobsneidar at iotecdigital.com Mon Jun 24 12:22:08 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 24 Jun 2024 16:22:08 +0000 Subject: Socket Packaging Message-ID: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> Hi all. I came up with deceptively simple wrappers for packaging data for transmission over raw sockets. I can’t send the slyEncrypt and slyDecrypt handlers because I use methods no one else knows. But you can roll your own or else eliminate encryption altogether. And to answer the question befor it’s asked, I don’t use SSL because I don’t like having to deal with certificates, and also because I use a method for encryption that I don’t think anyone else has thought of, or at least I can’t find any info online. Bob S command packagePayload @pPayload, pUseEncryption if pPayload is an array then \ put arrayEncode(pPayload) into pPayload if pUseEncryption then \ put slyEncrypt(pPayload) into pPayload put base64Encode(pPayload) into pPayload end packagePayload command unpackPayload @pPayload put base64Decode(pPayload) into pPayload if pPayload begins with "salted" then \ put slyDecrypt(pPayload) into pPayload try put arrayDecode(pPayload) into tResult put tResult into pPayload catch tError -- not an array end try end unpackPayload From MikeKerner at roadrunner.com Mon Jun 24 13:54:35 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Mon, 24 Jun 2024 13:54:35 -0400 Subject: Socket Packaging In-Reply-To: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> References: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> Message-ID: have a look at caddy. it allows you to reverse proxy and have the best of both worlds: * server traffic to and from caddy is in the clear, so less mess * caddy handles all the cert silliness, while also giving you ssl to/from the clients we've been doing this for two years (maybe it's three, now). it works great, and i never have to think about it. also, the configuration was really, really simple. On Mon, Jun 24, 2024 at 12:23 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi all. > > I came up with deceptively simple wrappers for packaging data for > transmission over raw sockets. I can’t send the slyEncrypt and slyDecrypt > handlers because I use methods no one else knows. But you can roll your own > or else eliminate encryption altogether. > > And to answer the question befor it’s asked, I don’t use SSL because I > don’t like having to deal with certificates, and also because I use a > method for encryption that I don’t think anyone else has thought of, or at > least I can’t find any info online. > > Bob S > > command packagePayload @pPayload, pUseEncryption > if pPayload is an array then \ > put arrayEncode(pPayload) into pPayload > > if pUseEncryption then \ > put slyEncrypt(pPayload) into pPayload > > put base64Encode(pPayload) into pPayload > end packagePayload > > command unpackPayload @pPayload > put base64Decode(pPayload) into pPayload > > if pPayload begins with "salted" then \ > put slyDecrypt(pPayload) into pPayload > > try > put arrayDecode(pPayload) into tResult > put tResult into pPayload > catch tError > -- not an array > end try > end unpackPayload > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From david.bovill at gmail.com Mon Jun 24 15:01:35 2024 From: david.bovill at gmail.com (David Bovill) Date: Mon, 24 Jun 2024 20:01:35 +0100 Subject: Socket Packaging In-Reply-To: References: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> Message-ID: Yes, I recently looked at a few reverse proxies. I now run Caddy on localhost and have some scripts to manage caddyfiles and starting and stopping the caddy server. Happy to show share if interested in a Zoom. On Mon, 24 Jun 2024 at 18:56, Mike Kerner via use-livecode < use-livecode at lists.runrev.com> wrote: > have a look at caddy. it allows you to reverse proxy and have the best of > both worlds: > * server traffic to and from caddy is in the clear, so less mess > * caddy handles all the cert silliness, while also giving you ssl to/from > the clients > we've been doing this for two years (maybe it's three, now). it works > great, and i never have to think about it. > also, the configuration was really, really simple. > > On Mon, Jun 24, 2024 at 12:23 PM Bob Sneidar via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > Hi all. > > > > I came up with deceptively simple wrappers for packaging data for > > transmission over raw sockets. I can’t send the slyEncrypt and slyDecrypt > > handlers because I use methods no one else knows. But you can roll your > own > > or else eliminate encryption altogether. > > > > And to answer the question befor it’s asked, I don’t use SSL because I > > don’t like having to deal with certificates, and also because I use a > > method for encryption that I don’t think anyone else has thought of, or > at > > least I can’t find any info online. > > > > Bob S > > > > command packagePayload @pPayload, pUseEncryption > > if pPayload is an array then \ > > put arrayEncode(pPayload) into pPayload > > > > if pUseEncryption then \ > > put slyEncrypt(pPayload) into pPayload > > > > put base64Encode(pPayload) into pPayload > > end packagePayload > > > > command unpackPayload @pPayload > > put base64Decode(pPayload) into pPayload > > > > if pPayload begins with "salted" then \ > > put slyDecrypt(pPayload) into pPayload > > > > try > > put arrayDecode(pPayload) into tResult > > put tResult into pPayload > > catch tError > > -- not an array > > end try > > end unpackPayload > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > -- > On the first day, God created the heavens and the Earth > On the second day, God created the oceans. > On the third day, God put the animals on hold for a few hours, > and did a little diving. > And God said, "This is good." > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From ambassador at fourthworld.com Mon Jun 24 18:07:08 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Mon, 24 Jun 2024 22:07:08 +0000 Subject: Socket Packaging Message-ID: <95250661daac2f77cab67805bb87f3bfec07ca7f@fourthworld.com> Bob Sneidar wrote: > I don’t use SSL because I don’t like having to deal with certificates, > and also because I use a method for encryption that I don’t think > anyone else has thought of, or at least I can’t find any info online. Encryption is half of what SSL offers, the other half being external validation that the server you're trying to reach hasn't been spoofed. I used to roll my own but these days I have audit compliance to meet, so I just do things the OG way. For those of you who need a cert on any modern Ubuntu, it's now a one-liner: sudo apt install certbot python3-certbot-apache Run that, follow the prompts, and you're good to go in seconds. Details: https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04 Of course it never hurts to do belt AND suspenders, so your encrpyted packaging can offer a second layer of protection for critical needs. Richard Gaskin FourthWorld.com From paul at researchware.com Tue Jun 25 16:35:31 2024 From: paul at researchware.com (Paul Dupuis) Date: Tue, 25 Jun 2024 16:35:31 -0400 Subject: eMail attachment: best practice? Message-ID: Under a specific condition, my app creates an email with some pre-populated information using revMail: revMail address, [ccAddress, [mailSubject, [messageBody]]] So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. I realize the user still has to click their send button in their email client, but I have 2 questions: 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? From marksmithhfx at gmail.com Tue Jun 25 17:46:47 2024 From: marksmithhfx at gmail.com (Mark Smith) Date: Tue, 25 Jun 2024 22:46:47 +0100 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: I’ve not used revMail but it’s certainly well documented in mobileComposeHtmlMail. If you need an example PM me. Mark > On 25 Jun 2024, at 9:35 PM, Paul Dupuis via use-livecode wrote: > > 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? > From matthias_livecode_150811 at m-r-d.de Tue Jun 25 18:15:35 2024 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Wed, 26 Jun 2024 00:15:35 +0200 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. Here you can find an sample stack https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode And here is a link to a Livecode Lesson https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external > Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : > > Under a specific condition, my app creates an email with some pre-populated information using revMail: > > revMail address, [ccAddress, [mailSubject, [messageBody]]] > > So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody > Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. > > I realize the user still has to click their send button in their email client, but I have 2 questions: > > 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware > > 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 25 18:54:07 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 25 Jun 2024 22:54:07 +0000 Subject: eMail attachment: best practice? In-Reply-To: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> References: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> Message-ID: <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> The demo stack URL in the script does not look right. I have never used a URL in the form of SMTP://:587/ before. That can’t be right! Bob S > On Jun 25, 2024, at 3:15 PM, matthias rebbe via use-livecode wrote: > > Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. > > The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. > > Here you can find an sample stack > https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode > > And here is a link to a Livecode Lesson > https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external > > > >> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >> >> Under a specific condition, my app creates an email with some pre-populated information using revMail: >> >> revMail address, [ccAddress, [mailSubject, [messageBody]]] >> >> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >> >> I realize the user still has to click their send button in their email client, but I have 2 questions: >> >> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >> >> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 25 19:01:38 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 25 Jun 2024 23:01:38 +0000 Subject: eMail attachment: best practice? In-Reply-To: <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> References: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> Message-ID: <4CD699B4-9876-4C0A-867D-F8FB3A56C8CC@iotecdigital.com> I used a properly formatted “url” (it’s not actually a URL) for the server and got a response from the server, so I am communicating, but it’s generating an error even though the user name and password are correct (They are my credentials.) Also, considering that almost all servers are forcing the use of 2 factor or Multi-factor authentication these days, it’s probably just better to use the local mail client. Bob S > On Jun 25, 2024, at 3:53 PM, Bob Sneidar wrote: > > The demo stack URL in the script does not look right. I have never used a URL in the form of SMTP://:587/ before. That can’t be right! > > Bob S > > >> On Jun 25, 2024, at 3:15 PM, matthias rebbe via use-livecode wrote: >> >> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >> >> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >> >> Here you can find an sample stack >> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >> >> And here is a link to a Livecode Lesson >> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >> >> >> >>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>> >>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>> >>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>> >>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>> >>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>> >>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>> >>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > From paul at researchware.com Tue Jun 25 20:47:34 2024 From: paul at researchware.com (Paul Dupuis) Date: Tue, 25 Jun 2024 20:47:34 -0400 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: <53a5d8f8-d010-46c1-a702-ec3a65dfb183@researchware.com> I should have mentioned that my app is for macOS and Windows - no iOS or Android version. On 6/25/2024 5:46 PM, Mark Smith wrote: > Ive not used revMail but its certainly well documented in > mobileComposeHtmlMail. If you need an example PM me. > > Mark > > >> On 25 Jun 2024, at 9:35PM, Paul Dupuis via use-livecode >> wrote: >> >> 2) My more important question is how does one create an email with an >> attached file? I see no feature of revMail to include an attachment. >> Is there some other way? If there is no way to add an attachment, >> what might the best practice for sending the contents and structure >> of a Livecode array be? >> > From matthias_livecode_150811 at m-r-d.de Wed Jun 26 03:34:48 2024 From: matthias_livecode_150811 at m-r-d.de (Matthias Rebbe) Date: Wed, 26 Jun 2024 09:34:48 +0200 Subject: eMail attachment: best practice? In-Reply-To: <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> References: <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> Message-ID: <7394108E-089F-40F7-BD94-3B675130BF51@m-r-d.de> The url is right. The prefixes smtp:// smtps://, http:// https:// ftp:// ftps:// sftp:// and so tell the underlying tool which establish the connection to use that protocol. A trailing :587 means the connection should be established with port 587 If you are running for example a webserver on an other port than 80, e.g. 8080, you can would open use the following url in the web browser http://serverip:8080 Von meinem iPad gesendet > Am 26.06.2024 um 00:55 schrieb Bob Sneidar via use-livecode : > > The demo stack URL in the script does not look right. I have never used a URL in the form of SMTP://:587/ before. That can’t be right! > > Bob S > > >> On Jun 25, 2024, at 3:15 PM, matthias rebbe via use-livecode wrote: >> >> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >> >> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >> >> Here you can find an sample stack >> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >> >> And here is a link to a Livecode Lesson >> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >> >> >> >>>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>> >>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>> >>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>> >>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>> >>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>> >>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>> >>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Wed Jun 26 03:52:54 2024 From: matthias_livecode_150811 at m-r-d.de (Matthias Rebbe) Date: Wed, 26 Jun 2024 09:52:54 +0200 Subject: eMail attachment: best practice? In-Reply-To: <4CD699B4-9876-4C0A-867D-F8FB3A56C8CC@iotecdigital.com> References: <4CD699B4-9876-4C0A-867D-F8FB3A56C8CC@iotecdigital.com> Message-ID: I am not sure how many smtp servers support 2FA yet. If the mail client can connect to a mailserver then tsNET should also be able to. tsNET external uses a curl library. And if 2FA for SMTP gets more common, I am sure tsNet will be updated to support it. I am using tsNET in several projects for sending e-mails with logfiles and reports. This works w/o problems. Von meinem iPad gesendet > Am 26.06.2024 um 01:02 schrieb Bob Sneidar via use-livecode : > > I used a properly formatted “url” (it’s not actually a URL) for the server and got a response from the server, so I am communicating, but it’s generating an error even though the user name and password are correct (They are my credentials.) > > Also, considering that almost all servers are forcing the use of 2 factor or Multi-factor authentication these days, it’s probably just better to use the local mail client. > > Bob S > > >> On Jun 25, 2024, at 3:53 PM, Bob Sneidar wrote: >> >> The demo stack URL in the script does not look right. I have never used a URL in the form of SMTP://:587/ before. That can’t be right! >> >> Bob S >> >> >>>> On Jun 25, 2024, at 3:15 PM, matthias rebbe via use-livecode wrote: >>> >>> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >>> >>> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >>> >>> Here you can find an sample stack >>> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >>> >>> And here is a link to a Livecode Lesson >>> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >>> >>> >>> >>>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>>> >>>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>>> >>>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>>> >>>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>>> >>>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>>> >>>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>>> >>>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>>> >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Wed Jun 26 04:35:36 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 26 Jun 2024 18:35:36 +1000 Subject: Slow stack problem Message-ID: <109F54DF-1737-4C08-B6F7-694859F92D98@optusnet.com.au> I am plagued by a new problem which has arisen in an old stack that I have been using for years with hundreds of modifications over that time. It was still working well until suddenly in the last few week most of its data processing handlers have slowed to a crawl. A button that gathers text data from a number cards, does some text manipulations and then displays a modal dialog, that used to be instantaneous now takes 30 seconds to display the dialog. Another button which does extensive text gathering and processing now takes 30 minutes instead of 30 seconds. So I have done something to the data stack in the last few months. It is not a change of LC version or platform OS. A standalone I produced a couple of months ago does not display this slow behaviour when working on its old version of the data stack, but does show it when I apply it to the latest version of the data stack. But I am at loss to figure out what setting I might have changed or what else I could have done. I did not change the scripts of the offending buttons since the previous version, so it sounds like a setting change. The stack behaves as if the processing buttons have difficulty finding all the necessary handlers, or as if it is it reporting in to Shanghai or Virginia between handler calls. I don’t believe the stack is actually corrupted, actions such as scrolling fields or moving between cards all work as normal. The only other piece of information is that the CPU ramps up to 100% use in one core , so it is doing something - but what? (Memory usage goes up to 500MB but does not keep climbing, unlikely to be a memory leak or virtual memory swapping (hmmm?)) I have tried to compare the differences between the old and new version of the stacks as files using BBEdit, but most differences seem to be in binary data at the end of the files, whose meaning is opaque. Any ideas as to what might be causing this, or how I might go about diagnosis, would be hugely welcome. Neville Smytis From paul at researchware.com Wed Jun 26 09:00:00 2024 From: paul at researchware.com (Paul Dupuis) Date: Wed, 26 Jun 2024 09:00:00 -0400 Subject: eMail attachment: best practice? In-Reply-To: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> References: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> Message-ID: So this tsNet example for sending an email look great IF you are using it in an corporate or institutional setting. One where you have a known SMTP server and you know whether or not that SMTP server requires authentication. However, in the "wild" of a distributed application that could be on any customer's computer in any setting, how do you know what the customer's SMTP server is or whether it requires authentication. If it does require authentication, most people set this up in their email client ONCE (or rarely) and may not know or remember what the credentials are. So I considered using our company SMTP server, but increasingly, SMTP servers will reject messages if they are from a client computer that is not in the same domain, as is the case with ours (for anti-spamming/spoofing), so that it out as an option. I kinda need a solution that uses the clients own email client (and server). Maybe I should look at how to encode the array in a pure text form that can be part of the email body and send it that way. The problem there is that some email clients (like gMail) limit the size of the message body that can be generated from their APIs. If you use revMail with someone with gMail as their default mail, the message body can only be about 2500 characters (or maybe 5000, I forget the exact limit). I suppose I could output the array as an encoded file to the customer's desktop and ASK them to manually attach it to the generated email? I wish there was a better option. On 6/25/2024 6:15 PM, matthias rebbe via use-livecode wrote: > Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. > > The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. > > Here you can find an sample stack > https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode > > And here is a link to a Livecode Lesson > https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external > > > >> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >> >> Under a specific condition, my app creates an email with some pre-populated information using revMail: >> >> revMail address, [ccAddress, [mailSubject, [messageBody]]] >> >> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >> >> I realize the user still has to click their send button in their email client, but I have 2 questions: >> >> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >> >> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Wed Jun 26 09:33:13 2024 From: craig at starfirelighting.com (Craig Newman) Date: Wed, 26 Jun 2024 09:33:13 -0400 Subject: Slow stack problem In-Reply-To: <109F54DF-1737-4C08-B6F7-694859F92D98@optusnet.com.au> References: <109F54DF-1737-4C08-B6F7-694859F92D98@optusnet.com.au> Message-ID: <90311837-7AEF-41A7-9284-2B81154FE80A@starfirelighting.com> Have you tried trashing the LC preferences? Have you tried the recent stack with a different data stack, or perhaps one with less data? Craig > On Jun 26, 2024, at 4:35 AM, Neville Smythe via use-livecode wrote: > > I am plagued by a new problem which has arisen in an old stack that I have been using for years with hundreds of modifications over that time. It was still working well until suddenly in the last few week most of its data processing handlers have slowed to a crawl. A button that gathers text data from a number cards, does some text manipulations and then displays a modal dialog, that used to be instantaneous now takes 30 seconds to display the dialog. Another button which does extensive text gathering and processing now takes 30 minutes instead of 30 seconds. > > So I have done something to the data stack in the last few months. It is not a change of LC version or platform OS. A standalone I produced a couple of months ago does not display this slow behaviour when working on its old version of the data stack, but does show it when I apply it to the latest version of the data stack. > > But I am at loss to figure out what setting I might have changed or what else I could have done. I did not change the scripts of the offending buttons since the previous version, so it sounds like a setting change. The stack behaves as if the processing buttons have difficulty finding all the necessary handlers, or as if it is it reporting in to Shanghai or Virginia between handler calls. I don’t believe the stack is actually corrupted, actions such as scrolling fields or moving between cards all work as normal. The only other piece of information is that the CPU ramps up to 100% use in one core , so it is doing something - but what? (Memory usage goes up to 500MB but does not keep climbing, unlikely to be a memory leak or virtual memory swapping (hmmm?)) > > I have tried to compare the differences between the old and new version of the stacks as files using BBEdit, but most differences seem to be in binary data at the end of the files, whose meaning is opaque. > > Any ideas as to what might be causing this, or how I might go about diagnosis, would be hugely welcome. > > > Neville Smytis > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 26 11:18:00 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 26 Jun 2024 15:18:00 +0000 Subject: eMail attachment: best practice? In-Reply-To: References: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> Message-ID: <7F91DB47-7D17-4CF6-ADB3-6E420B375E0E@iotecdigital.com> You would need to present the user with an interface where they can enter their corporate or business SMTP information, then use that. But more mail providers are forcing MFA these days (as I mentioned) and Microsoft has even gone so far as to completely disable ALL SMTP relaying when Modern Security is enabled, and are progressively enforcing Modern Security permanently. Mail Clients that communicate with Office365 do not use SMTP, they use MAPI so they are not effected. The only thing I can suggest is to subscribe to a web based SMTP relay. Bundle the cost of that (which isn’t very much) into the price of your product. Bob S > On Jun 26, 2024, at 6:00 AM, Paul Dupuis via use-livecode wrote: > > So this tsNet example for sending an email look great IF you are using it in an corporate or institutional setting. One where you have a known SMTP server and you know whether or not that SMTP server requires authentication. > > However, in the "wild" of a distributed application that could be on any customer's computer in any setting, how do you know what the customer's SMTP server is or whether it requires authentication. If it does require authentication, most people set this up in their email client ONCE (or rarely) and may not know or remember what the credentials are. > > So I considered using our company SMTP server, but increasingly, SMTP servers will reject messages if they are from a client computer that is not in the same domain, as is the case with ours (for anti-spamming/spoofing), so that it out as an option. > > I kinda need a solution that uses the clients own email client (and server). Maybe I should look at how to encode the array in a pure text form that can be part of the email body and send it that way. The problem there is that some email clients (like gMail) limit the size of the message body that can be generated from their APIs. If you use revMail with someone with gMail as their default mail, the message body can only be about 2500 characters (or maybe 5000, I forget the exact limit). > > I suppose I could output the array as an encoded file to the customer's desktop and ASK them to manually attach it to the generated email? I wish there was a better option. > > > On 6/25/2024 6:15 PM, matthias rebbe via use-livecode wrote: >> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >> >> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >> >> Here you can find an sample stack >> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >> >> And here is a link to a Livecode Lesson >> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >> >> >> >>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>> >>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>> >>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>> >>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>> >>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>> >>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>> >>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Wed Jun 26 17:25:09 2024 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Wed, 26 Jun 2024 23:25:09 +0200 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: Von meinem iPad gesendet > Am 26.06.2024 um 15:01 schrieb Paul Dupuis via use-livecode : > > So this tsNet example for sending an email look great IF you are using it in an corporate or institutional setting. One where you have a known SMTP server and you know whether or not that SMTP server requires authentication. > However, in the "wild" of a distributed application that could be on any customer's computer in any setting, how do you know what the customer's SMTP server is or whether it requires authentication. If it does require authentication, most people set Your app needs to have a card or substack where the customers can add their mail account login data and the server ip or name and all the other information they would enter when adding an email account to their e-mail client. > this up in their email client ONCE (or rarely) and may not know or remember what the credentials are. > Those people would also run into trouble if they switch to another e-mail client or if they get a new computer where they have to setup the e-mail client again. This is not an email problem per se, but rather the problem that users are not doing proper password management. > So I considered using our company SMTP server, but increasingly, SMTP servers will reject messages if they are from a client computer that is not in the same domain, as is the case with ours (for anti-spamming/spoofing), so that it out as an option. > What exactly did you want to do? Use the server to send e-mails to internal accounts on that server? Or did you want to use that server as a relay server to send emails to external e-mail addresses? To do that you normally need an e-mail account on that server and your account needs to have the right to send external e-mails and you need to have to authenticate on that server when sending the e-mails to external users. > I kinda need a solution that uses the clients own email client (and server). tsNet behaves like an e-mail client. If the customer now there e-mail credentials and other information for setting up an e-mail client and if your app allows to enter those information, then tsNet will work without a problem. Maybe with one exception. If the server only allows 2FA for the e-mail clients, then tsNet needs to support this. Maybe this is already the case, maybe not. This is a question Charles Warwick or Livecode Support could answer > Maybe I should look at how to encode the array in a pure text form that can be part of the email body and send it that way. The problem there is that some email clients (like gMail) limit the size of the message body that can be generated from their APIs. If you use revMail with someone with gMail as their default mail, the message body can only be about 2500 characters (or maybe 5000, I forget the exact limit). > > I suppose I could output the array as an encoded file to the customer's desktop and ASK them to manually attach it to the generated email? I wish there was a better option. > > >> On 6/25/2024 6:15 PM, matthias rebbe via use-livecode wrote: >> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >> >> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >> >> Here you can find an sample stack >> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >> >> And here is a link to a Livecode Lesson >> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >> >> >> >>>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>> >>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>> >>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>> >>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>> >>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>> >>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>> >>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Wed Jun 26 20:48:25 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 27 Jun 2024 00:48:25 +0000 Subject: eMail attachment: best practice? Message-ID: <89b57739bf8f6ce14727beb9102827fadaa989fb@fourthworld.com> I wouldn't make anyone fill out anything. I'd just present a window for them to review, and POST it to my web site. The receiving CGI can do whatever I need. If the diagnostic info is for a support issue, you may be able to use your support tracking DB's API to automate creating the ticket. Richard Gaskin FourthWorld.com From matthias_livecode_150811 at m-r-d.de Thu Jun 27 03:51:13 2024 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Thu, 27 Jun 2024 09:51:13 +0200 Subject: eMail attachment: best practice? In-Reply-To: <89b57739bf8f6ce14727beb9102827fadaa989fb@fourthworld.com> References: <89b57739bf8f6ce14727beb9102827fadaa989fb@fourthworld.com> Message-ID: <80A31E9E-F4E2-464F-A10F-A45E59BDE472@m-r-d.de> > Am 27.06.2024 um 02:48 schrieb Richard Gaskin via use-livecode : > > I wouldn't make anyone fill out anything. I'd just present a window for them to review, and POST it to my web site. The receiving CGI can do whatever I need. > I would say this always depends on the purpose the app is supposed to fulfill. In my private projects I am using quite often Livecode Server as the backend for my LC apps, but I had some customer projects in the past where the customer wanted an app to send out e-mails with special attachments, like logfiles or reports or what ever and it had to be without user interaction. In the days before tsNET I either used Shao Sean's e-mail library, Chip Walter's altEmailHarness or I called command line tools using shell function to get this done. > If the diagnostic info is for a support issue, you may be able to use your support tracking DB's API to automate creating the ticket. > > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Thu Jun 27 08:10:49 2024 From: mkoob at rogers.com (Martin Koob) Date: Thu, 27 Jun 2024 08:10:49 -0400 Subject: =?utf-8?Q?Planning_upgrade_to_Mac_OS_Sonoma_14=2E5_=E2=80=93_any_?= =?utf-8?Q?issues_with_LiveCode_9=2E6=2E12_or_LC_10_Create=3F?= References: <8864688D-5F26-43F9-BB7B-77B5EEC2C752.ref@rogers.com> Message-ID: <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> Hi all I am always a laggard when it comes to doing system upgrades. Long ago traumas still linger I guess. Anyway, it is usually between the Apple Developer Conference iatn the beginning of summer and the release of the new OS version in the fall when I get enough courage to go for it and upgrade to the current macOS. So, as the subject said are there any issues with LiveCode 9.6.12 or LC 10 Create that should give me pause or should I take the plunge? Martin Koob From MikeKerner at roadrunner.com Thu Jun 27 10:42:35 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Thu, 27 Jun 2024 10:42:35 -0400 Subject: =?UTF-8?Q?Re=3A_Planning_upgrade_to_Mac_OS_Sonoma_14=2E5_=E2=80=93_any_i?= =?UTF-8?Q?ssues_with_LiveCode_9=2E6=2E12_or_LC_10_Create=3F?= In-Reply-To: <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> References: <8864688D-5F26-43F9-BB7B-77B5EEC2C752.ref@rogers.com> <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> Message-ID: still sitting on ventura. usually LC is the reason why i hold off on updating macOS, but i'm not sure what is compelling about sonoma, anyway. On Thu, Jun 27, 2024 at 8:12 AM Martin Koob via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi all > > I am always a laggard when it comes to doing system upgrades. Long ago > traumas still linger I guess. Anyway, it is usually between the Apple > Developer Conference iatn the beginning of summer and the release of the > new OS version in the fall when I get enough courage to go for it and > upgrade to the current macOS. > > So, as the subject said are there any issues with LiveCode 9.6.12 or LC 10 > Create that should give me pause or should I take the plunge? > > Martin Koob > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From bobsneidar at iotecdigital.com Thu Jun 27 11:21:01 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 27 Jun 2024 15:21:01 +0000 Subject: =?utf-8?B?UmU6IFBsYW5uaW5nIHVwZ3JhZGUgdG8gTWFjIE9TIFNvbm9tYSAxNC41IA==?= =?utf-8?B?4oCTIGFueSBpc3N1ZXMgd2l0aCBMaXZlQ29kZSA5LjYuMTIgb3IgTEMgMTAg?= =?utf-8?Q?Create=3F?= In-Reply-To: <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> References: <8864688D-5F26-43F9-BB7B-77B5EEC2C752.ref@rogers.com> <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> Message-ID: <8E57466A-FC2C-4FFA-A39E-834D1958B7FB@iotecdigital.com> I think your instincts are correct. While letting your OS lag behind by 2 or more major versions is probably a bad practice, I don’t see any reason to just automatically update everytime it’s offered. But eventually Microsoft or Apple will make it, “compelling” as Mike Kerner put it. Bob S > On Jun 27, 2024, at 5:10 AM, Martin Koob via use-livecode wrote: > > Hi all > > I am always a laggard when it comes to doing system upgrades. Long ago traumas still linger I guess. Anyway, it is usually between the Apple Developer Conference iatn the beginning of summer and the release of the new OS version in the fall when I get enough courage to go for it and upgrade to the current macOS. > > So, as the subject said are there any issues with LiveCode 9.6.12 or LC 10 Create that should give me pause or should I take the plunge? > > Martin Koob From ambassador at fourthworld.com Thu Jun 27 15:54:32 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 27 Jun 2024 19:54:32 +0000 Subject: eMail attachment: best practice? Message-ID: <883a2c8680e09e8bfc98846b999646f8279ba9c0@fourthworld.com> Matthias wrote: > Am 27.06.2024 um 02:48 schrieb Richard Gaskin>: >> I wouldn't make anyone fill out anything. I'd just present >> a window for them to review, and POST it to my web site. >> The receiving CGI can do whatever I need. > > I would say this always depends on the purpose the app is > supposed to fulfill. Every good app does. :) > In my private projects I am using quite often Livecode Server > as the backend for my LC apps, but I had some customer projects > in the past where the customer wanted an app to send out e-mails > with special attachments, like logfiles or reports or whatever > and it had to be without user interaction. I think we're on the same page. I tend to prefer open disclosure for users to review data before sending from their local machine to a server, but it's not functionally necessary. Most apps don't bother, and of course a POST command can be sent without any user interaction. > In the days before tsNET I either used Shao Sean's e-mail > library, Chip Walter's altEmailHarness or I called command > line tools using shell function to get this done. If the final reciever *needs* to be an email client, nearly any method will require a mime wrapper for the payload. The nice thing about doing that for sendmail on the server, rather than for whatever the user uses for email on the client, is we don't know what the user is using. Things can get tricky with all the possible options one might discover a need to support (native email apps, webmail like GMail or Nextcloud, gawdonlyknows what special handling may be needed for monsters like Office 365, etc.). Sendmail gives us one one well-documented compatibility target to build for and test against. And it's already available; I don't need to set up half a dozen client email options just to get started. But the other benefit with POSTing to the server is you can change your mind easily about how you want to handle it. Maybe today the reciever is a support person's email In Box, but if so that's really an intermediary place, where the final destination will be some form of issue tracking DB. So one can go ahead and use sendmail to get the info to support in email today, and later revise the CGI handler to post directly into the issue tracker DB API, saving the payroll cost and error rate that comes with rote human intermediation. Another consideration is trust, esp. when the method used requires users to enter their server credentials. With a simple POST, no interaction is needed, no information the app doesn't already have in the course of normal use is obtained. The situation is trustless, in the sense of trust not being a requirement to proceed. The moment any app asks me for any server credentiails, I need to stop and consider the implications. If the app is my email client, of course I expect that, and I only use email clients I already trust. With anything else I'm going to think it through carefully, and probably contact the vendor to seek a different method, if I bother continuing using the product at all. Imagine if you went to a web site and the Contact form required your server creds. Would you hand those over? Do your users know you intimately enough to have complete confidence they can give you the keys to their kingdom in an app form? I can imagine maybe some enterprise environments where that level of trust *might* be available. But the same security awareness that makes the environment trustable probably wouldn't ask for server credentials. Good IT staff regard all networks as hostile, even LAN. In short: - POST requires no more work for mime-wrapping the payload than client email; - sendmail on the server is a simpler target than all possible email clints; - can have a UI or not, as desired; - leaves the door open for easy re-routing later on if needed; - requires no trust from the user beyond what they might expect with any web form. -- Richard Gaskin FourthWorld.com From neville.smythe at optusnet.com.au Thu Jun 27 23:01:35 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 28 Jun 2024 13:01:35 +1000 Subject: Slow stack problem Message-ID: <69BDAEB4-249D-45DF-B1FB-9E72D3E2E79E@optusnet.com.au> Thank Craig for your suggestion about replacing the Preferences file. No luck. I am down to going through line by line to find what process is taking so much time. I am now totally confused by finding that a handler which calls no handlers of mine, and simply has a repeat loop over just 32 short lines of text on each of which it does a matchChunk … takes 20 seconds! repeat with i=2 to the number of lines of indexList put line (i+1) of indexList into which put "(^[0-9-]*\t" & which & ")" into regX put false into found repeat with k=lastFound+1 to the number of lines of fff put matchChunk(line k of fff,regX,pos1,pos2) into found if found then exit repeat end repeat if found then put k into lastFound end if put lastFound into item i of mylineNumbers end repeat The same handler, same code, in a previous version of the offending stack, takes 0.06 seconds, both in the current 9.6.12 IDE, and using a standalone compiled under a previous LC version. I don’t understand how any of my code anywhere else in the stacks in use could affect the performance of an LC built-in matchChunk, which itself does not appear to have changed between versions (I certainly don’t redeclare matchChunk anywhere). I must be missing something. Neville Smythe From curry at pair.com Thu Jun 27 23:07:13 2024 From: curry at pair.com (Curry Kenworthy) Date: Thu, 27 Jun 2024 23:07:13 -0400 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: Paul: > I wish there was a better option. in your case - simply upload the file. Best wishes, Curry Kenworthy Radically Innovative Christian LiveCode Development "PASSION for Elegant, Efficient Code!" https://livecodeconsulting.com/ From ambassador at fourthworld.com Thu Jun 27 23:22:14 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Fri, 28 Jun 2024 03:22:14 +0000 Subject: Slow stack problem Message-ID: <8343def36fe8b64890c9145c025ecc97f7240619@fourthworld.com> Neville Smythe wrote: > The same handler, same code, in a previous version of the > offending stack, takes 0.06 seconds, both in the current > 9.6.12 IDE, and using a standalone compiled under a > previous LC version. In your previous message yesterday you wrote: > So I have done something to the data stack in the last > few months. It is not a change of LC version or platform > OS. A standalone I produced a couple of months ago does > not display this slow behaviour when working on its old > version of the data stack, but does show it when I apply > it to the latest version of the data stack. If the code hasn't changed but the data has, you've narrowed it down. What is in the data stack? Where does the data come from, and when/how does the data stack get updated with new data? -- Richard Gaskin FourthWorld.com From neville.smythe at optusnet.com.au Fri Jun 28 06:15:53 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 28 Jun 2024 20:15:53 +1000 Subject: Slow stack problem Message-ID: <548217AD-2894-465E-B903-8DC47FAA4C88@optusnet.com.au> In my last epistle I mentioned the repeat loop had only 32 iterations. Much more relevant of course is the inner loop on the number of lines of the data variable fff. In this case fff had 1760 lines. So the total possible number of iterations was around 30000 to 50000, getting up there but still well within LC capability. I tried operating the loop on just the first 100 lines of fff. The repeats took 0.006 seconds (impressive). Then just the first 300 lines. Timing was 0.016 seconds, approximately linear increase as expected Then the first 500 lines. Timing is now 6.43 seconds. Something very odd there, that’s beyond exponential increase. And on the last 500 lines, timing was 0.135 seconds (Aha !!!) This would seem to point to matchChunk having indigestion over something in the middle of the text data. The data is 98% plain ascii, but quite likely it has a few Unicode characters: I have taken a whole lot of time to convert my legacy app to accept Asian and European Unicode personal names. Gives me something to work on. If I am right, it points to either a bug or a severe limitation in matchChunk if it cannot work with Unicode. And lo… Put textEncode(fff,”ascii”) into fff And now the whole 1760 lines take 0.073 seconds to complete. I have a solution or at least a workaround, and LC has an impending bug report [does anyone know if the latest versions of regexp searches have a performance problem with Unicode in other implementations?]. Neville Smythe From mark at livecode.com Fri Jun 28 08:02:13 2024 From: mark at livecode.com (Mark Waddingham) Date: Fri, 28 Jun 2024 13:02:13 +0100 Subject: Slow stack problem In-Reply-To: <548217AD-2894-465E-B903-8DC47FAA4C88@optusnet.com.au> References: <548217AD-2894-465E-B903-8DC47FAA4C88@optusnet.com.au> Message-ID: <4e66b24cff57606b2d3abd891d3dd0d7@livecode.com> On 2024-06-28 11:15, Neville Smythe via use-livecode wrote: > In my last epistle I mentioned the repeat loop had only 32 iterations. > Much more relevant of course is the inner loop on the number of lines > of the data variable fff. In this case fff had 1760 lines. So the total > possible number of iterations was around 30000 to 50000, getting up > there but still well within LC capability. > > I tried operating the loop on just the first 100 lines of fff. The > repeats took 0.006 seconds (impressive). > > Then just the first 300 lines. Timing was 0.016 seconds, approximately > linear increase as expected Are you sure a linear increase is expected? > Then the first 500 lines. Timing is now 6.43 seconds. Something very > odd there, thats beyond exponential increase. > > And on the last 500 lines, timing was 0.135 seconds (Aha !!!) I take it you tested this by doing the loop where fff was just line 1 to 300, then just line 1 to 500 and then just -500 to -1? My guess here is that the first 300 lines do not have a unicode character, there is somewhere in the next 200, and there are none in the last 500. > This would seem to point to matchChunk having indigestion over > something in the middle of the text data. The data is 98% plain ascii, > but quite likely it has a few Unicode characters: I have taken a whole > lot of time to convert my legacy app to accept Asian and European > Unicode personal names. All regex matches in LC are Unicode (under the hood) - so thinking this is regex related is a red-herring. Running a regex on Unicode text, is no different from on native text - its just its dealing with 16-bit units rather than 8-bit (regex is generally a linear operation - it takes time proportional, roughly to length of pattern * length of string - well, as long as you don't use any backtracking type features). The issue here is the assumption that your code is doing something linear... It *looks* linear because your code is only doing two nested repeat loops - so from the point of view of lines of script its iterating the central loop roughly 'the number of lines of indexList * the number of lines of fff' - however the engine is doing a lot more work. The central loop is doing (paraphrased); repeat with x = 1 to N get line x of jjj end repeat This means the engine is searching for a line delimiter not N times, but sum(1, ..., N) times (which is N*(N-1)/2 - i.e. N^2 roughly). Processing 300 lines will take the engine about 45000 steps, processing 500 lines will take the engine 125000 steps, processing 1760 lines will take the engine > 1,500,000. This means that a small change in how long it takes to search for a line delimiter (which is the fundamental operation here) makes a big difference to how long doing 1000's of them will take - and searching a string containing unicode is a fair bit slower than searching a string which contains only native characters. Fortunately there is an easy solution here - use an array so you get random access to the lines of fff: split fff by return repeat with i=2 to the number of lines of indexList put line (i+1) of indexList into which put "(^[0-9-]*\t" & which & ")" into regX put false into found repeat with k=lastFound+1 to the number of elements of fff put matchChunk(fff[k],regX,pos1,pos2) into found if found then exit repeat end repeat if found then put k into lastFound end if put lastFound into item i of mylineNumbers end repeat This should do exactly the same thing but SUBSTANTIALLY faster whether your fff variable contains native or unicode characters. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Build Amazing Things From bobsneidar at iotecdigital.com Fri Jun 28 11:23:08 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 28 Jun 2024 15:23:08 +0000 Subject: Slow stack problem In-Reply-To: <4e66b24cff57606b2d3abd891d3dd0d7@livecode.com> References: <548217AD-2894-465E-B903-8DC47FAA4C88@optusnet.com.au> <4e66b24cff57606b2d3abd891d3dd0d7@livecode.com> Message-ID: <6BD625A2-F8D1-4B35-87E5-2C34ED013EF1@iotecdigital.com> I love using red herring in conversations. Most people don’t know what that is, so they can’t contradict me! :-) Bob S On Jun 28, 2024, at 5:02 AM, Mark Waddingham via use-livecode wrote: so thinking this is regex related is a red-herring. From bobsneidar at iotecdigital.com Fri Jun 28 12:44:24 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 28 Jun 2024 16:44:24 +0000 Subject: Socket Packaging In-Reply-To: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> References: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> Message-ID: <2D093B01-C351-4AA7-B2F3-AE44CDC3503E@iotecdigital.com> Added error checking. Also the payload can now be a string or an array. command packagePayload @pPayload, pUseEncryption try if pPayload is an array then \ put arrayEncode(pPayload) into pPayload if pUseEncryption then \ put slyEncrypt(pPayload) into pPayload put base64Encode(pPayload) into pPayload catch tError return "ERROR:" && tError end try end packagePayload command unpackPayload @pPayload, pUseEncryption try put base64Decode(pPayload) into pPayload if pUseEncryption is true or pPayload begins with "salted" then \ put slyDecrypt(pPayload) into pPayload if pPayload is an array then \ put arrayDecode(pPayload) into pPayload catch tError return "ERROR:" && tError end try end unpackPayload Bob S > On Jun 24, 2024, at 9:21 AM, Bob Sneidar wrote: > > Hi all. > > I came up with deceptively simple wrappers for packaging data for transmission over raw sockets. I can’t send the slyEncrypt and slyDecrypt handlers because I use methods no one else knows. But you can roll your own or else eliminate encryption altogether. > > And to answer the question befor it’s asked, I don’t use SSL because I don’t like having to deal with certificates, and also because I use a method for encryption that I don’t think anyone else has thought of, or at least I can’t find any info online. > > Bob S > > command packagePayload @pPayload, pUseEncryption > if pPayload is an array then \ > put arrayEncode(pPayload) into pPayload > > if pUseEncryption then \ > put slyEncrypt(pPayload) into pPayload > > put base64Encode(pPayload) into pPayload > end packagePayload > > command unpackPayload @pPayload > put base64Decode(pPayload) into pPayload > > if pPayload begins with "salted" then \ > put slyDecrypt(pPayload) into pPayload > > try > put arrayDecode(pPayload) into tResult > put tResult into pPayload > catch tError > -- not an array > end try > end unpackPayload > From admin at flexiblelearning.com Fri Jun 28 13:04:09 2024 From: admin at flexiblelearning.com (Hugh Senior) Date: Fri, 28 Jun 2024 18:04:09 +0100 Subject: url no longer working as expected In-Reply-To: References: Message-ID: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> Platform: Windows 11, LC 9.6.12 Query: Using URL to access a web page Problem: Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web browser and the page is displayed as expected. Use LC's URL command to access the same page direct returns a 404 put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" Anyone got any insights? Hugh Senior From bobsneidar at iotecdigital.com Fri Jun 28 13:07:55 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 28 Jun 2024 17:07:55 +0000 Subject: url no longer working as expected In-Reply-To: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> References: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> Message-ID: <7CFEFE88-133D-48B6-9E28-3728C5A7AB37@iotecdigital.com> I get the HTML of the page. Are you trying to open the page in a browser? Bob S > On Jun 28, 2024, at 10:04 AM, Hugh Senior via use-livecode wrote: > > > Platform: Windows 11, LC 9.6.12 > Query: Using URL to access a web page > > Problem: > Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web > browser and the page is displayed as expected. > > Use LC's URL command to access the same page direct returns a 404 > put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" > > Anyone got any insights? > > Hugh Senior > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Fri Jun 28 13:50:35 2024 From: paul at researchware.com (Paul Dupuis) Date: Fri, 28 Jun 2024 13:50:35 -0400 Subject: url no longer working as expected In-Reply-To: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> References: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> Message-ID: <499fc022-eafb-49dd-96df-1dcd18afb8fb@researchware.com> I get a response from Yahoos that is an html page with a 404 information as part of it. This happens under LC 9.6.12 and 9.6.11 I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: > Platform: Windows 11, LC 9.6.12 > Query: Using URL to access a web page > > Problem: > Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web > browser and the page is displayed as expected. > > Use LC's URL command to access the same page direct returns a 404 > put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" > > Anyone got any insights? > > Hugh Senior > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Fri Jun 28 14:03:28 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 28 Jun 2024 18:03:28 +0000 Subject: url no longer working as expected In-Reply-To: <499fc022-eafb-49dd-96df-1dcd18afb8fb@researchware.com> References: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> <499fc022-eafb-49dd-96df-1dcd18afb8fb@researchware.com> Message-ID: Did you try that in the message box? Bob S > On Jun 28, 2024, at 10:50 AM, Paul Dupuis via use-livecode wrote: > > I get a response from Yahoos that is an html page with a 404 information as part of it. > > This happens under LC 9.6.12 and 9.6.11 > > I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. > > > On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >> Platform: Windows 11, LC 9.6.12 >> Query: Using URL to access a web page >> >> Problem: >> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >> browser and the page is displayed as expected. >> >> Use LC's URL command to access the same page direct returns a 404 >> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >> >> Anyone got any insights? >> >> Hugh Senior >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Fri Jun 28 14:23:35 2024 From: paul at researchware.com (Paul Dupuis) Date: Fri, 28 Jun 2024 14:23:35 -0400 Subject: url no longer working as expected In-Reply-To: References: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> <499fc022-eafb-49dd-96df-1dcd18afb8fb@researchware.com> Message-ID: <30ffa56e-1cc0-4f83-9590-e1525a14e613@researchware.com> Yes. put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" In the message box on 9.6.11 and 9.6.12 under Windows 11. Both return a pile of HTML text that is all the formatting and CSS linked stuff to show a "404" page. This suggests that put URL is working and it is the Yahoo server that returning a different page of HTML/CSS for the put vs when you enter the URL in a browser (Firefox in my case, where I get the Yahoo finance data for Shell, although I did have to respond to a Cookies dialog first). On 6/28/2024 2:03 PM, Bob Sneidar via use-livecode wrote: > Did you try that in the message box? > > Bob S > > >> On Jun 28, 2024, at 10:50 AM, Paul Dupuis via use-livecode wrote: >> >> I get a response from Yahoos that is an html page with a 404 information as part of it. >> >> This happens under LC 9.6.12 and 9.6.11 >> >> I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. >> >> >> On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >>> Platform: Windows 11, LC 9.6.12 >>> Query: Using URL to access a web page >>> >>> Problem: >>> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >>> browser and the page is displayed as expected. >>> >>> Use LC's URL command to access the same page direct returns a 404 >>> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >>> >>> Anyone got any insights? >>> >>> Hugh Senior >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Fri Jun 28 14:59:34 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Fri, 28 Jun 2024 18:59:34 +0000 Subject: url no longer working as expected Message-ID: Likely the case. The expense of collating all that data and presenting it to their site visitors is considerable. They use advertising to cover those costs. If the data were easily scrapable, scrapers diminish revenue, putting the resource itself at risk. Some data provides offer APIs. When you see anti-scraping effects, look for API options (I saw none there but I didn't look deeply). APIs take fewer resources to deliver, and may have strategic benefit for some data brokers. But if they have scrape-prevention and no API, they're sending a clear signal: "We need to pay our bills, please send your traffic to our page so we can do that." That said, I've come across stock APIs before, and while I don't recall many free ones there likely are some. Richard Gaskin FourthWorld.com Paul Dupuis wrote: > I get a response from Yahoos that is an html page with a 404 > information as part of it. ... > I think this is Yahoo Finance not being able to detect the > browser type and intentionally returning a 404 as a method > of deterring screen scraping. > > On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: ... >> Problem: >> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into >> any web browser and the page is displayed as expected. >> >> Use LC's URL command to access the same page direct returns a >> 404 >> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >> >> Anyone got any insights? From neville.smythe at optusnet.com.au Sat Jun 29 03:53:58 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Sat, 29 Jun 2024 17:53:58 +1000 Subject: Slow stack problem Message-ID: <76E596CE-7A40-4060-8A40-A9BD9DC0FFA8@optusnet.com.au> Thanks Mark for pointing me (as ever) in the right direction, away from the red herring but to the hidden inner loop entailed in evaluating line k of fff A bit embarrassing because I was party to the discussion some time ago about the slowness of lineOffset when working with unicode text. And thanks for the neat array trick which I wouldn’t have thought of. There is indeed just one line in the text which contains a single Unicode character. Without that character evidently the variable fff would internally be an ascii (or native?) string, but otherwise is entirely utf16 and we hit the LineOffset problem. But I am still bemused. Is it not the case that the processing time for looping over the number of lines and getting the k-th line in each iteration, for some arbitrary k, going to be Order(N^2) * C * T where N = the number of lines in the text C = the number of codepoints in each line T = the (average) time for processing each codepoint to check for a return character Now N and C are the same whether the text is ascii or unicode Test 1 If I get rid of the red herring by replacing the matchChunk call with a simple put line k of fff into x; put true into found — as if matchChunk always finds a match on the first line tested so that I am timing just the getting of lines endings: The time for processing plain ascii is. 0.008 seconds The time for processing unicode is. 0.84 seconds Which would appear to mean that processing unicode codepoints for the apparently simple task of checking for return takes 100 times as much time as processing ascii. That seems excessive, to put it mildly! Test 2 With the original code using matchChunk, which of course is going to have its own internal loop on code points so multiply by another 8 (it only searches the first few characters) and will not always return true so more lines must be processed — but again these are same multipliers whether ascii or unicode Plain ascii takes 0.07 seconds Unicode takes 19.9 seconds, a multiplier of nearly 300. — I can easily believe matchChunk takes 3 times as long to process unicode as ascii, this is the sort of factor I would have expected in Test 1. OK Mark, hit me again, I am a glutton for punishment, what is wrong with this analysis? Neville Smythe From mark at livecode.com Sat Jun 29 05:27:19 2024 From: mark at livecode.com (Mark Waddingham) Date: Sat, 29 Jun 2024 10:27:19 +0100 Subject: Slow stack problem In-Reply-To: <76E596CE-7A40-4060-8A40-A9BD9DC0FFA8@optusnet.com.au> References: <76E596CE-7A40-4060-8A40-A9BD9DC0FFA8@optusnet.com.au> Message-ID: <0aa021b2188068c191e11ba49db857cc@livecode.com> On 2024-06-29 08:53, Neville Smythe via use-livecode wrote: > Is it not the case that the processing time for looping over the number > of lines and getting the k-th line in each iteration, for some > arbitrary k, going to be > > Order(N^2) * C * T > > where > > N = the number of lines in the text > > C = the number of codepoints in each line > > T = the (average) time for processing each codepoint to check for a > return character > > Now N and C are the same whether the text is ascii or unicode Largely - yes - although for stuff like this you need to think in terms of bytes not codepoints (as memory throughput becomes 'a thing' when the strings are anything longer than a few characters) - so unicode is 2*ascii in this regard [ Its actually more than 2x for longer strings but how much more depends on CPU/memory architecture - CPUs can only read from their level 1 cache, and there's a cost to a cache miss, and you get 2x as many cache misses with unicode data as native data, assuming the data is larger than a single level 1 cache line. ] > Test 1 > If I get rid of the red herring by replacing the matchChunk call with a > simple > ... > Which would appear to mean that processing unicode codepoints for the > apparently simple task of checking for return takes 100 times as much > time as processing ascii. That seems excessive, to put it mildly! Its a lot slower certainly, but then searching unicode text for a string is (in the general case) a lot more complex than searching native/ascii text for a string. > Test 2 > With the original code using matchChunk, which of course is going to > have its own internal loop on code points so multiply by another 8 (it > only searches the first few characters) > and will not always return true so more lines must be processed but > again these are same multipliers whether ascii or unicode > ... > Plain ascii takes 0.07 seconds > Unicode takes 19.9 seconds, a multiplier of nearly 300. I can > easily believe matchChunk takes 3 times as long to process unicode as > ascii, this is the sort of factor I would have expected in Test 1. So 'Test 2' is slightly misleading - as it still suggests matchChunk is causing a slowdown - which it isn't. The difference here is Test 2 is doing more work as it isn't always exiting. If you test: get line k of fff put true into tFound I suspect you'll find the time to process your data if it contains unicode is pretty similar to that when matchChunk is also called. In my quick test (which is 32 index lines, 200 fff lines) I get about 10ms (no unicode) vs 1400ms (unicode) > OK Mark, hit me again, I am a glutton for punishment, what is wrong > with this analysis? Nothing in particular - apart from thinking that matchChunk is actually a relevant factor here ;) The reasons this delimiter search operation on unicode strings is so much slower than native is for two reasons: 1) We (well, I) heavily optimized the core native/ascii string operations in 2015 to make sure there were as fast as possible 2) Searching a unicode string for another string (which is what is going on here) is much more complex than doing the same for native/ascii Native/ascii strings have some very pleasant properties: - one byte (codeunit) is one character - always. - each character has only one representation - its byte value - casing is a simple mapping between lower and upper case characters - and only about 25% of characters are affected Unicode has none of these properties - a unicode character (grapheme) can be arbitrarily many codeunits (2 byte quantities) long - characters can have multiple representations - e.g. e-acute vs e,combining-acute - casing is not (in general) a simple mapping of one codeunit to another Currently the unicode operations in the engine are largely unoptimized - they assume the general case in all things so even searching a string for LF (which is the case here) is still done under the assumption that it might need that (very hefty) extra processing. Of course it would be nice to have highly optimized low-level unicode string optimizations but you have to pick your battles (particular when the battles are incredibly technical ones!) but the reality is that this (admittedly large!) speed difference is only really noticeable 'at scale' and when scale is involved, there's pretty much always an algorithmic change which can make those 'low-level' performance differences irrelevant. The case here is a really good example. The line X based code gives (no matchChunk / with matchChunk): ASCII 300 lines 13ms / 22ms ASCII 3000 lines - 986ms / 1104ms ASCII 10000 lines - 10804ms / 11213ms The array based code gives (no matchChunk / with matchChunk): ASCII 300 lines - 2ms / 11ms ASCII 3000 lines - 19ms / 101ms ASCII 10000 lines - 69ms / 336ms UNICODE 300 lines - 7ms / 12ms UNICODE 3000 lines - 52ms / 108ms UNICODE 10000 lines - 170ms / 359ms Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Build Amazing Things From Neville.Smythe at optusnet.com.au Sat Jun 29 13:49:49 2024 From: Neville.Smythe at optusnet.com.au (Neville Smythe) Date: Sun, 30 Jun 2024 03:49:49 +1000 Subject: use-livecode Digest, Vol 249, Issue 24 Message-ID: <0EE136D5-54A3-474A-BB79-326A0956BB18@optusnet.com.au> Thanks Mark for the gory details which i found fascinating. Unicode is even more complicated than I realized, and I thought I had a pretty good understanding of it. Actually I thought my test 2 demonstrated that matchchunk performed very well on Unicode, rather than trying to show it was part of the problem. As to my back of the envelope analysis, I realized after I hit the Send button that my sloppy code computed the end condition the number of lines of fff in the inner loop as well as the outer, which makes the timing computation incorrect. So, end of story, my original problem is resolved, and I have that nifty array trick for random access to lines of large text data which is going to be invaluable, plus a tutorial on Unicode. All worth the embarrassment of exposing my ignorance in front of God and everyone (God in this case being Mark) Neville Smythe > On 30 Jun 2024, at 2:01 am, use-livecode-request at lists.runrev.com wrote: > > Send use-livecode mailing list submissions to > use-livecode at lists.runrev.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.runrev.com/mailman/listinfo/use-livecode > or, via email, send a message with subject or body 'help' to > use-livecode-request at lists.runrev.com > > You can reach the person managing the list at > use-livecode-owner at lists.runrev.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of use-livecode digest..." > > > you can find the archives for this list at: > > http://lists.runrev.com/pipermail/use-livecode/ > > and search them using this link: > > https://www.mail-archive.com/use-livecode at lists.runrev.com/ > > > Today's Topics: > > 1. Re: Socket Packaging (Bob Sneidar) > 2. url no longer working as expected (Hugh Senior) > 3. Re: url no longer working as expected (Bob Sneidar) > 4. Re: url no longer working as expected (Paul Dupuis) > 5. Re: url no longer working as expected (Bob Sneidar) > 6. Re: url no longer working as expected (Paul Dupuis) > 7. Re: url no longer working as expected (Richard Gaskin) > 8. Re: Slow stack problem (Neville Smythe) > 9. Re: Slow stack problem (Mark Waddingham) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 28 Jun 2024 16:44:24 +0000 > From: Bob Sneidar > To: How to use LiveCode > Subject: Re: Socket Packaging > Message-ID: <2D093B01-C351-4AA7-B2F3-AE44CDC3503E at iotecdigital.com> > Content-Type: text/plain; charset="utf-8" > > Added error checking. Also the payload can now be a string or an array. > > command packagePayload @pPayload, pUseEncryption > try > if pPayload is an array then \ > put arrayEncode(pPayload) into pPayload > > if pUseEncryption then \ > put slyEncrypt(pPayload) into pPayload > > put base64Encode(pPayload) into pPayload > catch tError > return "ERROR:" && tError > end try > end packagePayload > > command unpackPayload @pPayload, pUseEncryption > try > put base64Decode(pPayload) into pPayload > > if pUseEncryption is true or pPayload begins with "salted" then \ > put slyDecrypt(pPayload) into pPayload > > if pPayload is an array then \ > put arrayDecode(pPayload) into pPayload > catch tError > return "ERROR:" && tError > end try > end unpackPayload > > Bob S > > >> On Jun 24, 2024, at 9:21 AM, Bob Sneidar wrote: >> Hi all. >> I came up with deceptively simple wrappers for packaging data for transmission over raw sockets. I can?t send the slyEncrypt and slyDecrypt handlers because I use methods no one else knows. But you can roll your own or else eliminate encryption altogether. >> And to answer the question befor it?s asked, I don?t use SSL because I don?t like having to deal with certificates, and also because I use a method for encryption that I don?t think anyone else has thought of, or at least I can?t find any info online. >> Bob S >> command packagePayload @pPayload, pUseEncryption >> if pPayload is an array then \ >> put arrayEncode(pPayload) into pPayload >> if pUseEncryption then \ >> put slyEncrypt(pPayload) into pPayload >> put base64Encode(pPayload) into pPayload >> end packagePayload >> command unpackPayload @pPayload >> put base64Decode(pPayload) into pPayload >> if pPayload begins with "salted" then \ >> put slyDecrypt(pPayload) into pPayload >> try >> put arrayDecode(pPayload) into tResult >> put tResult into pPayload >> catch tError >> -- not an array >> end try >> end unpackPayload > > > ------------------------------ > > Message: 2 > Date: Fri, 28 Jun 2024 18:04:09 +0100 > From: "Hugh Senior" > To: > Subject: url no longer working as expected > Message-ID: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> > Content-Type: text/plain; charset="us-ascii" > > > Platform: Windows 11, LC 9.6.12 > Query: Using URL to access a web page > > Problem: > Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web > browser and the page is displayed as expected. > > Use LC's URL command to access the same page direct returns a 404 > put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" > > Anyone got any insights? > > Hugh Senior > > > > > ------------------------------ > > Message: 3 > Date: Fri, 28 Jun 2024 17:07:55 +0000 > From: Bob Sneidar > To: How to use LiveCode > Subject: Re: url no longer working as expected > Message-ID: <7CFEFE88-133D-48B6-9E28-3728C5A7AB37 at iotecdigital.com> > Content-Type: text/plain; charset="us-ascii" > > I get the HTML of the page. Are you trying to open the page in a browser? > > Bob S > > >> On Jun 28, 2024, at 10:04 AM, Hugh Senior via use-livecode wrote: >> Platform: Windows 11, LC 9.6.12 >> Query: Using URL to access a web page >> Problem: >> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >> browser and the page is displayed as expected. >> Use LC's URL command to access the same page direct returns a 404 >> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >> Anyone got any insights? >> Hugh Senior >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > ------------------------------ > > Message: 4 > Date: Fri, 28 Jun 2024 13:50:35 -0400 > From: Paul Dupuis > To: use-livecode at lists.runrev.com > Subject: Re: url no longer working as expected > Message-ID: <499fc022-eafb-49dd-96df-1dcd18afb8fb at researchware.com> > Content-Type: text/plain; charset=UTF-8; format=flowed > > I get a response from Yahoos that is an html page with a 404 information > as part of it. > > This happens under LC 9.6.12 and 9.6.11 > > I think this is Yahoo Finance not being able to detect the browser type > and intentionally returning a 404 as a method of deterring screen scraping. > > >> On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >> Platform: Windows 11, LC 9.6.12 >> Query: Using URL to access a web page >> Problem: >> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >> browser and the page is displayed as expected. >> Use LC's URL command to access the same page direct returns a 404 >> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >> Anyone got any insights? >> Hugh Senior >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > ------------------------------ > > Message: 5 > Date: Fri, 28 Jun 2024 18:03:28 +0000 > From: Bob Sneidar > To: How to use LiveCode > Subject: Re: url no longer working as expected > Message-ID: > Content-Type: text/plain; charset="us-ascii" > > Did you try that in the message box? > > Bob S > > >> On Jun 28, 2024, at 10:50 AM, Paul Dupuis via use-livecode wrote: >> I get a response from Yahoos that is an html page with a 404 information as part of it. >> This happens under LC 9.6.12 and 9.6.11 >> I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. >>> On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >>> Platform: Windows 11, LC 9.6.12 >>> Query: Using URL to access a web page >>> Problem: >>> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >>> browser and the page is displayed as expected. >>> Use LC's URL command to access the same page direct returns a 404 >>> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >>> Anyone got any insights? >>> Hugh Senior >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > ------------------------------ > > Message: 6 > Date: Fri, 28 Jun 2024 14:23:35 -0400 > From: Paul Dupuis > To: use-livecode at lists.runrev.com > Subject: Re: url no longer working as expected > Message-ID: <30ffa56e-1cc0-4f83-9590-e1525a14e613 at researchware.com> > Content-Type: text/plain; charset=UTF-8; format=flowed > > Yes. > > put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" > > In the message box on 9.6.11 and 9.6.12 under Windows 11. Both return a > pile of HTML text that is all the formatting and CSS linked stuff to > show a "404" page. > > This suggests that put URL is working and it is the Yahoo server that > returning a different page of HTML/CSS for the put vs when you enter the > URL in a browser (Firefox in my case, where I get the Yahoo finance data > for Shell, although I did have to respond to a Cookies dialog first). > > >> On 6/28/2024 2:03 PM, Bob Sneidar via use-livecode wrote: >> Did you try that in the message box? >> Bob S >>>> On Jun 28, 2024, at 10:50 AM, Paul Dupuis via use-livecode wrote: >>> I get a response from Yahoos that is an html page with a 404 information as part of it. >>> This happens under LC 9.6.12 and 9.6.11 >>> I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. >>> On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >>>> Platform: Windows 11, LC 9.6.12 >>>> Query: Using URL to access a web page >>>> Problem: >>>> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >>>> browser and the page is displayed as expected. >>>> Use LC's URL command to access the same page direct returns a 404 >>>> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >>>> Anyone got any insights? >>>> Hugh Senior >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode at 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 at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > ------------------------------ > > Message: 7 > Date: Fri, 28 Jun 2024 18:59:34 +0000 > From: "Richard Gaskin" > To: use-livecode at lists.runrev.com > Subject: Re: url no longer working as expected > Message-ID: > Content-Type: text/plain; charset="utf-8" > > Likely the case. The expense of collating all that data and presenting it to their site visitors is considerable. They use advertising to cover those costs. If the data were easily scrapable, scrapers diminish revenue, putting the resource itself at risk. > > Some data provides offer APIs. When you see anti-scraping effects, look for API options (I saw none there but I didn't look deeply). APIs take fewer resources to deliver, and may have strategic benefit for some data brokers. > > But if they have scrape-prevention and no API, they're sending a clear signal: "We need to pay our bills, please send your traffic to our page so we can do that." > > That said, I've come across stock APIs before, and while I don't recall many free ones there likely are some. > > Richard Gaskin > FourthWorld.com > > > > Paul Dupuis wrote: > >> I get a response from Yahoos that is an html page with a 404 >> information as part of it. > ... >> I think this is Yahoo Finance not being able to detect the >> browser type and intentionally returning a 404 as a method >> of deterring screen scraping. > On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: > ... >>> Problem: >>> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into >>> any web browser and the page is displayed as expected. >>> Use LC's URL command to access the same page direct returns a >>> 404 >>> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >>> Anyone got any insights? > > > > ------------------------------ > > Message: 8 > Date: Sat, 29 Jun 2024 17:53:58 +1000 > From: Neville Smythe > To: How to use LiveCode > Subject: Re: Slow stack problem > Message-ID: <76E596CE-7A40-4060-8A40-A9BD9DC0FFA8 at optusnet.com.au> > Content-Type: text/plain; charset=utf-8 > > Thanks Mark for pointing me (as ever) in the right direction, away from the red herring but to the hidden inner loop entailed in evaluating > > line k of fff > > A bit embarrassing because I was party to the discussion some time ago about the slowness of lineOffset when working with unicode text. > > And thanks for the neat array trick which I wouldn?t have thought of. > > There is indeed just one line in the text which contains a single Unicode character. Without that character evidently the variable fff would internally be an ascii (or native?) string, but otherwise is entirely utf16 and we hit the LineOffset problem. > > But I am still bemused. > > Is it not the case that the processing time for looping over the number of lines and getting the k-th line in each iteration, for some arbitrary k, going to be > > Order(N^2) * C * T > > where > > N = the number of lines in the text > > C = the number of codepoints in each line > > T = the (average) time for processing each codepoint to check for a return character > > Now N and C are the same whether the text is ascii or unicode > > Test 1 > If I get rid of the red herring by replacing the matchChunk call with a simple > > put line k of fff into x; put true into found ? as if matchChunk always finds a match on the first line tested so that I am timing just the getting of lines endings: > > The time for processing plain ascii is. 0.008 seconds > The time for processing unicode is. 0.84 seconds > > Which would appear to mean that processing unicode codepoints for the apparently simple task of checking for return takes 100 times as much time as processing ascii. That seems excessive, to put it mildly! > > Test 2 > With the original code using matchChunk, which of course is going to have its own internal loop on code points so multiply by another 8 (it only searches the first few characters) > and will not always return true so more lines must be processed ? but again these are same multipliers whether ascii or unicode > > Plain ascii takes 0.07 seconds > Unicode takes 19.9 seconds, a multiplier of nearly 300. ? I can easily believe matchChunk takes 3 times as long to process unicode as ascii, this is the sort of factor I would have expected in Test 1. > > OK Mark, hit me again, I am a glutton for punishment, what is wrong with this analysis? > > Neville Smythe > > > > > > > ------------------------------ > > Message: 9 > Date: Sat, 29 Jun 2024 10:27:19 +0100 > From: Mark Waddingham > To: How to use LiveCode > Subject: Re: Slow stack problem > Message-ID: <0aa021b2188068c191e11ba49db857cc at livecode.com> > Content-Type: text/plain; charset=UTF-8; format=flowed > >> On 2024-06-29 08:53, Neville Smythe via use-livecode wrote: >> Is it not the case that the processing time for looping over the number >> of lines and getting the k-th line in each iteration, for some >> arbitrary k, going to be >> Order(N^2) * C * T >> where >> N = the number of lines in the text >> C = the number of codepoints in each line >> T = the (average) time for processing each codepoint to check for a >> return character >> Now N and C are the same whether the text is ascii or unicode > > Largely - yes - although for stuff like this you need to think in terms > of bytes not codepoints (as memory throughput becomes 'a thing' when the > strings are anything longer than a few characters) - so unicode is > 2*ascii in this regard > > [ Its actually more than 2x for longer strings but how much more depends > on CPU/memory architecture - CPUs can only read from their level 1 > cache, and there's a cost to a cache miss, and you get 2x as many cache > misses with unicode data as native data, assuming the data is larger > than a single level 1 cache line. ] > >> Test 1 >> If I get rid of the red herring by replacing the matchChunk call with a >> simple >> ... >> Which would appear to mean that processing unicode codepoints for the >> apparently simple task of checking for return takes 100 times as much >> time as processing ascii. That seems excessive, to put it mildly! > > Its a lot slower certainly, but then searching unicode text for a string > is (in the general case) a lot more complex than searching native/ascii > text for a string. > >> Test 2 >> With the original code using matchChunk, which of course is going to >> have its own internal loop on code points so multiply by another 8 (it >> only searches the first few characters) >> and will not always return true so more lines must be processed ? but >> again these are same multipliers whether ascii or unicode >> ... >> Plain ascii takes 0.07 seconds >> Unicode takes 19.9 seconds, a multiplier of nearly 300. ? I can >> easily believe matchChunk takes 3 times as long to process unicode as >> ascii, this is the sort of factor I would have expected in Test 1. > > So 'Test 2' is slightly misleading - as it still suggests matchChunk is > causing a slowdown - which it isn't. > > The difference here is Test 2 is doing more work as it isn't always > exiting. If you test: > > get line k of fff > put true into tFound > > I suspect you'll find the time to process your data if it contains > unicode is pretty similar to that when matchChunk is also called. > > In my quick test (which is 32 index lines, 200 fff lines) I get about > 10ms (no unicode) vs 1400ms (unicode) > >> OK Mark, hit me again, I am a glutton for punishment, what is wrong >> with this analysis? > > Nothing in particular - apart from thinking that matchChunk is actually > a relevant factor here ;) > > The reasons this delimiter search operation on unicode strings is so > much slower than native is for two reasons: > 1) We (well, I) heavily optimized the core native/ascii string > operations in 2015 to make sure there were as fast as possible > 2) Searching a unicode string for another string (which is what is > going on here) is much more complex than doing the same for native/ascii > > Native/ascii strings have some very pleasant properties: > - one byte (codeunit) is one character - always. > - each character has only one representation - its byte value > - casing is a simple mapping between lower and upper case characters - > and only about 25% of characters are affected > > Unicode has none of these properties > - a unicode character (grapheme) can be arbitrarily many codeunits (2 > byte quantities) long > - characters can have multiple representations - e.g. e-acute vs > e,combining-acute > - casing is not (in general) a simple mapping of one codeunit to > another > > Currently the unicode operations in the engine are largely unoptimized - > they assume the general case in all things so even searching a string > for LF (which is the case here) is still done under the assumption that > it might need that (very hefty) extra processing. > > Of course it would be nice to have highly optimized low-level unicode > string optimizations but you have to pick your battles (particular when > the battles are incredibly technical ones!) but the reality is that this > (admittedly large!) speed difference is only really noticeable 'at > scale' and when scale is involved, there's pretty much always an > algorithmic change which can make those 'low-level' performance > differences irrelevant. > > The case here is a really good example. > > The line X based code gives (no matchChunk / with matchChunk): > > ASCII 300 lines 13ms / 22ms > ASCII 3000 lines - 986ms / 1104ms > ASCII 10000 lines - 10804ms / 11213ms > > The array based code gives (no matchChunk / with matchChunk): > > ASCII 300 lines - 2ms / 11ms > ASCII 3000 lines - 19ms / 101ms > ASCII 10000 lines - 69ms / 336ms > > UNICODE 300 lines - 7ms / 12ms > UNICODE 3000 lines - 52ms / 108ms > UNICODE 10000 lines - 170ms / 359ms > > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Build Amazing Things > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > http://lists.runrev.com/mailman/listinfo/use-livecode > > > ------------------------------ > > End of use-livecode Digest, Vol 249, Issue 24 > ********************************************* From Bernd.Niggemann at uni-wh.de Sat Jun 1 07:18:41 2024 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sat, 1 Jun 2024 11:18:41 +0000 Subject: Snapshot question Message-ID: <8DC380B5-23ED-49DC-87E4-955717BA7A49@uni-wh.de> Neville wrote > Now while referenced images such as png’s can be > rotated (more precisely, have their angle set) they lose their scaling, > reverting to their native size; and rotated images cannot be scaled (why?? set the resizeQuality of the image to good or best depending on your image (images get a bit fuzzy when rotated) you can resize a rotated image if you set the imageData of the rotated image to the imageData of the rotated image set the angle of image 1 to 15 set the imageData of image 1 to the imageData of image 1 As soon as you set the imageData of the image it is not referenced anymore. But it can be resized. I do not know your requirements exactly but if you want to set the angle repeatedly then it is best to store the original (non-rotated) text of the image and do your rotation every time from that starting point. i.e. store original set angle restore to origina set next angle Examples of rotating and resizing of image can be found in this topic of the Forum (old stuff but still working) https://forums.livecode.com/viewtopic.php?f=27&t=8042 Kind regards Bernd From Bernd.Niggemann at uni-wh.de Sat Jun 1 09:57:12 2024 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sat, 1 Jun 2024 13:57:12 +0000 Subject: Snapshot question Message-ID: <1E534C68-6918-4E46-B135-2AC1C7908995@uni-wh.de> Neville wrote Now while referenced images such as png’s can be rotated (more precisely, have their angle set) they lose their scaling, reverting to their native size; and rotated images cannot be scaled (why?? set the resizeQuality of the image to good or best depending on your image (images get a bit fuzzy when rotated) you can resize a rotated image if you set the imageData of the rotated image to the imageData of the rotated image set the angle of image 1 to 15 set the imageData of image 1 to the imageData of image 1 As soon as you set the imageData of the image it is not referenced anymore. But it can be resized. I do not know your requirements exactly but if you want to set the angle repeatedly then it is best to store the original (non-rotated) text of the image and do your rotation every time from that starting point. i.e. store original set angle restore to origina set next angle Examples of rotating and resizing of image can be found in this topic of the Forum (old stuff but still working) https://forums.livecode.com/viewtopic.php?f=27&t=8042 Kind regards Bernd From tom at makeshyft.com Mon Jun 3 12:02:03 2024 From: tom at makeshyft.com (Tom Glod) Date: Mon, 3 Jun 2024 12:02:03 -0400 Subject: oAuth in production? Message-ID: Hi Folks, Can anyone confirm that LCs oAuth works well in production and cross platform? Thanks, Tom From ambassador at fourthworld.com Mon Jun 3 19:22:04 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Mon, 03 Jun 2024 23:22:04 +0000 Subject: LiveCode on Social Media Message-ID: <37638b79f1777f1ae9a5158c518af995dac19af9@fourthworld.com> For LC support nothing beats this use-list and the LC Forums, but for spreading the word about LC and the cool stuff you're making with it nothing beat social media. Two of the largest social media discussion groups for LC are: LinkedIn: "LiveCode Developers" Best social media platform for professional interests https://www.linkedin.com/groups/50811/ Facebook: "LiveCode Users" One of the biggest platforms for general audiences https://www.facebook.com/groups/livecodeusers Is there a third I should include there? If you use those platforms please consider joining the LC groups. The more active discussion that takes place there, the more newcomers may be introduced to the language we love. -- Richard Gaskin FourthWorld.com From hakan at exformedia.se Tue Jun 4 04:55:13 2024 From: hakan at exformedia.se (=?utf-8?Q?H=C3=A5kan_Liljegren?=) Date: Tue, 4 Jun 2024 10:55:13 +0200 Subject: Snapshot question In-Reply-To: <8DC380B5-23ED-49DC-87E4-955717BA7A49@uni-wh.de> References: <8DC380B5-23ED-49DC-87E4-955717BA7A49@uni-wh.de> Message-ID: LiveCode refuses to scale rotated images if the angle is set and lockloc is false but if you set lockloc to true you can scale the rotated image. If you just rotate an image with lockloc set (to true) it will always keep the image inside the original bounding box which is normally not what you want. But if you want to rotate and keep the same scale you need to calculate the new width and height of the image based on the scale factor. But if you have the scale factor nd the wanted angle we can, with some trigonometry, calculate the new width and height and thus create a function: constant deg2Rad = pi/180 on rotateAndScaleImage pImgID pDeg pScale if pScale is empty then put 1 into pScale put the loc of pImgID into tLoc put the formattedwidth of pImgID * pScale into tWidth put the formattedheight of pImgID * pScale into tHeight put pDeg * deg2Rad into tRad put abs(sin(tRad)) into tSin put abs(cos(tRad)) into tCos put tWidth * tCos + tHeight * tSin into tNewWidth put tWidth * tSin + tHeight * tCos into tNewHeight lock screen set the angle of pImgID to pDeg set the width of pImgID to tNewWidth set the height of pImgID to tNewHeight set the loc of pImgID to tLoc end rotateAndScaleImage pImgID is the reference to the image, pDeg is the rotation angle in degrees and pScale is the scale factor for the image. E.g. rotateAndScaleImage the long id of image “MyImage”, 22, 0.5 Will rotate image “MyImage” by 22 degrees at half the original size NOTE! The function above rotates the image around it’s center and to get the function to work the lockloc needs to be set to true Happy coding! :-Håkan > 1 juni 2024 kl. 13:18 skrev Niggemann, Bernd via use-livecode : > > Neville wrote >> Now while referenced images such as png’s can be >> rotated (more precisely, have their angle set) they lose their scaling, >> reverting to their native size; and rotated images cannot be scaled (why?? > > set the resizeQuality of the image to good or best depending on your image (images get a bit fuzzy when rotated) > > you can resize a rotated image if you set the imageData of the rotated image to the imageData of the rotated image > > set the angle of image 1 to 15 > set the imageData of image 1 to the imageData of image 1 > > As soon as you set the imageData of the image it is not referenced anymore. But it can be resized. > > I do not know your requirements exactly but if you want to set the angle repeatedly then it is best to store the original (non-rotated) text of the image and do your rotation every time from that starting point. > > i.e. > store original > set angle > restore to origina > set next angle > > Examples of rotating and resizing of image can be found in this topic of the Forum (old stuff but still working) > > https://forums.livecode.com/viewtopic.php?f=27&t=8042 > > Kind regards > Bernd > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Tue Jun 4 08:10:52 2024 From: paul at researchware.com (Paul Dupuis) Date: Tue, 4 Jun 2024 08:10:52 -0400 Subject: LiveCode on Social Media In-Reply-To: <37638b79f1777f1ae9a5158c518af995dac19af9@fourthworld.com> References: <37638b79f1777f1ae9a5158c518af995dac19af9@fourthworld.com> Message-ID: <22d189d2-b90b-401e-8e5a-6e1b3347c090@researchware.com> I followed this one for a little while: https://www.reddit.com/r/livecode/ It was not very active, and, like many Reddit groups, prone to SPAM. Reddit, in general, does have a large developer community. On 6/3/2024 7:22 PM, Richard Gaskin via use-livecode wrote: > For LC support nothing beats this use-list and the LC Forums, but for spreading the word about LC and the cool stuff you're making with it nothing beat social media. > > Two of the largest social media discussion groups for LC are: > > > LinkedIn: "LiveCode Developers" > Best social media platform for professional interests > https://www.linkedin.com/groups/50811/ > > > Facebook: "LiveCode Users" > One of the biggest platforms for general audiences > https://www.facebook.com/groups/livecodeusers > > > Is there a third I should include there? > > If you use those platforms please consider joining the LC groups. The more active discussion that takes place there, the more newcomers may be introduced to the language we love. > > -- > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Tue Jun 4 10:24:40 2024 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 4 Jun 2024 10:24:40 -0400 Subject: Snapshot question In-Reply-To: <800B6231-EC7E-45C7-93D8-67F28A8664D4@optusnet.com.au> References: <800B6231-EC7E-45C7-93D8-67F28A8664D4@optusnet.com.au> Message-ID: <059CFA51-2219-4139-AC98-1BBA43A012D1@starfirelighting.com> The docs must be wrong. I just tested with all seven of the graphic options in the tools palette, and they all rotate just fine. Craig > On May 31, 2024, at 9:30 PM, Neville Smythe via use-livecode wrote: > > Many thanks Craig and Bernd for your suggestions > > Craig: Unfortunately the docs say revRotatePoly only works with lines, curves and polygons > > Bernd: Oh! Yes, exporting as png does work to give transparent corner bits! Obvious now! > > I think I had briefly considered this and rejected it because at the time I was conflating the problem with an issue I am going to have later in my project. The roundrect graphics are going to be used as niches for a collection of images: the images should be scaled and rotated to fit the graphic object (or now its png alter-ego). Now while referenced images such as png’s can be rotated (more precisely, have their angle set) they lose their scaling, reverting to their native size; and rotated images cannot be scaled (why?? Rather a strange restriction. I think the graphical engine for LC is showing its age rather badly). Which somehow led me to think I had to use the bitmap form for snapshots. But if I place and scale the original image, then export that as a png, the exported image should have the required size and so can then be rotated without changing its size. I hope. > > Neville > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Tue Jun 4 14:48:12 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 04 Jun 2024 18:48:12 +0000 Subject: Snapshot question Message-ID: Craig wrote: > The docs must be wrong. I just tested with all seven of the graphic > options in the tools palette, and they all rotate just fine. I'd guess that Dictionary entry was written before July 7, 2007. In the revcommonlibrary script you'll find the revRotatePoly command on lines 496 thru 532, with the comment block above it noting the date it was added. On line 506 it gets the EFFECTIVE points for any graphic styles that doesn't innately have a points property. On line 525 it changes the style of the target graphic object to polygon if needed. Those two changes are not present in the older revRotatePolygonOld command listed just below it. -- Richard Gaskin FourthWorld.com From neville.smythe at optusnet.com.au Tue Jun 4 20:30:11 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 5 Jun 2024 10:30:11 +1000 Subject: Snapshot question In-Reply-To: References: Message-ID: <8348FF57-300D-49E5-96AA-40C58DDF7E1A@optusnet.com.au> > On 5 Jun 2024, at 2:00 am, Craig wrote: > > The docs must be wrong. I just tested with all seven of the graphic options in the tools palette, and they all rotate just fine. You are absolutely right, a roundedRect graphic does rotate with revPolyRotate. Don’t know why I trusted the docs rather than testing for myself (In my defence, I have been thinking more about my later issue of rotating scaled images). Moreover when the graphic is selected the rotated boundary is hilighted rather than the bounding box boundary as with a rotated image, which is huge advantage. The graphic's label is not rotated, which is a small disadvantage - or a feature; I can live with it for my application. So I can now delete a hundred or more lines of work-around code. And Hakan, many thanks, this will be very useful. But who knew!? Which is rather my point - perhaps scaling of rotated images was prohibited by default just because LC thought developers couldn’t deal with the trigonometry? So much good stuff from Bernd, Craig and Hakan. Neville Smythe From craig at starfirelighting.com Wed Jun 5 10:06:55 2024 From: craig at starfirelighting.com (Craig Newman) Date: Wed, 5 Jun 2024 10:06:55 -0400 Subject: Snapshot question In-Reply-To: References: Message-ID: <43E484B7-7EF1-4A98-9231-D51DA5449A03@starfirelighting.com> Richard. Intersting stuff. When one first drags a roundRect from the toolbar, the PI has a field to enter a value for the “roundRadius” property. But after a rotation, where the graphic is now defined solely by its “points” property, the ability to get or set that property disappears. I suppose this makes sense. And if one sets the roundRadius property to a value greater than the geometry of the graphic will allow, that is, the radius of the corners is greater than that which will ‘fit” onto the graphic itself, one gets a circle, though defined by points as opposed to the usual startAngle and arcAngle. Craig > On Jun 4, 2024, at 2:48 PM, Richard Gaskin via use-livecode wrote: > > Craig wrote: >> The docs must be wrong. I just tested with all seven of the graphic >> options in the tools palette, and they all rotate just fine. > > I'd guess that Dictionary entry was written before July 7, 2007. > > In the revcommonlibrary script you'll find the revRotatePoly command on lines 496 thru 532, with the comment block above it noting the date it was added. > > On line 506 it gets the EFFECTIVE points for any graphic styles that doesn't innately have a points property. > > On line 525 it changes the style of the target graphic object to polygon if needed. > > Those two changes are not present in the older revRotatePolygonOld command listed just below it. > > -- > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From jaguayo at telur.es Thu Jun 6 11:05:18 2024 From: jaguayo at telur.es (JosebaTELUR) Date: Thu, 6 Jun 2024 17:05:18 +0200 Subject: Mosquitto library. In-Reply-To: References: Message-ID: Hello: I'm trying to get the Mosquitto library to work and can't get it to work. Any help from the forum? (LiveCode 9.6.9 and Mojave System). Un saludo. Joseba. From tom at makeshyft.com Fri Jun 7 12:43:12 2024 From: tom at makeshyft.com (Tom Glod) Date: Fri, 7 Jun 2024 12:43:12 -0400 Subject: Mosquitto library. In-Reply-To: References: Message-ID: How are you trying to get it to work with Livecode? On Thu, Jun 6, 2024 at 11:06 AM JosebaTELUR via use-livecode < use-livecode at lists.runrev.com> wrote: > Hello: > > I'm trying to get the Mosquitto library to work and can't get it to work. > Any help from the forum? > (LiveCode 9.6.9 and Mojave System). > > Un saludo. > > Joseba. > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From bogdanoff at me.com Fri Jun 7 14:24:48 2024 From: bogdanoff at me.com (Peter Bogdanoff) Date: Fri, 7 Jun 2024 14:24:48 -0400 Subject: Mosquitto library. In-Reply-To: References: Message-ID: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Related to Mosquitto and the publish/subscribe model: is there any method now in LiveCode for my application to receive outside messages without explicitly checking to see if anything is available? In other words, is there a way for a message from a server to directly enter the message path within LC? Or is this totally dependent on a plugin based on something like what Joseba is asking? Peter Bogdanoff > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode wrote: > >> Mosquitto library From MikeKerner at roadrunner.com Fri Jun 7 15:44:42 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Fri, 7 Jun 2024 15:44:42 -0400 Subject: Mosquitto library. In-Reply-To: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> References: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Message-ID: * if you're on mobile, you can use push * you can also set up a small web server in your app to receive messages. levure uses this technique to receive messages from a plugin in sublime text that a script has been updated (so livecode will reload the script) * if we get websockets working, that will be another way to make this work. On Fri, Jun 7, 2024 at 2:26 PM Peter Bogdanoff via use-livecode < use-livecode at lists.runrev.com> wrote: > Related to Mosquitto and the publish/subscribe model: is there any method > now in LiveCode for my application to receive outside messages without > explicitly checking to see if anything is available? In other words, is > there a way for a message from a server to directly enter the message path > within LC? > > Or is this totally dependent on a plugin based on something like what > Joseba is asking? > > Peter Bogdanoff > > > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > >> Mosquitto library > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From tom at makeshyft.com Fri Jun 7 18:13:30 2024 From: tom at makeshyft.com (Tom Glod) Date: Fri, 7 Jun 2024 18:13:30 -0400 Subject: Mosquitto library. In-Reply-To: References: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Message-ID: websockets ....again. On Fri, Jun 7, 2024 at 3:46 PM Mike Kerner via use-livecode < use-livecode at lists.runrev.com> wrote: > * if you're on mobile, you can use push > * you can also set up a small web server in your app to receive messages. > levure uses this technique to receive messages from a plugin in sublime > text that a script has been updated (so livecode will reload the script) > * if we get websockets working, that will be another way to make this work. > > On Fri, Jun 7, 2024 at 2:26 PM Peter Bogdanoff via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > Related to Mosquitto and the publish/subscribe model: is there any method > > now in LiveCode for my application to receive outside messages without > > explicitly checking to see if anything is available? In other words, is > > there a way for a message from a server to directly enter the message > path > > within LC? > > > > Or is this totally dependent on a plugin based on something like what > > Joseba is asking? > > > > Peter Bogdanoff > > > > > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > > > >> Mosquitto library > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > -- > On the first day, God created the heavens and the Earth > On the second day, God created the oceans. > On the third day, God put the animals on hold for a few hours, > and did a little diving. > And God said, "This is good." > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From tom at makeshyft.com Fri Jun 7 18:14:15 2024 From: tom at makeshyft.com (Tom Glod) Date: Fri, 7 Jun 2024 18:14:15 -0400 Subject: Mosquitto library. In-Reply-To: References: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Message-ID: I think it might be time to solve this. On Fri, Jun 7, 2024 at 6:13 PM Tom Glod wrote: > websockets ....again. > > On Fri, Jun 7, 2024 at 3:46 PM Mike Kerner via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> * if you're on mobile, you can use push >> * you can also set up a small web server in your app to receive messages. >> levure uses this technique to receive messages from a plugin in sublime >> text that a script has been updated (so livecode will reload the script) >> * if we get websockets working, that will be another way to make this >> work. >> >> On Fri, Jun 7, 2024 at 2:26 PM Peter Bogdanoff via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> >> > Related to Mosquitto and the publish/subscribe model: is there any >> method >> > now in LiveCode for my application to receive outside messages without >> > explicitly checking to see if anything is available? In other words, is >> > there a way for a message from a server to directly enter the message >> path >> > within LC? >> > >> > Or is this totally dependent on a plugin based on something like what >> > Joseba is asking? >> > >> > Peter Bogdanoff >> > >> > > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode < >> > use-livecode at lists.runrev.com> wrote: >> > > >> > >> Mosquitto library >> > >> > _______________________________________________ >> > use-livecode mailing list >> > use-livecode at lists.runrev.com >> > Please visit this url to subscribe, unsubscribe and manage your >> > subscription preferences: >> > http://lists.runrev.com/mailman/listinfo/use-livecode >> > >> >> >> -- >> On the first day, God created the heavens and the Earth >> On the second day, God created the oceans. >> On the third day, God put the animals on hold for a few hours, >> and did a little diving. >> And God said, "This is good." >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > From MikeKerner at roadrunner.com Sat Jun 8 10:12:11 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Sat, 8 Jun 2024 10:12:11 -0400 Subject: Mosquitto library. In-Reply-To: References: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Message-ID: it might be time for the compiler to come out of the vaporware or the web features to come out of the vaporware if you've never set up a web server, there is example code in levure for setting up a tiny one to receive and respond to events. On Fri, Jun 7, 2024 at 6:15 PM Tom Glod via use-livecode < use-livecode at lists.runrev.com> wrote: > I think it might be time to solve this. > > On Fri, Jun 7, 2024 at 6:13 PM Tom Glod wrote: > > > websockets ....again. > > > > On Fri, Jun 7, 2024 at 3:46 PM Mike Kerner via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > >> * if you're on mobile, you can use push > >> * you can also set up a small web server in your app to receive > messages. > >> levure uses this technique to receive messages from a plugin in sublime > >> text that a script has been updated (so livecode will reload the script) > >> * if we get websockets working, that will be another way to make this > >> work. > >> > >> On Fri, Jun 7, 2024 at 2:26 PM Peter Bogdanoff via use-livecode < > >> use-livecode at lists.runrev.com> wrote: > >> > >> > Related to Mosquitto and the publish/subscribe model: is there any > >> method > >> > now in LiveCode for my application to receive outside messages without > >> > explicitly checking to see if anything is available? In other words, > is > >> > there a way for a message from a server to directly enter the message > >> path > >> > within LC? > >> > > >> > Or is this totally dependent on a plugin based on something like what > >> > Joseba is asking? > >> > > >> > Peter Bogdanoff > >> > > >> > > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode < > >> > use-livecode at lists.runrev.com> wrote: > >> > > > >> > >> Mosquitto library > >> > > >> > _______________________________________________ > >> > use-livecode mailing list > >> > use-livecode at lists.runrev.com > >> > Please visit this url to subscribe, unsubscribe and manage your > >> > subscription preferences: > >> > http://lists.runrev.com/mailman/listinfo/use-livecode > >> > > >> > >> > >> -- > >> On the first day, God created the heavens and the Earth > >> On the second day, God created the oceans. > >> On the third day, God put the animals on hold for a few hours, > >> and did a little diving. > >> And God said, "This is good." > >> _______________________________________________ > >> use-livecode mailing list > >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From ambassador at fourthworld.com Sat Jun 8 21:11:54 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sun, 09 Jun 2024 01:11:54 +0000 Subject: Mosquitto library. Message-ID: <924925da58c2560273c1ce6345fe1a02c376e4f0@fourthworld.com> Mike Kerner wrote: > * if you're on mobile, you can use push Desktop push isn't supported in LC's notifications API? > * you can also set up a small web server in your app to receive messages. > levure uses this technique to receive messages from a plugin in sublime > text that a script has been updated (so livecode will reload the script) Good on a LAN, but how do you get past a firewall without port forwarding? > * if we get websockets working, that will be another way to make this work. Do we need websockets on this? XMPP, for example, runs over regular sockets. Either way, I'd imagine a subscribe client looking to avoid polling is going to depend on a long-lived socket, no? Richard Gaskin FourthWorld.com From bobsneidar at iotecdigital.com Mon Jun 10 11:37:16 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 10 Jun 2024 15:37:16 +0000 Subject: Mosquitto library. In-Reply-To: <924925da58c2560273c1ce6345fe1a02c376e4f0@fourthworld.com> References: <924925da58c2560273c1ce6345fe1a02c376e4f0@fourthworld.com> Message-ID: <28700611-BB31-4B6A-B744-EC8EBDA9B58A@iotecdigital.com> No, and Yes. ;-) Bob S On Jun 8, 2024, at 6:11 PM, Richard Gaskin via use-livecode wrote: * if we get websockets working, that will be another way to make this work. Do we need websockets on this? XMPP, for example, runs over regular sockets. Either way, I'd imagine a subscribe client looking to avoid polling is going to depend on a long-lived socket, no? Richard Gaskin FourthWorld.com From MikeKerner at roadrunner.com Tue Jun 11 17:08:26 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Tue, 11 Jun 2024 17:08:26 -0400 Subject: Mosquitto library. In-Reply-To: <28700611-BB31-4B6A-B744-EC8EBDA9B58A@iotecdigital.com> References: <924925da58c2560273c1ce6345fe1a02c376e4f0@fourthworld.com> <28700611-BB31-4B6A-B744-EC8EBDA9B58A@iotecdigital.com> Message-ID: >Either way, I'd imagine a subscribe client looking to avoid polling is going to depend on a long-lived socket, no? That's part of the point of a websocket. you don't have to keep reopening it, and both ends can use it, as needed. On Mon, Jun 10, 2024 at 11:38 AM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > No, and Yes. ;-) > > Bob S > > > On Jun 8, 2024, at 6:11 PM, Richard Gaskin via use-livecode < > use-livecode at lists.runrev.com> wrote: > > * if we get websockets working, that will be another way to make this work. > > Do we need websockets on this? XMPP, for example, runs over regular > sockets. > > Either way, I'd imagine a subscribe client looking to avoid polling is > going to depend on a long-lived socket, no? > > > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From tariel at mac.com Wed Jun 12 11:07:24 2024 From: tariel at mac.com (Tariel Gogoberidze) Date: Wed, 12 Jun 2024 19:07:24 +0400 Subject: Apple developer application and installer certificates In-Reply-To: References: Message-ID: Hello, I received message from apple that -- Your Developer ID Installer Certificate will no longer be valid in 30 days. To generate a new certificate, sign in and visit Certificates, Identifiers & Profiles. And Your Developer ID Application Certificate will no longer be valid in 30 days. To generate a new certificate, sign in and visit Certificates, Identifiers & Profiles. — We do have applications created in LiveCode that we are still selling (outside of apple store) but this applications were apple certified with the help of Matthias Rebbe and I have no idea how to renew or generate new Installer and Developer ID certificates. The remote colocation computer on which Matthias did this certification magic is still available to connect to and we do have apple developer account. So if Matthias or somebody else is willing to help (for a payment of course) I will appreciate it and will provide access to remote computer, apple developer ID and other necessary information. Regards Tariel Gogoveridze From bobsneidar at iotecdigital.com Wed Jun 12 11:20:47 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 15:20:47 +0000 Subject: Date Words Message-ID: <9A1C0830-0504-4373-91BB-ACBAC3BA4350@iotecdigital.com> Hi all. Did you ever want to use phrases like yesterday, last tuesday or next friday in a date field? function dateWords pDate if word 1 of pDate is not among the items of "last,next,yesterday,today,tomorrow" then \ return empty put date() into tCurrentDate convert tCurrentDate to dateItems if the number of words of pDate = 2 then put "sunday,monday,tuesday,wednesday,thursday,friday,saturday" into tDaysOfWeek put itemOffset(word 2 of pDate, tDaysOfWeek) into tDayNumber put item 7 of tCurrentDate into tThisDayNumber if tDayNumber = 0 then \ return empty end if switch case word 1 of pDate is "last" if tDayNumber >= tThisDayNumber then \ subtract 7 from item 3 of tCurrentDate add (tDayNumber - tThisDayNumber) to item 3 of tCurrentDate break case word 1 of pDate is "next" add 7-tDayNumber to item 3 of tCurrentDate break case pDate is "yesterday" subtract 1 from item 3 of tCurrentDate break case pDate is "today" -- don't do anything break case pDate is "tomorrow" add 1 to item 3 of tCurrentDate break end switch put formatDate(tCurrentDate, "standard") into pDate return pDate end dateWords FUNCTION formatDate theDate, theFormat /* Accepts any valid date for the first parameter. If not a valid date, it simply returns what was passed. Second parameter can be any of the following: sql date: date in the yyyy-mm-dd format short date, abbreviated date, internet date, long date: LC versions of the same julian date: Julian number based on (I believe) Jacques formula standard date: The date in the form of "mm/dd/yyyy" */ put theDate into tSavedDate put the itemdelimiter into theOldDelim set the itemdelimiter to "-" IF the length of item 1 of theDate = 4 AND \ the number of items of theDate = 3 AND \ item 1 of theDate is a number AND \ item 2 of theDate is a number AND \ item 3 of theDate is a number THEN put item 2 of theDate & "/" & \ item 3 of theDate & "/" & \ item 1 of theDate into theDate END IF -- replace "." with "/" in theDate convert theDate to dateitems set the itemdelimiter to theOldDelim -- if the number of items of theDate <> 7 then -- answer "'" & theDate & "' is not a valid date format!" -- return tSavedDate -- end if SWITCH word 1 of theFormat CASE "sql" /* put item 1 of theDate & "-" & \ format("%02d",item 2 of theDate) & "-" & \ format("%02d",item 3 of theDate) into theDate */ put format("%s-%02d-%02d", item 1 of theDate, item 2 of theDate, \ item 3 of theDate) into theDate break CASE "short" convert theDate from dateitems to short date break CASE "abbreviated" convert theDate from dateitems to abbreviated date break CASE "abbr" convert theDate from dateitems to abbreviated date break CASE "internet" convert theDate from dateitems to internet date break CASE "long" convert theDate from dateitems to long date break CASE "julian" put the date into theDate convert theDate to dateItems IF ((item 2 of theDate = 1) OR (item 2 of theDate = 2)) THEN put 1 into theDay ELSE put 0 into theDay END IF put item 1 of theDate + 4800 - theDay into theYear put item 2 of theDate + (12 * theDay) - 3 into theMonth put item 3 of theDate + \ ((153 * theMonth + 2) div 5) + \ (365 * theYear) + \ (theYear div 4) - \ (theYear div 100) + \ (theYear div 400) - \ 32045 into theDate break case "standard" put format("%02d/%02d/%04d", item 2 of theDate, item 3 of theDate, \ item 1 of theDate) into theDate break default -- answer info "'" & theFormat & "' is not a valid parameter." As sheet put tSavedDate into theDate END SWITCH return theDate END formatDate Bob S From ambassador at fourthworld.com Wed Jun 12 13:26:33 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 12 Jun 2024 17:26:33 +0000 Subject: Mosquitto library. Message-ID: Mike Kerner wrote: > Richard wrote: >> Either way, I'd imagine a subscribe client looking to avoid polling >> is going to depend on a long-lived socket, no? > > That's part of the point of a websocket. you don't have to keep > reopening it, and both ends can use it, as needed. Exactly, websockets are useful in browser apps because browsers don't offer direct socket support. LiveCode makes OS-native apps and supports sockets. The socketTimeoutInterval lets us set how long they live. What am I missing? -- Richard Gaskin FourthWorld.com From bobsneidar at iotecdigital.com Wed Jun 12 13:39:06 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 17:39:06 +0000 Subject: Mosquitto library. In-Reply-To: References: Message-ID: Hi Richard. This email thread now has me curious. If I have an app that starts listening on a port, does that server port have a timeout associated with it that needs refreshing, or does the timeout only exist when a client connects? I have always assumed the latter. Bob S > On Jun 12, 2024, at 10:26 AM, Richard Gaskin via use-livecode wrote: > > Mike Kerner wrote: > >> Richard wrote: >>> Either way, I'd imagine a subscribe client looking to avoid polling >>> is going to depend on a long-lived socket, no? >> >> That's part of the point of a websocket. you don't have to keep >> reopening it, and both ends can use it, as needed. > > Exactly, websockets are useful in browser apps because browsers don't offer direct socket support. > > LiveCode makes OS-native apps and supports sockets. > > The socketTimeoutInterval lets us set how long they live. > > What am I missing? > > -- > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 12 14:20:24 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 18:20:24 +0000 Subject: Pop Combo Menu Message-ID: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> Hi all. I have a Combo Menu button. I want to have it “pop” open and show the options via script, but I cannot find a command to do that. Bob S From MikeKerner at roadrunner.com Wed Jun 12 14:42:49 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 12 Jun 2024 14:42:49 -0400 Subject: Mosquitto library. In-Reply-To: References: Message-ID: the original question was about mosquitto and handling messaging, thus the remarks about websockets. bob: the server just opens the port and listens. there is no timeout on the server. the client sends the request, and then times out if it does not receive a reply. whether it receives a reply or times out, the request is closed, and the client stops listening. the server does not retain the ability to continue to communicate with the client, once it has replied. websockets keep that channel open. On Wed, Jun 12, 2024 at 1:40 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi Richard. > > This email thread now has me curious. If I have an app that starts > listening on a port, does that server port have a timeout associated with > it that needs refreshing, or does the timeout only exist when a client > connects? I have always assumed the latter. > > Bob S > > > > On Jun 12, 2024, at 10:26 AM, Richard Gaskin via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Mike Kerner wrote: > > > >> Richard wrote: > >>> Either way, I'd imagine a subscribe client looking to avoid polling > >>> is going to depend on a long-lived socket, no? > >> > >> That's part of the point of a websocket. you don't have to keep > >> reopening it, and both ends can use it, as needed. > > > > Exactly, websockets are useful in browser apps because browsers don't > offer direct socket support. > > > > LiveCode makes OS-native apps and supports sockets. > > > > The socketTimeoutInterval lets us set how long they live. > > > > What am I missing? > > > > -- > > Richard Gaskin > > FourthWorld.com > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From paul at researchware.com Wed Jun 12 15:01:14 2024 From: paul at researchware.com (Paul Dupuis) Date: Wed, 12 Jun 2024 15:01:14 -0400 Subject: Pop Combo Menu In-Reply-To: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> Message-ID: <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> On 6/12/2024 2:20 PM, Bob Sneidar via use-livecode wrote: > Hi all. I have a Combo Menu button. I want to have it pop open and show the options via script, but I cannot find a command to do that. > > Bob S > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode You can use: *click*at(rightofbtn1- 5,topofbtn1+ 5) assuming the combo button is 'btn 1' on your card or replace btn 1 with a reference to your combo button. The idea is to generate a "click" at the location of the pulldown arrow part of the combo button. You can create a new empty stack and place a combo btn on it and try line of code in the message box with the browse tool selected. From paul at researchware.com Wed Jun 12 16:01:21 2024 From: paul at researchware.com (Paul Dupuis) Date: Wed, 12 Jun 2024 16:01:21 -0400 Subject: Pop Combo Menu In-Reply-To: <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> Message-ID: <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> On 6/12/2024 3:01 PM, Paul Dupuis via use-livecode wrote: > *click*at(rightofbtn1- 5,topofbtn1+ 5) Sorry that line of code is: (paste of formatted text messed it up) click at (right of btn 1 - 5,top of btn 1 + 5) From bobsneidar at iotecdigital.com Wed Jun 12 16:23:07 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 20:23:07 +0000 Subject: Pop Combo Menu In-Reply-To: <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> Message-ID: Thanks I was hoping I could do it without a click. Something like pop menu . There is a popup menu command but I think that only works with popup menus. Bob S > On Jun 12, 2024, at 1:01 PM, Paul Dupuis via use-livecode wrote: > > On 6/12/2024 3:01 PM, Paul Dupuis via use-livecode wrote: >> *click*at(rightofbtn1- 5,topofbtn1+ 5) > > Sorry that line of code is: (paste of formatted text messed it up) > > click at (right of btn 1 - 5,top of btn 1 + 5) > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 12 16:25:59 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 20:25:59 +0000 Subject: Pop Combo Menu In-Reply-To: References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> Message-ID: <88F1E79F-FF0A-4BB3-8A12-A12F5F44D268@iotecdigital.com> Hmmm looks like I can use popup button and provide a location. Bob S > On Jun 12, 2024, at 1:23 PM, Bob Sneidar via use-livecode wrote: > > Thanks I was hoping I could do it without a click. Something like pop menu . There is a popup menu command but I think that only works with popup menus. > > Bob S > > >> On Jun 12, 2024, at 1:01 PM, Paul Dupuis via use-livecode wrote: >> >> On 6/12/2024 3:01 PM, Paul Dupuis via use-livecode wrote: >>> *click*at(rightofbtn1- 5,topofbtn1+ 5) >> >> Sorry that line of code is: (paste of formatted text messed it up) >> >> click at (right of btn 1 - 5,top of btn 1 + 5) >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 12 16:30:41 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 20:30:41 +0000 Subject: Pop Combo Menu In-Reply-To: <88F1E79F-FF0A-4BB3-8A12-A12F5F44D268@iotecdigital.com> References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> <88F1E79F-FF0A-4BB3-8A12-A12F5F44D268@iotecdigital.com> Message-ID: BUUUTTT… It looks like that detaches the menu from the button so any subsequent click on the actual menu button displays the button as a popup menu. Bob S > On Jun 12, 2024, at 1:25 PM, Bob Sneidar wrote: > > Hmmm looks like I can use popup button and provide a location. > > Bob S > > >> On Jun 12, 2024, at 1:23 PM, Bob Sneidar via use-livecode wrote: >> >> Thanks I was hoping I could do it without a click. Something like pop menu . There is a popup menu command but I think that only works with popup menus. >> >> Bob S >> >> >>> On Jun 12, 2024, at 1:01 PM, Paul Dupuis via use-livecode wrote: >>> >>> On 6/12/2024 3:01 PM, Paul Dupuis via use-livecode wrote: >>>> *click*at(rightofbtn1- 5,topofbtn1+ 5) >>> >>> Sorry that line of code is: (paste of formatted text messed it up) >>> >>> click at (right of btn 1 - 5,top of btn 1 + 5) >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > From marksmithhfx at gmail.com Wed Jun 12 16:36:25 2024 From: marksmithhfx at gmail.com (Mark Smith) Date: Wed, 12 Jun 2024 21:36:25 +0100 Subject: Date Words In-Reply-To: <9A1C0830-0504-4373-91BB-ACBAC3BA4350@iotecdigital.com> References: <9A1C0830-0504-4373-91BB-ACBAC3BA4350@iotecdigital.com> Message-ID: <83C09BB9-F0E4-40AC-B9FF-79029D7793CE@gmail.com> Hi Bob, I love the concept in principle but that’s a lot of code (to write and debug) and it does’t cover every possible permutation and combination of date requests. I long for a time when we can just capture a string like “a week from next Friday” and then call… function string2gptDate chatGPT “what is the date “ & “a week from next Friday” -- the latter being the captured input, probably expressed as a field or var return it end string2gptDate Which I just tried after prompting “when asked for a date please return the date and not an explanation as to how you arrived at the date” and in response to the above it returned "June 28, 2024”. Magnifico! Mark > On 12 Jun 2024, at 4:20 PM, Bob Sneidar via use-livecode wrote: > > Hi all. > > Did you ever want to use phrases like yesterday, last tuesday or next friday in a date field? > > function dateWords pDate > if word 1 of pDate is not among the items of "last,next,yesterday,today,tomorrow" then \ > return empty > > put date() into tCurrentDate > convert tCurrentDate to dateItems > > if the number of words of pDate = 2 then > put "sunday,monday,tuesday,wednesday,thursday,friday,saturday" into tDaysOfWeek > put itemOffset(word 2 of pDate, tDaysOfWeek) into tDayNumber > put item 7 of tCurrentDate into tThisDayNumber > > if tDayNumber = 0 then \ > return empty > end if > > switch > case word 1 of pDate is "last" > if tDayNumber >= tThisDayNumber then \ > subtract 7 from item 3 of tCurrentDate > add (tDayNumber - tThisDayNumber) to item 3 of tCurrentDate > break > case word 1 of pDate is "next" > add 7-tDayNumber to item 3 of tCurrentDate > break > case pDate is "yesterday" > subtract 1 from item 3 of tCurrentDate > break > case pDate is "today" > -- don't do anything > break > case pDate is "tomorrow" > add 1 to item 3 of tCurrentDate > break > end switch > > put formatDate(tCurrentDate, "standard") into pDate > return pDate > end dateWords > > FUNCTION formatDate theDate, theFormat > /* > Accepts any valid date for the first parameter. If not a valid date, it simply returns > what was passed. Second parameter can be any of the following: > sql date: date in the yyyy-mm-dd format > short date, abbreviated date, internet date, long date: LC versions of the same > julian date: Julian number based on (I believe) Jacques formula > standard date: The date in the form of "mm/dd/yyyy" > */ > > put theDate into tSavedDate > put the itemdelimiter into theOldDelim > set the itemdelimiter to "-" > > IF the length of item 1 of theDate = 4 AND \ > the number of items of theDate = 3 AND \ > item 1 of theDate is a number AND \ > item 2 of theDate is a number AND \ > item 3 of theDate is a number THEN > put item 2 of theDate & "/" & \ > item 3 of theDate & "/" & \ > item 1 of theDate into theDate > END IF > > -- replace "." with "/" in theDate > convert theDate to dateitems > set the itemdelimiter to theOldDelim > > -- if the number of items of theDate <> 7 then > -- answer "'" & theDate & "' is not a valid date format!" > -- return tSavedDate > -- end if > > SWITCH word 1 of theFormat > CASE "sql" > /* > put item 1 of theDate & "-" & \ > format("%02d",item 2 of theDate) & "-" & \ > format("%02d",item 3 of theDate) into theDate > */ > put format("%s-%02d-%02d", item 1 of theDate, item 2 of theDate, \ > item 3 of theDate) into theDate > break > CASE "short" > convert theDate from dateitems to short date > break > CASE "abbreviated" > convert theDate from dateitems to abbreviated date > break > CASE "abbr" > convert theDate from dateitems to abbreviated date > break > CASE "internet" > convert theDate from dateitems to internet date > break > CASE "long" > convert theDate from dateitems to long date > break > CASE "julian" > put the date into theDate > convert theDate to dateItems > IF ((item 2 of theDate = 1) OR (item 2 of theDate = 2)) THEN > put 1 into theDay > ELSE > put 0 into theDay > END IF > put item 1 of theDate + 4800 - theDay into theYear > put item 2 of theDate + (12 * theDay) - 3 into theMonth > put item 3 of theDate + \ > ((153 * theMonth + 2) div 5) + \ > (365 * theYear) + \ > (theYear div 4) - \ > (theYear div 100) + \ > (theYear div 400) - \ > 32045 into theDate > break > case "standard" > put format("%02d/%02d/%04d", item 2 of theDate, item 3 of theDate, \ > item 1 of theDate) into theDate > break > default > -- answer info "'" & theFormat & "' is not a valid parameter." As sheet > put tSavedDate into theDate > END SWITCH > > return theDate > END formatDate > > Bob S > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Wed Jun 12 18:10:19 2024 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Thu, 13 Jun 2024 00:10:19 +0200 Subject: Apple developer application and installer certificates In-Reply-To: References: Message-ID: Hello Tariel, renewing is very easy and takes only minutes. If you want, I can guide you through this process. Just contact me off-list. Regards, Matthias > Am 12.06.2024 um 17:07 schrieb Tariel Gogoberidze via use-livecode : > > Hello, > > I received message from apple that > > -- > Your Developer ID Installer Certificate will no longer be valid in 30 days. To generate a new certificate, sign in and visit Certificates, Identifiers & Profiles. > > And > > Your Developer ID Application Certificate will no longer be valid in 30 days. To generate a new certificate, sign in and visit Certificates, Identifiers & Profiles. > — > > We do have applications created in LiveCode that we are still selling (outside of apple store) but this applications were apple certified with the help of Matthias Rebbe and I have no idea how to renew or generate new Installer and Developer ID certificates. > > The remote colocation computer on which Matthias did this certification magic is still available to connect to and we do have apple developer account. So if Matthias or somebody else is willing to help (for a payment of course) I will appreciate it and will provide access to remote computer, apple developer ID and other necessary information. > > Regards > Tariel Gogoveridze > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alex at tweedly.net Wed Jun 12 19:33:25 2024 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 13 Jun 2024 00:33:25 +0100 Subject: Mosquitto library. In-Reply-To: References: Message-ID: On 12/06/2024 18:26, Richard Gaskin via use-livecode wrote: > Mike Kerner wrote: > >> Richard wrote: >>> Either way, I'd imagine a subscribe client looking to avoid polling >>> is going to depend on a long-lived socket, no? >> That's part of the point of a websocket. you don't have to keep >> reopening it, and both ends can use it, as needed. > Exactly, websockets are useful in browser apps because browsers don't offer direct socket support. > > LiveCode makes OS-native apps and supports sockets.\ If the "OS" is 'web', will LC support sockets? According to the dictionary, it doesn't = but that might (I hope) be out of date. But this might be the place we really need to use websockets. Alex. From MikeKerner at roadrunner.com Wed Jun 12 21:31:38 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 12 Jun 2024 21:31:38 -0400 Subject: Apple developer application and installer certificates In-Reply-To: References: Message-ID: for anyone else dropping into this thread, custom apps have to be rebuilt with a new cert, once per year. it's not a big deal, it's just something that has to be done. it takes a few minutes, max. On Wed, Jun 12, 2024 at 6:11 PM matthias rebbe via use-livecode < use-livecode at lists.runrev.com> wrote: > Hello Tariel, > > renewing is very easy and takes only minutes. If you want, I can guide you > through this process. > Just contact me off-list. > > Regards, > Matthias > > > Am 12.06.2024 um 17:07 schrieb Tariel Gogoberidze via use-livecode < > use-livecode at lists.runrev.com>: > > > > Hello, > > > > I received message from apple that > > > > -- > > Your Developer ID Installer Certificate will no longer be valid in 30 > days. To generate a new certificate, sign in and visit Certificates, > Identifiers & Profiles. > > > > And > > > > Your Developer ID Application Certificate will no longer be valid in 30 > days. To generate a new certificate, sign in and visit Certificates, > Identifiers & Profiles. > > — > > > > We do have applications created in LiveCode that we are still selling > (outside of apple store) but this applications were apple certified with > the help of Matthias Rebbe and I have no idea how to renew or generate new > Installer and Developer ID certificates. > > > > The remote colocation computer on which Matthias did this certification > magic is still available to connect to and we do have apple developer > account. So if Matthias or somebody else is willing to help (for a payment > of course) I will appreciate it and will provide access to remote computer, > apple developer ID and other necessary information. > > > > Regards > > Tariel Gogoveridze > > > > > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From scott at elementarysoftware.com Wed Jun 12 21:53:19 2024 From: scott at elementarysoftware.com (scott at elementarysoftware.com) Date: Wed, 12 Jun 2024 18:53:19 -0700 Subject: iPad Keyboard and rawKeyDown Message-ID: <00242C07-E0C5-4961-9E7F-4685E5419A2D@elementarysoftware.com> I’m new to using a physical keyboard with an iPad and haven’t ever done any testing to see if it worked in LiveCode. My recent experience using the new “Magic Keyboard for iPad Pro" is that rawKeyDown (and rawKeyUp) messages are not being handled by LiveCode. Is this a general failing of mobileKeyboards (the dictionary suggests not) an issue with just this newly released keyboard… or perhaps the more likely problem of developer error? Just checking in before I submit a bug (or enhancement?) report. -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com email scott at elementarysoftware.com booth 1-360-734-4701 ------------------------------------------------------ From tom at makeshyft.com Wed Jun 12 21:58:35 2024 From: tom at makeshyft.com (Tom Glod) Date: Wed, 12 Jun 2024 21:58:35 -0400 Subject: Mosquitto library. In-Reply-To: References: Message-ID: I was just viewitng the "livecode" tag on github. and saw this library. https://github.com/trevordevore/lc-mosquitto Trevor is prolific. Big respect. On Wed, Jun 12, 2024 at 7:33 PM Alex Tweedly via use-livecode < use-livecode at lists.runrev.com> wrote: > > On 12/06/2024 18:26, Richard Gaskin via use-livecode wrote: > > Mike Kerner wrote: > > > >> Richard wrote: > >>> Either way, I'd imagine a subscribe client looking to avoid polling > >>> is going to depend on a long-lived socket, no? > >> That's part of the point of a websocket. you don't have to keep > >> reopening it, and both ends can use it, as needed. > > Exactly, websockets are useful in browser apps because browsers don't > offer direct socket support. > > > > LiveCode makes OS-native apps and supports sockets.\ > > If the "OS" is 'web', will LC support sockets? > > According to the dictionary, it doesn't = but that might (I hope) be out > of date. But this might be the place we really need to use websockets. > > Alex. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From jbv at souslelogo.com Thu Jun 13 04:28:32 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Thu, 13 Jun 2024 04:28:32 -0400 Subject: Different borders for a group Message-ID: <6d092a14185510ca84acee1d4829ebd5@souslelogo.com> Hi list, Is there a way to have different border widths and colors for the top and the bottom of a group ? Or should I include graphic lines inside the group ? Thank you in advance. jbv From craig at starfirelighting.com Thu Jun 13 09:51:11 2024 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 13 Jun 2024 09:51:11 -0400 Subject: Different borders for a group In-Reply-To: <6d092a14185510ca84acee1d4829ebd5@souslelogo.com> References: <6d092a14185510ca84acee1d4829ebd5@souslelogo.com> Message-ID: <1F83D27E-51E2-49D8-8760-3B9B7917CB20@starfirelighting.com> Hi. The borderWidth is a property of the entire border. You will have to add your own one by one. Hey, at least that allows you to change colors and other things as well. Craig > On Jun 13, 2024, at 4:28 AM, jbv via use-livecode wrote: > > Hi list, > > Is there a way to have different border widths and colors > for the top and the bottom of a group ? > Or should I include graphic lines inside the group ? > > Thank you in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Thu Jun 13 09:54:53 2024 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 13 Jun 2024 09:54:53 -0400 Subject: Pop Combo Menu In-Reply-To: References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> Message-ID: <88036E20-765A-4951-8119-94909012CF9D@starfirelighting.com> "I was hoping I could do it without a click.” Why? That works like a charm, and does not even make the slightest sound. Craig > On Jun 12, 2024, at 4:23 PM, Bob Sneidar via use-livecode wrote: > > I was hoping I could do it without a click. From klaus at major-k.de Fri Jun 14 14:19:59 2024 From: klaus at major-k.de (Klaus major-k) Date: Fri, 14 Jun 2024 20:19:59 +0200 Subject: Survey: Would you buy one or more widgets from the PRO PACK separately? Message-ID: Hi friends, Livecode is selling most of their widgets separately, however not the ones from the PRO PACK: Mobile Debugger Script Profiler tsNet PRO mergAccessory PDF Viewer But unfortunately the PRO PACK is quite expensive: 328.90 Euro PLUS VAT! I am sure most of you do not need all the widgets in the PRO PACK, but maybe one or two of them. So please just write if you'd like to buy one or more of these, maybe we can induce LC to also sell them separately. ---------- I confess that this is a quite selfish idea from me, I only use the PDF Viewer widget in my freeware* app and the app exclusively made for my band mates, three of us use an iPad and two of us an Android tablet. *It's actually "donationware", but noone donated any money so far in the last couple of years. :-/ I bought the complete PRO Pack in the last three years, although I ONLY need the PDF viewer, but cannot afford this anymore. Especially since I do not earn any money with my apps and I need to renew my Apple Developer Membership in october. I would LOVE to buy just the PDF widget separately! Thank you for reading! P.S. Since Android browser cannot display PDF files out of the box, this is no alternative for me. Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From paul at researchware.com Fri Jun 14 15:01:24 2024 From: paul at researchware.com (Paul Dupuis) Date: Fri, 14 Jun 2024 15:01:24 -0400 Subject: Survey: Would you buy one or more widgets from the PRO PACK separately? In-Reply-To: References: Message-ID: <3d26732c-1135-4dd8-a891-cbd69e8181ba@researchware.com> Of those listed, I would pay for (if I needed to, but I have the full LC that includes extensions) the PDF Viewer and, possibly, tsNet PRO I do not develop for mobile, so mobile widgets are not of any immediate interest. On 6/14/2024 2:19 PM, Klaus major-k via use-livecode wrote: > Hi friends, > > Livecode is selling most of their widgets separately, > however not the ones from the PRO PACK: > Mobile Debugger > Script Profiler > tsNet PRO > mergAccessory > PDF Viewer > > But unfortunately the PRO PACK is quite expensive: > 328.90 Euro PLUS VAT! > > I am sure most of you do not need all the widgets in the > PRO PACK, but maybe one or two of them. > > So please just write if you'd like to buy one or more of these, > maybe we can induce LC to also sell them separately. > > ---------- > > I confess that this is a quite selfish idea from me, I only > use the PDF Viewer widget in my freeware* app and the > app exclusively made for my band mates, three of us use > an iPad and two of us an Android tablet. > > *It's actually "donationware", but noone donated any money > so far in the last couple of years. :-/ > > I bought the complete PRO Pack in the last three years, > although I ONLY need the PDF viewer, but cannot afford > this anymore. Especially since I do not earn any money > with my apps and I need to renew my Apple Developer > Membership in october. > > I would LOVE to buy just the PDF widget separately! > > Thank you for reading! > > P.S. > Since Android browser cannot display PDF files out of the box, > this is no alternative for me. > > > Best > > Klaus > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From MikeKerner at roadrunner.com Mon Jun 17 10:26:53 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Mon, 17 Jun 2024 10:26:53 -0400 Subject: Hacking LiveCode In-Reply-To: References: Message-ID: the lc hack repo has been updated with more goodness from mark wieder. mark added more patches to powerPlug and more ways to apply patches to powerStrip examples: * can handle object scripts * can now add missing functions * new PowerPlugs for additional bugfixes On Sun, Sep 25, 2022 at 5:57 PM Mike Kerner wrote: > that's one of the things i'm wondering about, like "did you uninstall it, > or just unload it, or did you uninstall it but not unload it? did you build > a new version in the test environment and test that against an existing > install?" > it's been days since i ran into this, and the only notes that i have on it > are that i ran into it. i didn't keep track of the recipe. > > > On Sun, Sep 25, 2022 at 5:08 PM Brian Milby via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Did you restart LiveCode after installing the updated widget? >> >> Brian Milby >> brian at milby7.com >> >> > On Sep 25, 2022, at 4:53 PM, Mike Kerner via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> > >> > 1. is that documented, somewhere, because i cannot find it. >> > 2. that isn't the problem i was having. the problem i was having was >> that >> > if i took a widget (navRad, for instance), and added code to it, then >> > installed the new version, preexisting copies of the widget would not >> > execute the new code. new copies would. >> > so, it's 100% possible that i discovered some other behavior, but after >> > testing it a few times, instead of documenting the recipe, i accepted >> that >> > this was the behavior, and went about addressing it. except, today, >> when i >> > tested it, the behavior is the one that you would want (in unbuilt apps, >> > behaviors in newer versions of the widget are reflected in existing >> copies >> > of the widget). so i have to go replicate the behavior, again and >> develop a >> > recipe, again. >> > 3. fortunately or not, chasing this particular bear for days has >> resulted >> > in a snippet in the hack repo which i hope extracts all properties for >> an >> > object, standard or specific. >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > > -- > On the first day, God created the heavens and the Earth > On the second day, God created the oceans. > On the third day, God put the animals on hold for a few hours, > and did a little diving. > And God said, "This is good." > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From klaus at major-k.de Tue Jun 18 06:34:57 2024 From: klaus at major-k.de (Klaus major-k) Date: Tue, 18 Jun 2024 12:34:57 +0200 Subject: Survey: Would you buy one or more widgets from the PRO PACK separately? In-Reply-To: <3d26732c-1135-4dd8-a891-cbd69e8181ba@researchware.com> References: <3d26732c-1135-4dd8-a891-cbd69e8181ba@researchware.com> Message-ID: <55BD4EEB-E61A-4B5A-88B8-C5A408C63BB1@major-k.de> Hi Paul, > Am 14.06.2024 um 21:01 schrieb Paul Dupuis via use-livecode : > > Of those listed, I would pay for (if I needed to, but I have the full LC that includes extensions) the PDF Viewer and, possibly, tsNet PRO > I do not develop for mobile, so mobile widgets are not of any immediate interest. sorry for the late response, thank you very much for you feedback! > On 6/14/2024 2:19 PM, Klaus major-k via use-livecode wrote: >> Hi friends, >> >> Livecode is selling most of their widgets separately, >> however not the ones from the PRO PACK: >> Mobile Debugger >> Script Profiler >> tsNet PRO >> mergAccessory >> PDF Viewer >> >> But unfortunately the PRO PACK is quite expensive: >> 328.90 Euro PLUS VAT! >> >> I am sure most of you do not need all the widgets in the >> PRO PACK, but maybe one or two of them. >> >> So please just write if you'd like to buy one or more of these, >> maybe we can induce LC to also sell them separately. >> >> ---------- >> >> I confess that this is a quite selfish idea from me, I only >> use the PDF Viewer widget in my freeware* app and the >> app exclusively made for my band mates, three of us use >> an iPad and two of us an Android tablet. >> >> *It's actually "donationware", but noone donated any money >> so far in the last couple of years. :-/ >> >> I bought the complete PRO Pack in the last three years, >> although I ONLY need the PDF viewer, but cannot afford >> this anymore. Especially since I do not earn any money >> with my apps and I need to renew my Apple Developer >> Membership in october. >> >> I would LOVE to buy just the PDF widget separately! >> >> Thank you for reading! >> >> P.S. >> Since Android browser cannot display PDF files out of the box, >> this is no alternative for me. Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From panos.merakos at livecode.com Thu Jun 20 09:49:17 2024 From: panos.merakos at livecode.com (panagiotis merakos) Date: Thu, 20 Jun 2024 16:49:17 +0300 Subject: [[ ANN ]] Release 9.6.12 Message-ID: Dear list members, We are pleased to announce the release of LiveCode 9.6.12 STABLE. LiveCode 9.6.12 STABLE comes with 19 bugfixes and performance improvements since the last stable version, including support for adding a privacy manifest in your iOS app, which is a new requirement for AppStore submissions. You can find more details on the bug fixes and improvements of this new release here: https://livecode.com/release-9-6-12-stable/ You can find the release in your LiveCode account area or get it via the automatic updater. Enjoy! Kind regards The LiveCode Team -- From jbv at souslelogo.com Fri Jun 21 07:15:41 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Fri, 21 Jun 2024 07:15:41 -0400 Subject: Copying groups Message-ID: <42d886e9d09d2582d52d0fb751dcd2ed@souslelogo.com> Hi list, I have a single card stack containing several groups, each group containing several fields and images. I need to copy these groups to a substack. I use : copy grp tname of cd 1 of this stack to cd 1 of stack myTarget The weird thing is that all groups are copied, but the text content of every field is missing. What did I miss ? Thank you in advance. jbv From merakosp at gmail.com Fri Jun 21 08:44:14 2024 From: merakosp at gmail.com (panagiotis merakos) Date: Fri, 21 Jun 2024 15:44:14 +0300 Subject: Copying groups In-Reply-To: <42d886e9d09d2582d52d0fb751dcd2ed@souslelogo.com> References: <42d886e9d09d2582d52d0fb751dcd2ed@souslelogo.com> Message-ID: Hello jbv, What is the sharedText property of the field(s)? I _think_ it has to be true in your use case. Kind regards, Panos -- On Fri, 21 Jun 2024 at 14:16, jbv via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi list, > > I have a single card stack containing several groups, > each group containing several fields and images. > I need to copy these groups to a substack. > I use : > copy grp tname of cd 1 of this stack to cd 1 of stack myTarget > > The weird thing is that all groups are copied, but the text > content of every field is missing. > What did I miss ? > > Thank you in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From jbv at souslelogo.com Fri Jun 21 08:57:24 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Fri, 21 Jun 2024 08:57:24 -0400 Subject: Copying groups In-Reply-To: References: <42d886e9d09d2582d52d0fb751dcd2ed@souslelogo.com> Message-ID: <871eb07b6b397a9e856232a56ef5272e@souslelogo.com> Hello, Yes, indeed, the sharedText property of the field(s) need to be set to true. Many thanks. jbv Le 2024-06-21 08:44, panagiotis merakos via use-livecode a crit : > Hello jbv, > > What is the sharedText property of the field(s)? I _think_ it has to be > true in your use case. > > Kind regards, > Panos > -- > > On Fri, 21 Jun 2024 at 14:16, jbv via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Hi list, >> >> I have a single card stack containing several groups, >> each group containing several fields and images. >> I need to copy these groups to a substack. >> I use : >> copy grp tname of cd 1 of this stack to cd 1 of stack myTarget >> >> The weird thing is that all groups are copied, but the text >> content of every field is missing. >> What did I miss ? >> >> Thank you in advance. >> jbv >> From jbv at souslelogo.com Fri Jun 21 11:13:35 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Fri, 21 Jun 2024 11:13:35 -0400 Subject: Printing to pdf Message-ID: <568ef2bd8e342c3c15b5db8ae5301d80@souslelogo.com> Hi list, I have a stack with several cards 750 x 1000px. I am trying to print these cards as pdf, but according to this lesson https://lessons.livecode.com/m/4071/l/29177-how-to-create-pdfs-using-livecode the stack size should be 575 x 800 to fit a A4 document ratio. Is it possible to "force" the printing to different sizes, without clipping the content of the cards ? I tried : print card x into 0,0,750,1000 but the cards are still clipped. The pdf I need to build is not for printing, only for reading on screen. Thank you in advance. jbv From jbv at souslelogo.com Fri Jun 21 11:21:34 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Fri, 21 Jun 2024 11:21:34 -0400 Subject: Printing to pdf In-Reply-To: <568ef2bd8e342c3c15b5db8ae5301d80@souslelogo.com> References: <568ef2bd8e342c3c15b5db8ae5301d80@souslelogo.com> Message-ID: <54c5259bacf1184498d0368549aefdbb@souslelogo.com> Nevermind, I found the solution : I modified the printScale property. Best From bobsneidar at iotecdigital.com Fri Jun 21 16:30:28 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 21 Jun 2024 20:30:28 +0000 Subject: Windows SE how to clone while dragging Message-ID: <323CA777-0D10-4B04-AC1E-D38377767FAC@iotecdigital.com> On the MacOS LC SE, I can hold the optionKey down while dragging some selected text and it will clone the selection rather than just move it. For some reason, in LC for Windows SE, it still only moves the selected text. Bummer! Is there a key combo for cloning? If not, WHY? Bob S From curry at pair.com Sun Jun 23 05:36:06 2024 From: curry at pair.com (Curry Kenworthy) Date: Sun, 23 Jun 2024 05:36:06 -0400 Subject: Windows SE how to clone while dragging In-Reply-To: <323CA777-0D10-4B04-AC1E-D38377767FAC@iotecdigital.com> References: <323CA777-0D10-4B04-AC1E-D38377767FAC@iotecdigital.com> Message-ID: Bob: > On the MacOS LC SE, I can hold the optionKey down while dragging > some selected text and it will clone the selection ... > Windows SE ... Is there a key combo for cloning? Ctrl. Best wishes, Curry Kenworthy Radically Innovative Christian LiveCode Development "PASSION for Elegant, Efficient Code!" https://livecodeconsulting.com/ From bobsneidar at iotecdigital.com Mon Jun 24 11:57:13 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 24 Jun 2024 15:57:13 +0000 Subject: Windows SE how to clone while dragging In-Reply-To: References: <323CA777-0D10-4B04-AC1E-D38377767FAC@iotecdigital.com> Message-ID: Right you are. I would have sworn I tried that! Bob S > On Jun 23, 2024, at 2:36 AM, Curry Kenworthy via use-livecode wrote: > > Bob: > > > On the MacOS LC SE, I can hold the optionKey down while dragging > > some selected text and it will clone the selection ... > > > Windows SE ... Is there a key combo for cloning? > > Ctrl. > > Best wishes, > > Curry Kenworthy > > Radically Innovative Christian LiveCode Development > "PASSION for Elegant, Efficient Code!" > https://livecodeconsulting.com/ From bobsneidar at iotecdigital.com Mon Jun 24 12:22:08 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 24 Jun 2024 16:22:08 +0000 Subject: Socket Packaging Message-ID: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> Hi all. I came up with deceptively simple wrappers for packaging data for transmission over raw sockets. I can’t send the slyEncrypt and slyDecrypt handlers because I use methods no one else knows. But you can roll your own or else eliminate encryption altogether. And to answer the question befor it’s asked, I don’t use SSL because I don’t like having to deal with certificates, and also because I use a method for encryption that I don’t think anyone else has thought of, or at least I can’t find any info online. Bob S command packagePayload @pPayload, pUseEncryption if pPayload is an array then \ put arrayEncode(pPayload) into pPayload if pUseEncryption then \ put slyEncrypt(pPayload) into pPayload put base64Encode(pPayload) into pPayload end packagePayload command unpackPayload @pPayload put base64Decode(pPayload) into pPayload if pPayload begins with "salted" then \ put slyDecrypt(pPayload) into pPayload try put arrayDecode(pPayload) into tResult put tResult into pPayload catch tError -- not an array end try end unpackPayload From MikeKerner at roadrunner.com Mon Jun 24 13:54:35 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Mon, 24 Jun 2024 13:54:35 -0400 Subject: Socket Packaging In-Reply-To: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> References: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> Message-ID: have a look at caddy. it allows you to reverse proxy and have the best of both worlds: * server traffic to and from caddy is in the clear, so less mess * caddy handles all the cert silliness, while also giving you ssl to/from the clients we've been doing this for two years (maybe it's three, now). it works great, and i never have to think about it. also, the configuration was really, really simple. On Mon, Jun 24, 2024 at 12:23 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi all. > > I came up with deceptively simple wrappers for packaging data for > transmission over raw sockets. I can’t send the slyEncrypt and slyDecrypt > handlers because I use methods no one else knows. But you can roll your own > or else eliminate encryption altogether. > > And to answer the question befor it’s asked, I don’t use SSL because I > don’t like having to deal with certificates, and also because I use a > method for encryption that I don’t think anyone else has thought of, or at > least I can’t find any info online. > > Bob S > > command packagePayload @pPayload, pUseEncryption > if pPayload is an array then \ > put arrayEncode(pPayload) into pPayload > > if pUseEncryption then \ > put slyEncrypt(pPayload) into pPayload > > put base64Encode(pPayload) into pPayload > end packagePayload > > command unpackPayload @pPayload > put base64Decode(pPayload) into pPayload > > if pPayload begins with "salted" then \ > put slyDecrypt(pPayload) into pPayload > > try > put arrayDecode(pPayload) into tResult > put tResult into pPayload > catch tError > -- not an array > end try > end unpackPayload > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From david.bovill at gmail.com Mon Jun 24 15:01:35 2024 From: david.bovill at gmail.com (David Bovill) Date: Mon, 24 Jun 2024 20:01:35 +0100 Subject: Socket Packaging In-Reply-To: References: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> Message-ID: Yes, I recently looked at a few reverse proxies. I now run Caddy on localhost and have some scripts to manage caddyfiles and starting and stopping the caddy server. Happy to show share if interested in a Zoom. On Mon, 24 Jun 2024 at 18:56, Mike Kerner via use-livecode < use-livecode at lists.runrev.com> wrote: > have a look at caddy. it allows you to reverse proxy and have the best of > both worlds: > * server traffic to and from caddy is in the clear, so less mess > * caddy handles all the cert silliness, while also giving you ssl to/from > the clients > we've been doing this for two years (maybe it's three, now). it works > great, and i never have to think about it. > also, the configuration was really, really simple. > > On Mon, Jun 24, 2024 at 12:23 PM Bob Sneidar via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > Hi all. > > > > I came up with deceptively simple wrappers for packaging data for > > transmission over raw sockets. I can’t send the slyEncrypt and slyDecrypt > > handlers because I use methods no one else knows. But you can roll your > own > > or else eliminate encryption altogether. > > > > And to answer the question befor it’s asked, I don’t use SSL because I > > don’t like having to deal with certificates, and also because I use a > > method for encryption that I don’t think anyone else has thought of, or > at > > least I can’t find any info online. > > > > Bob S > > > > command packagePayload @pPayload, pUseEncryption > > if pPayload is an array then \ > > put arrayEncode(pPayload) into pPayload > > > > if pUseEncryption then \ > > put slyEncrypt(pPayload) into pPayload > > > > put base64Encode(pPayload) into pPayload > > end packagePayload > > > > command unpackPayload @pPayload > > put base64Decode(pPayload) into pPayload > > > > if pPayload begins with "salted" then \ > > put slyDecrypt(pPayload) into pPayload > > > > try > > put arrayDecode(pPayload) into tResult > > put tResult into pPayload > > catch tError > > -- not an array > > end try > > end unpackPayload > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > -- > On the first day, God created the heavens and the Earth > On the second day, God created the oceans. > On the third day, God put the animals on hold for a few hours, > and did a little diving. > And God said, "This is good." > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From ambassador at fourthworld.com Mon Jun 24 18:07:08 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Mon, 24 Jun 2024 22:07:08 +0000 Subject: Socket Packaging Message-ID: <95250661daac2f77cab67805bb87f3bfec07ca7f@fourthworld.com> Bob Sneidar wrote: > I don’t use SSL because I don’t like having to deal with certificates, > and also because I use a method for encryption that I don’t think > anyone else has thought of, or at least I can’t find any info online. Encryption is half of what SSL offers, the other half being external validation that the server you're trying to reach hasn't been spoofed. I used to roll my own but these days I have audit compliance to meet, so I just do things the OG way. For those of you who need a cert on any modern Ubuntu, it's now a one-liner: sudo apt install certbot python3-certbot-apache Run that, follow the prompts, and you're good to go in seconds. Details: https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04 Of course it never hurts to do belt AND suspenders, so your encrpyted packaging can offer a second layer of protection for critical needs. Richard Gaskin FourthWorld.com From paul at researchware.com Tue Jun 25 16:35:31 2024 From: paul at researchware.com (Paul Dupuis) Date: Tue, 25 Jun 2024 16:35:31 -0400 Subject: eMail attachment: best practice? Message-ID: Under a specific condition, my app creates an email with some pre-populated information using revMail: revMail address, [ccAddress, [mailSubject, [messageBody]]] So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. I realize the user still has to click their send button in their email client, but I have 2 questions: 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? From marksmithhfx at gmail.com Tue Jun 25 17:46:47 2024 From: marksmithhfx at gmail.com (Mark Smith) Date: Tue, 25 Jun 2024 22:46:47 +0100 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: I’ve not used revMail but it’s certainly well documented in mobileComposeHtmlMail. If you need an example PM me. Mark > On 25 Jun 2024, at 9:35 PM, Paul Dupuis via use-livecode wrote: > > 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? > From matthias_livecode_150811 at m-r-d.de Tue Jun 25 18:15:35 2024 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Wed, 26 Jun 2024 00:15:35 +0200 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. Here you can find an sample stack https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode And here is a link to a Livecode Lesson https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external > Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : > > Under a specific condition, my app creates an email with some pre-populated information using revMail: > > revMail address, [ccAddress, [mailSubject, [messageBody]]] > > So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody > Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. > > I realize the user still has to click their send button in their email client, but I have 2 questions: > > 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware > > 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 25 18:54:07 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 25 Jun 2024 22:54:07 +0000 Subject: eMail attachment: best practice? In-Reply-To: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> References: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> Message-ID: <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> The demo stack URL in the script does not look right. I have never used a URL in the form of SMTP://:587/ before. That can’t be right! Bob S > On Jun 25, 2024, at 3:15 PM, matthias rebbe via use-livecode wrote: > > Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. > > The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. > > Here you can find an sample stack > https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode > > And here is a link to a Livecode Lesson > https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external > > > >> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >> >> Under a specific condition, my app creates an email with some pre-populated information using revMail: >> >> revMail address, [ccAddress, [mailSubject, [messageBody]]] >> >> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >> >> I realize the user still has to click their send button in their email client, but I have 2 questions: >> >> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >> >> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 25 19:01:38 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 25 Jun 2024 23:01:38 +0000 Subject: eMail attachment: best practice? In-Reply-To: <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> References: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> Message-ID: <4CD699B4-9876-4C0A-867D-F8FB3A56C8CC@iotecdigital.com> I used a properly formatted “url” (it’s not actually a URL) for the server and got a response from the server, so I am communicating, but it’s generating an error even though the user name and password are correct (They are my credentials.) Also, considering that almost all servers are forcing the use of 2 factor or Multi-factor authentication these days, it’s probably just better to use the local mail client. Bob S > On Jun 25, 2024, at 3:53 PM, Bob Sneidar wrote: > > The demo stack URL in the script does not look right. I have never used a URL in the form of SMTP://:587/ before. That can’t be right! > > Bob S > > >> On Jun 25, 2024, at 3:15 PM, matthias rebbe via use-livecode wrote: >> >> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >> >> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >> >> Here you can find an sample stack >> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >> >> And here is a link to a Livecode Lesson >> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >> >> >> >>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>> >>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>> >>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>> >>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>> >>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>> >>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>> >>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > From paul at researchware.com Tue Jun 25 20:47:34 2024 From: paul at researchware.com (Paul Dupuis) Date: Tue, 25 Jun 2024 20:47:34 -0400 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: <53a5d8f8-d010-46c1-a702-ec3a65dfb183@researchware.com> I should have mentioned that my app is for macOS and Windows - no iOS or Android version. On 6/25/2024 5:46 PM, Mark Smith wrote: > Ive not used revMail but its certainly well documented in > mobileComposeHtmlMail. If you need an example PM me. > > Mark > > >> On 25 Jun 2024, at 9:35PM, Paul Dupuis via use-livecode >> wrote: >> >> 2) My more important question is how does one create an email with an >> attached file? I see no feature of revMail to include an attachment. >> Is there some other way? If there is no way to add an attachment, >> what might the best practice for sending the contents and structure >> of a Livecode array be? >> > From matthias_livecode_150811 at m-r-d.de Wed Jun 26 03:34:48 2024 From: matthias_livecode_150811 at m-r-d.de (Matthias Rebbe) Date: Wed, 26 Jun 2024 09:34:48 +0200 Subject: eMail attachment: best practice? In-Reply-To: <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> References: <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> Message-ID: <7394108E-089F-40F7-BD94-3B675130BF51@m-r-d.de> The url is right. The prefixes smtp:// smtps://, http:// https:// ftp:// ftps:// sftp:// and so tell the underlying tool which establish the connection to use that protocol. A trailing :587 means the connection should be established with port 587 If you are running for example a webserver on an other port than 80, e.g. 8080, you can would open use the following url in the web browser http://serverip:8080 Von meinem iPad gesendet > Am 26.06.2024 um 00:55 schrieb Bob Sneidar via use-livecode : > > The demo stack URL in the script does not look right. I have never used a URL in the form of SMTP://:587/ before. That can’t be right! > > Bob S > > >> On Jun 25, 2024, at 3:15 PM, matthias rebbe via use-livecode wrote: >> >> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >> >> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >> >> Here you can find an sample stack >> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >> >> And here is a link to a Livecode Lesson >> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >> >> >> >>>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>> >>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>> >>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>> >>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>> >>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>> >>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>> >>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Wed Jun 26 03:52:54 2024 From: matthias_livecode_150811 at m-r-d.de (Matthias Rebbe) Date: Wed, 26 Jun 2024 09:52:54 +0200 Subject: eMail attachment: best practice? In-Reply-To: <4CD699B4-9876-4C0A-867D-F8FB3A56C8CC@iotecdigital.com> References: <4CD699B4-9876-4C0A-867D-F8FB3A56C8CC@iotecdigital.com> Message-ID: I am not sure how many smtp servers support 2FA yet. If the mail client can connect to a mailserver then tsNET should also be able to. tsNET external uses a curl library. And if 2FA for SMTP gets more common, I am sure tsNet will be updated to support it. I am using tsNET in several projects for sending e-mails with logfiles and reports. This works w/o problems. Von meinem iPad gesendet > Am 26.06.2024 um 01:02 schrieb Bob Sneidar via use-livecode : > > I used a properly formatted “url” (it’s not actually a URL) for the server and got a response from the server, so I am communicating, but it’s generating an error even though the user name and password are correct (They are my credentials.) > > Also, considering that almost all servers are forcing the use of 2 factor or Multi-factor authentication these days, it’s probably just better to use the local mail client. > > Bob S > > >> On Jun 25, 2024, at 3:53 PM, Bob Sneidar wrote: >> >> The demo stack URL in the script does not look right. I have never used a URL in the form of SMTP://:587/ before. That can’t be right! >> >> Bob S >> >> >>>> On Jun 25, 2024, at 3:15 PM, matthias rebbe via use-livecode wrote: >>> >>> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >>> >>> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >>> >>> Here you can find an sample stack >>> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >>> >>> And here is a link to a Livecode Lesson >>> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >>> >>> >>> >>>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>>> >>>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>>> >>>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>>> >>>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>>> >>>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>>> >>>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>>> >>>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>>> >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Wed Jun 26 04:35:36 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 26 Jun 2024 18:35:36 +1000 Subject: Slow stack problem Message-ID: <109F54DF-1737-4C08-B6F7-694859F92D98@optusnet.com.au> I am plagued by a new problem which has arisen in an old stack that I have been using for years with hundreds of modifications over that time. It was still working well until suddenly in the last few week most of its data processing handlers have slowed to a crawl. A button that gathers text data from a number cards, does some text manipulations and then displays a modal dialog, that used to be instantaneous now takes 30 seconds to display the dialog. Another button which does extensive text gathering and processing now takes 30 minutes instead of 30 seconds. So I have done something to the data stack in the last few months. It is not a change of LC version or platform OS. A standalone I produced a couple of months ago does not display this slow behaviour when working on its old version of the data stack, but does show it when I apply it to the latest version of the data stack. But I am at loss to figure out what setting I might have changed or what else I could have done. I did not change the scripts of the offending buttons since the previous version, so it sounds like a setting change. The stack behaves as if the processing buttons have difficulty finding all the necessary handlers, or as if it is it reporting in to Shanghai or Virginia between handler calls. I don’t believe the stack is actually corrupted, actions such as scrolling fields or moving between cards all work as normal. The only other piece of information is that the CPU ramps up to 100% use in one core , so it is doing something - but what? (Memory usage goes up to 500MB but does not keep climbing, unlikely to be a memory leak or virtual memory swapping (hmmm?)) I have tried to compare the differences between the old and new version of the stacks as files using BBEdit, but most differences seem to be in binary data at the end of the files, whose meaning is opaque. Any ideas as to what might be causing this, or how I might go about diagnosis, would be hugely welcome. Neville Smytis From paul at researchware.com Wed Jun 26 09:00:00 2024 From: paul at researchware.com (Paul Dupuis) Date: Wed, 26 Jun 2024 09:00:00 -0400 Subject: eMail attachment: best practice? In-Reply-To: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> References: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> Message-ID: So this tsNet example for sending an email look great IF you are using it in an corporate or institutional setting. One where you have a known SMTP server and you know whether or not that SMTP server requires authentication. However, in the "wild" of a distributed application that could be on any customer's computer in any setting, how do you know what the customer's SMTP server is or whether it requires authentication. If it does require authentication, most people set this up in their email client ONCE (or rarely) and may not know or remember what the credentials are. So I considered using our company SMTP server, but increasingly, SMTP servers will reject messages if they are from a client computer that is not in the same domain, as is the case with ours (for anti-spamming/spoofing), so that it out as an option. I kinda need a solution that uses the clients own email client (and server). Maybe I should look at how to encode the array in a pure text form that can be part of the email body and send it that way. The problem there is that some email clients (like gMail) limit the size of the message body that can be generated from their APIs. If you use revMail with someone with gMail as their default mail, the message body can only be about 2500 characters (or maybe 5000, I forget the exact limit). I suppose I could output the array as an encoded file to the customer's desktop and ASK them to manually attach it to the generated email? I wish there was a better option. On 6/25/2024 6:15 PM, matthias rebbe via use-livecode wrote: > Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. > > The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. > > Here you can find an sample stack > https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode > > And here is a link to a Livecode Lesson > https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external > > > >> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >> >> Under a specific condition, my app creates an email with some pre-populated information using revMail: >> >> revMail address, [ccAddress, [mailSubject, [messageBody]]] >> >> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >> >> I realize the user still has to click their send button in their email client, but I have 2 questions: >> >> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >> >> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Wed Jun 26 09:33:13 2024 From: craig at starfirelighting.com (Craig Newman) Date: Wed, 26 Jun 2024 09:33:13 -0400 Subject: Slow stack problem In-Reply-To: <109F54DF-1737-4C08-B6F7-694859F92D98@optusnet.com.au> References: <109F54DF-1737-4C08-B6F7-694859F92D98@optusnet.com.au> Message-ID: <90311837-7AEF-41A7-9284-2B81154FE80A@starfirelighting.com> Have you tried trashing the LC preferences? Have you tried the recent stack with a different data stack, or perhaps one with less data? Craig > On Jun 26, 2024, at 4:35 AM, Neville Smythe via use-livecode wrote: > > I am plagued by a new problem which has arisen in an old stack that I have been using for years with hundreds of modifications over that time. It was still working well until suddenly in the last few week most of its data processing handlers have slowed to a crawl. A button that gathers text data from a number cards, does some text manipulations and then displays a modal dialog, that used to be instantaneous now takes 30 seconds to display the dialog. Another button which does extensive text gathering and processing now takes 30 minutes instead of 30 seconds. > > So I have done something to the data stack in the last few months. It is not a change of LC version or platform OS. A standalone I produced a couple of months ago does not display this slow behaviour when working on its old version of the data stack, but does show it when I apply it to the latest version of the data stack. > > But I am at loss to figure out what setting I might have changed or what else I could have done. I did not change the scripts of the offending buttons since the previous version, so it sounds like a setting change. The stack behaves as if the processing buttons have difficulty finding all the necessary handlers, or as if it is it reporting in to Shanghai or Virginia between handler calls. I don’t believe the stack is actually corrupted, actions such as scrolling fields or moving between cards all work as normal. The only other piece of information is that the CPU ramps up to 100% use in one core , so it is doing something - but what? (Memory usage goes up to 500MB but does not keep climbing, unlikely to be a memory leak or virtual memory swapping (hmmm?)) > > I have tried to compare the differences between the old and new version of the stacks as files using BBEdit, but most differences seem to be in binary data at the end of the files, whose meaning is opaque. > > Any ideas as to what might be causing this, or how I might go about diagnosis, would be hugely welcome. > > > Neville Smytis > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 26 11:18:00 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 26 Jun 2024 15:18:00 +0000 Subject: eMail attachment: best practice? In-Reply-To: References: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> Message-ID: <7F91DB47-7D17-4CF6-ADB3-6E420B375E0E@iotecdigital.com> You would need to present the user with an interface where they can enter their corporate or business SMTP information, then use that. But more mail providers are forcing MFA these days (as I mentioned) and Microsoft has even gone so far as to completely disable ALL SMTP relaying when Modern Security is enabled, and are progressively enforcing Modern Security permanently. Mail Clients that communicate with Office365 do not use SMTP, they use MAPI so they are not effected. The only thing I can suggest is to subscribe to a web based SMTP relay. Bundle the cost of that (which isn’t very much) into the price of your product. Bob S > On Jun 26, 2024, at 6:00 AM, Paul Dupuis via use-livecode wrote: > > So this tsNet example for sending an email look great IF you are using it in an corporate or institutional setting. One where you have a known SMTP server and you know whether or not that SMTP server requires authentication. > > However, in the "wild" of a distributed application that could be on any customer's computer in any setting, how do you know what the customer's SMTP server is or whether it requires authentication. If it does require authentication, most people set this up in their email client ONCE (or rarely) and may not know or remember what the credentials are. > > So I considered using our company SMTP server, but increasingly, SMTP servers will reject messages if they are from a client computer that is not in the same domain, as is the case with ours (for anti-spamming/spoofing), so that it out as an option. > > I kinda need a solution that uses the clients own email client (and server). Maybe I should look at how to encode the array in a pure text form that can be part of the email body and send it that way. The problem there is that some email clients (like gMail) limit the size of the message body that can be generated from their APIs. If you use revMail with someone with gMail as their default mail, the message body can only be about 2500 characters (or maybe 5000, I forget the exact limit). > > I suppose I could output the array as an encoded file to the customer's desktop and ASK them to manually attach it to the generated email? I wish there was a better option. > > > On 6/25/2024 6:15 PM, matthias rebbe via use-livecode wrote: >> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >> >> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >> >> Here you can find an sample stack >> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >> >> And here is a link to a Livecode Lesson >> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >> >> >> >>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>> >>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>> >>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>> >>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>> >>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>> >>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>> >>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Wed Jun 26 17:25:09 2024 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Wed, 26 Jun 2024 23:25:09 +0200 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: Von meinem iPad gesendet > Am 26.06.2024 um 15:01 schrieb Paul Dupuis via use-livecode : > > So this tsNet example for sending an email look great IF you are using it in an corporate or institutional setting. One where you have a known SMTP server and you know whether or not that SMTP server requires authentication. > However, in the "wild" of a distributed application that could be on any customer's computer in any setting, how do you know what the customer's SMTP server is or whether it requires authentication. If it does require authentication, most people set Your app needs to have a card or substack where the customers can add their mail account login data and the server ip or name and all the other information they would enter when adding an email account to their e-mail client. > this up in their email client ONCE (or rarely) and may not know or remember what the credentials are. > Those people would also run into trouble if they switch to another e-mail client or if they get a new computer where they have to setup the e-mail client again. This is not an email problem per se, but rather the problem that users are not doing proper password management. > So I considered using our company SMTP server, but increasingly, SMTP servers will reject messages if they are from a client computer that is not in the same domain, as is the case with ours (for anti-spamming/spoofing), so that it out as an option. > What exactly did you want to do? Use the server to send e-mails to internal accounts on that server? Or did you want to use that server as a relay server to send emails to external e-mail addresses? To do that you normally need an e-mail account on that server and your account needs to have the right to send external e-mails and you need to have to authenticate on that server when sending the e-mails to external users. > I kinda need a solution that uses the clients own email client (and server). tsNet behaves like an e-mail client. If the customer now there e-mail credentials and other information for setting up an e-mail client and if your app allows to enter those information, then tsNet will work without a problem. Maybe with one exception. If the server only allows 2FA for the e-mail clients, then tsNet needs to support this. Maybe this is already the case, maybe not. This is a question Charles Warwick or Livecode Support could answer > Maybe I should look at how to encode the array in a pure text form that can be part of the email body and send it that way. The problem there is that some email clients (like gMail) limit the size of the message body that can be generated from their APIs. If you use revMail with someone with gMail as their default mail, the message body can only be about 2500 characters (or maybe 5000, I forget the exact limit). > > I suppose I could output the array as an encoded file to the customer's desktop and ASK them to manually attach it to the generated email? I wish there was a better option. > > >> On 6/25/2024 6:15 PM, matthias rebbe via use-livecode wrote: >> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >> >> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >> >> Here you can find an sample stack >> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >> >> And here is a link to a Livecode Lesson >> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >> >> >> >>>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>> >>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>> >>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>> >>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>> >>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>> >>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>> >>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Wed Jun 26 20:48:25 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 27 Jun 2024 00:48:25 +0000 Subject: eMail attachment: best practice? Message-ID: <89b57739bf8f6ce14727beb9102827fadaa989fb@fourthworld.com> I wouldn't make anyone fill out anything. I'd just present a window for them to review, and POST it to my web site. The receiving CGI can do whatever I need. If the diagnostic info is for a support issue, you may be able to use your support tracking DB's API to automate creating the ticket. Richard Gaskin FourthWorld.com From matthias_livecode_150811 at m-r-d.de Thu Jun 27 03:51:13 2024 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Thu, 27 Jun 2024 09:51:13 +0200 Subject: eMail attachment: best practice? In-Reply-To: <89b57739bf8f6ce14727beb9102827fadaa989fb@fourthworld.com> References: <89b57739bf8f6ce14727beb9102827fadaa989fb@fourthworld.com> Message-ID: <80A31E9E-F4E2-464F-A10F-A45E59BDE472@m-r-d.de> > Am 27.06.2024 um 02:48 schrieb Richard Gaskin via use-livecode : > > I wouldn't make anyone fill out anything. I'd just present a window for them to review, and POST it to my web site. The receiving CGI can do whatever I need. > I would say this always depends on the purpose the app is supposed to fulfill. In my private projects I am using quite often Livecode Server as the backend for my LC apps, but I had some customer projects in the past where the customer wanted an app to send out e-mails with special attachments, like logfiles or reports or what ever and it had to be without user interaction. In the days before tsNET I either used Shao Sean's e-mail library, Chip Walter's altEmailHarness or I called command line tools using shell function to get this done. > If the diagnostic info is for a support issue, you may be able to use your support tracking DB's API to automate creating the ticket. > > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Thu Jun 27 08:10:49 2024 From: mkoob at rogers.com (Martin Koob) Date: Thu, 27 Jun 2024 08:10:49 -0400 Subject: =?utf-8?Q?Planning_upgrade_to_Mac_OS_Sonoma_14=2E5_=E2=80=93_any_?= =?utf-8?Q?issues_with_LiveCode_9=2E6=2E12_or_LC_10_Create=3F?= References: <8864688D-5F26-43F9-BB7B-77B5EEC2C752.ref@rogers.com> Message-ID: <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> Hi all I am always a laggard when it comes to doing system upgrades. Long ago traumas still linger I guess. Anyway, it is usually between the Apple Developer Conference iatn the beginning of summer and the release of the new OS version in the fall when I get enough courage to go for it and upgrade to the current macOS. So, as the subject said are there any issues with LiveCode 9.6.12 or LC 10 Create that should give me pause or should I take the plunge? Martin Koob From MikeKerner at roadrunner.com Thu Jun 27 10:42:35 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Thu, 27 Jun 2024 10:42:35 -0400 Subject: =?UTF-8?Q?Re=3A_Planning_upgrade_to_Mac_OS_Sonoma_14=2E5_=E2=80=93_any_i?= =?UTF-8?Q?ssues_with_LiveCode_9=2E6=2E12_or_LC_10_Create=3F?= In-Reply-To: <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> References: <8864688D-5F26-43F9-BB7B-77B5EEC2C752.ref@rogers.com> <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> Message-ID: still sitting on ventura. usually LC is the reason why i hold off on updating macOS, but i'm not sure what is compelling about sonoma, anyway. On Thu, Jun 27, 2024 at 8:12 AM Martin Koob via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi all > > I am always a laggard when it comes to doing system upgrades. Long ago > traumas still linger I guess. Anyway, it is usually between the Apple > Developer Conference iatn the beginning of summer and the release of the > new OS version in the fall when I get enough courage to go for it and > upgrade to the current macOS. > > So, as the subject said are there any issues with LiveCode 9.6.12 or LC 10 > Create that should give me pause or should I take the plunge? > > Martin Koob > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From bobsneidar at iotecdigital.com Thu Jun 27 11:21:01 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 27 Jun 2024 15:21:01 +0000 Subject: =?utf-8?B?UmU6IFBsYW5uaW5nIHVwZ3JhZGUgdG8gTWFjIE9TIFNvbm9tYSAxNC41IA==?= =?utf-8?B?4oCTIGFueSBpc3N1ZXMgd2l0aCBMaXZlQ29kZSA5LjYuMTIgb3IgTEMgMTAg?= =?utf-8?Q?Create=3F?= In-Reply-To: <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> References: <8864688D-5F26-43F9-BB7B-77B5EEC2C752.ref@rogers.com> <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> Message-ID: <8E57466A-FC2C-4FFA-A39E-834D1958B7FB@iotecdigital.com> I think your instincts are correct. While letting your OS lag behind by 2 or more major versions is probably a bad practice, I don’t see any reason to just automatically update everytime it’s offered. But eventually Microsoft or Apple will make it, “compelling” as Mike Kerner put it. Bob S > On Jun 27, 2024, at 5:10 AM, Martin Koob via use-livecode wrote: > > Hi all > > I am always a laggard when it comes to doing system upgrades. Long ago traumas still linger I guess. Anyway, it is usually between the Apple Developer Conference iatn the beginning of summer and the release of the new OS version in the fall when I get enough courage to go for it and upgrade to the current macOS. > > So, as the subject said are there any issues with LiveCode 9.6.12 or LC 10 Create that should give me pause or should I take the plunge? > > Martin Koob From ambassador at fourthworld.com Thu Jun 27 15:54:32 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 27 Jun 2024 19:54:32 +0000 Subject: eMail attachment: best practice? Message-ID: <883a2c8680e09e8bfc98846b999646f8279ba9c0@fourthworld.com> Matthias wrote: > Am 27.06.2024 um 02:48 schrieb Richard Gaskin>: >> I wouldn't make anyone fill out anything. I'd just present >> a window for them to review, and POST it to my web site. >> The receiving CGI can do whatever I need. > > I would say this always depends on the purpose the app is > supposed to fulfill. Every good app does. :) > In my private projects I am using quite often Livecode Server > as the backend for my LC apps, but I had some customer projects > in the past where the customer wanted an app to send out e-mails > with special attachments, like logfiles or reports or whatever > and it had to be without user interaction. I think we're on the same page. I tend to prefer open disclosure for users to review data before sending from their local machine to a server, but it's not functionally necessary. Most apps don't bother, and of course a POST command can be sent without any user interaction. > In the days before tsNET I either used Shao Sean's e-mail > library, Chip Walter's altEmailHarness or I called command > line tools using shell function to get this done. If the final reciever *needs* to be an email client, nearly any method will require a mime wrapper for the payload. The nice thing about doing that for sendmail on the server, rather than for whatever the user uses for email on the client, is we don't know what the user is using. Things can get tricky with all the possible options one might discover a need to support (native email apps, webmail like GMail or Nextcloud, gawdonlyknows what special handling may be needed for monsters like Office 365, etc.). Sendmail gives us one one well-documented compatibility target to build for and test against. And it's already available; I don't need to set up half a dozen client email options just to get started. But the other benefit with POSTing to the server is you can change your mind easily about how you want to handle it. Maybe today the reciever is a support person's email In Box, but if so that's really an intermediary place, where the final destination will be some form of issue tracking DB. So one can go ahead and use sendmail to get the info to support in email today, and later revise the CGI handler to post directly into the issue tracker DB API, saving the payroll cost and error rate that comes with rote human intermediation. Another consideration is trust, esp. when the method used requires users to enter their server credentials. With a simple POST, no interaction is needed, no information the app doesn't already have in the course of normal use is obtained. The situation is trustless, in the sense of trust not being a requirement to proceed. The moment any app asks me for any server credentiails, I need to stop and consider the implications. If the app is my email client, of course I expect that, and I only use email clients I already trust. With anything else I'm going to think it through carefully, and probably contact the vendor to seek a different method, if I bother continuing using the product at all. Imagine if you went to a web site and the Contact form required your server creds. Would you hand those over? Do your users know you intimately enough to have complete confidence they can give you the keys to their kingdom in an app form? I can imagine maybe some enterprise environments where that level of trust *might* be available. But the same security awareness that makes the environment trustable probably wouldn't ask for server credentials. Good IT staff regard all networks as hostile, even LAN. In short: - POST requires no more work for mime-wrapping the payload than client email; - sendmail on the server is a simpler target than all possible email clints; - can have a UI or not, as desired; - leaves the door open for easy re-routing later on if needed; - requires no trust from the user beyond what they might expect with any web form. -- Richard Gaskin FourthWorld.com From neville.smythe at optusnet.com.au Thu Jun 27 23:01:35 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 28 Jun 2024 13:01:35 +1000 Subject: Slow stack problem Message-ID: <69BDAEB4-249D-45DF-B1FB-9E72D3E2E79E@optusnet.com.au> Thank Craig for your suggestion about replacing the Preferences file. No luck. I am down to going through line by line to find what process is taking so much time. I am now totally confused by finding that a handler which calls no handlers of mine, and simply has a repeat loop over just 32 short lines of text on each of which it does a matchChunk … takes 20 seconds! repeat with i=2 to the number of lines of indexList put line (i+1) of indexList into which put "(^[0-9-]*\t" & which & ")" into regX put false into found repeat with k=lastFound+1 to the number of lines of fff put matchChunk(line k of fff,regX,pos1,pos2) into found if found then exit repeat end repeat if found then put k into lastFound end if put lastFound into item i of mylineNumbers end repeat The same handler, same code, in a previous version of the offending stack, takes 0.06 seconds, both in the current 9.6.12 IDE, and using a standalone compiled under a previous LC version. I don’t understand how any of my code anywhere else in the stacks in use could affect the performance of an LC built-in matchChunk, which itself does not appear to have changed between versions (I certainly don’t redeclare matchChunk anywhere). I must be missing something. Neville Smythe From curry at pair.com Thu Jun 27 23:07:13 2024 From: curry at pair.com (Curry Kenworthy) Date: Thu, 27 Jun 2024 23:07:13 -0400 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: Paul: > I wish there was a better option. in your case - simply upload the file. Best wishes, Curry Kenworthy Radically Innovative Christian LiveCode Development "PASSION for Elegant, Efficient Code!" https://livecodeconsulting.com/ From ambassador at fourthworld.com Thu Jun 27 23:22:14 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Fri, 28 Jun 2024 03:22:14 +0000 Subject: Slow stack problem Message-ID: <8343def36fe8b64890c9145c025ecc97f7240619@fourthworld.com> Neville Smythe wrote: > The same handler, same code, in a previous version of the > offending stack, takes 0.06 seconds, both in the current > 9.6.12 IDE, and using a standalone compiled under a > previous LC version. In your previous message yesterday you wrote: > So I have done something to the data stack in the last > few months. It is not a change of LC version or platform > OS. A standalone I produced a couple of months ago does > not display this slow behaviour when working on its old > version of the data stack, but does show it when I apply > it to the latest version of the data stack. If the code hasn't changed but the data has, you've narrowed it down. What is in the data stack? Where does the data come from, and when/how does the data stack get updated with new data? -- Richard Gaskin FourthWorld.com From neville.smythe at optusnet.com.au Fri Jun 28 06:15:53 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 28 Jun 2024 20:15:53 +1000 Subject: Slow stack problem Message-ID: <548217AD-2894-465E-B903-8DC47FAA4C88@optusnet.com.au> In my last epistle I mentioned the repeat loop had only 32 iterations. Much more relevant of course is the inner loop on the number of lines of the data variable fff. In this case fff had 1760 lines. So the total possible number of iterations was around 30000 to 50000, getting up there but still well within LC capability. I tried operating the loop on just the first 100 lines of fff. The repeats took 0.006 seconds (impressive). Then just the first 300 lines. Timing was 0.016 seconds, approximately linear increase as expected Then the first 500 lines. Timing is now 6.43 seconds. Something very odd there, that’s beyond exponential increase. And on the last 500 lines, timing was 0.135 seconds (Aha !!!) This would seem to point to matchChunk having indigestion over something in the middle of the text data. The data is 98% plain ascii, but quite likely it has a few Unicode characters: I have taken a whole lot of time to convert my legacy app to accept Asian and European Unicode personal names. Gives me something to work on. If I am right, it points to either a bug or a severe limitation in matchChunk if it cannot work with Unicode. And lo… Put textEncode(fff,”ascii”) into fff And now the whole 1760 lines take 0.073 seconds to complete. I have a solution or at least a workaround, and LC has an impending bug report [does anyone know if the latest versions of regexp searches have a performance problem with Unicode in other implementations?]. Neville Smythe From mark at livecode.com Fri Jun 28 08:02:13 2024 From: mark at livecode.com (Mark Waddingham) Date: Fri, 28 Jun 2024 13:02:13 +0100 Subject: Slow stack problem In-Reply-To: <548217AD-2894-465E-B903-8DC47FAA4C88@optusnet.com.au> References: <548217AD-2894-465E-B903-8DC47FAA4C88@optusnet.com.au> Message-ID: <4e66b24cff57606b2d3abd891d3dd0d7@livecode.com> On 2024-06-28 11:15, Neville Smythe via use-livecode wrote: > In my last epistle I mentioned the repeat loop had only 32 iterations. > Much more relevant of course is the inner loop on the number of lines > of the data variable fff. In this case fff had 1760 lines. So the total > possible number of iterations was around 30000 to 50000, getting up > there but still well within LC capability. > > I tried operating the loop on just the first 100 lines of fff. The > repeats took 0.006 seconds (impressive). > > Then just the first 300 lines. Timing was 0.016 seconds, approximately > linear increase as expected Are you sure a linear increase is expected? > Then the first 500 lines. Timing is now 6.43 seconds. Something very > odd there, thats beyond exponential increase. > > And on the last 500 lines, timing was 0.135 seconds (Aha !!!) I take it you tested this by doing the loop where fff was just line 1 to 300, then just line 1 to 500 and then just -500 to -1? My guess here is that the first 300 lines do not have a unicode character, there is somewhere in the next 200, and there are none in the last 500. > This would seem to point to matchChunk having indigestion over > something in the middle of the text data. The data is 98% plain ascii, > but quite likely it has a few Unicode characters: I have taken a whole > lot of time to convert my legacy app to accept Asian and European > Unicode personal names. All regex matches in LC are Unicode (under the hood) - so thinking this is regex related is a red-herring. Running a regex on Unicode text, is no different from on native text - its just its dealing with 16-bit units rather than 8-bit (regex is generally a linear operation - it takes time proportional, roughly to length of pattern * length of string - well, as long as you don't use any backtracking type features). The issue here is the assumption that your code is doing something linear... It *looks* linear because your code is only doing two nested repeat loops - so from the point of view of lines of script its iterating the central loop roughly 'the number of lines of indexList * the number of lines of fff' - however the engine is doing a lot more work. The central loop is doing (paraphrased); repeat with x = 1 to N get line x of jjj end repeat This means the engine is searching for a line delimiter not N times, but sum(1, ..., N) times (which is N*(N-1)/2 - i.e. N^2 roughly). Processing 300 lines will take the engine about 45000 steps, processing 500 lines will take the engine 125000 steps, processing 1760 lines will take the engine > 1,500,000. This means that a small change in how long it takes to search for a line delimiter (which is the fundamental operation here) makes a big difference to how long doing 1000's of them will take - and searching a string containing unicode is a fair bit slower than searching a string which contains only native characters. Fortunately there is an easy solution here - use an array so you get random access to the lines of fff: split fff by return repeat with i=2 to the number of lines of indexList put line (i+1) of indexList into which put "(^[0-9-]*\t" & which & ")" into regX put false into found repeat with k=lastFound+1 to the number of elements of fff put matchChunk(fff[k],regX,pos1,pos2) into found if found then exit repeat end repeat if found then put k into lastFound end if put lastFound into item i of mylineNumbers end repeat This should do exactly the same thing but SUBSTANTIALLY faster whether your fff variable contains native or unicode characters. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Build Amazing Things From bobsneidar at iotecdigital.com Fri Jun 28 11:23:08 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 28 Jun 2024 15:23:08 +0000 Subject: Slow stack problem In-Reply-To: <4e66b24cff57606b2d3abd891d3dd0d7@livecode.com> References: <548217AD-2894-465E-B903-8DC47FAA4C88@optusnet.com.au> <4e66b24cff57606b2d3abd891d3dd0d7@livecode.com> Message-ID: <6BD625A2-F8D1-4B35-87E5-2C34ED013EF1@iotecdigital.com> I love using red herring in conversations. Most people don’t know what that is, so they can’t contradict me! :-) Bob S On Jun 28, 2024, at 5:02 AM, Mark Waddingham via use-livecode wrote: so thinking this is regex related is a red-herring. From bobsneidar at iotecdigital.com Fri Jun 28 12:44:24 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 28 Jun 2024 16:44:24 +0000 Subject: Socket Packaging In-Reply-To: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> References: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> Message-ID: <2D093B01-C351-4AA7-B2F3-AE44CDC3503E@iotecdigital.com> Added error checking. Also the payload can now be a string or an array. command packagePayload @pPayload, pUseEncryption try if pPayload is an array then \ put arrayEncode(pPayload) into pPayload if pUseEncryption then \ put slyEncrypt(pPayload) into pPayload put base64Encode(pPayload) into pPayload catch tError return "ERROR:" && tError end try end packagePayload command unpackPayload @pPayload, pUseEncryption try put base64Decode(pPayload) into pPayload if pUseEncryption is true or pPayload begins with "salted" then \ put slyDecrypt(pPayload) into pPayload if pPayload is an array then \ put arrayDecode(pPayload) into pPayload catch tError return "ERROR:" && tError end try end unpackPayload Bob S > On Jun 24, 2024, at 9:21 AM, Bob Sneidar wrote: > > Hi all. > > I came up with deceptively simple wrappers for packaging data for transmission over raw sockets. I can’t send the slyEncrypt and slyDecrypt handlers because I use methods no one else knows. But you can roll your own or else eliminate encryption altogether. > > And to answer the question befor it’s asked, I don’t use SSL because I don’t like having to deal with certificates, and also because I use a method for encryption that I don’t think anyone else has thought of, or at least I can’t find any info online. > > Bob S > > command packagePayload @pPayload, pUseEncryption > if pPayload is an array then \ > put arrayEncode(pPayload) into pPayload > > if pUseEncryption then \ > put slyEncrypt(pPayload) into pPayload > > put base64Encode(pPayload) into pPayload > end packagePayload > > command unpackPayload @pPayload > put base64Decode(pPayload) into pPayload > > if pPayload begins with "salted" then \ > put slyDecrypt(pPayload) into pPayload > > try > put arrayDecode(pPayload) into tResult > put tResult into pPayload > catch tError > -- not an array > end try > end unpackPayload > From admin at flexiblelearning.com Fri Jun 28 13:04:09 2024 From: admin at flexiblelearning.com (Hugh Senior) Date: Fri, 28 Jun 2024 18:04:09 +0100 Subject: url no longer working as expected In-Reply-To: References: Message-ID: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> Platform: Windows 11, LC 9.6.12 Query: Using URL to access a web page Problem: Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web browser and the page is displayed as expected. Use LC's URL command to access the same page direct returns a 404 put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" Anyone got any insights? Hugh Senior From bobsneidar at iotecdigital.com Fri Jun 28 13:07:55 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 28 Jun 2024 17:07:55 +0000 Subject: url no longer working as expected In-Reply-To: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> References: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> Message-ID: <7CFEFE88-133D-48B6-9E28-3728C5A7AB37@iotecdigital.com> I get the HTML of the page. Are you trying to open the page in a browser? Bob S > On Jun 28, 2024, at 10:04 AM, Hugh Senior via use-livecode wrote: > > > Platform: Windows 11, LC 9.6.12 > Query: Using URL to access a web page > > Problem: > Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web > browser and the page is displayed as expected. > > Use LC's URL command to access the same page direct returns a 404 > put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" > > Anyone got any insights? > > Hugh Senior > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Fri Jun 28 13:50:35 2024 From: paul at researchware.com (Paul Dupuis) Date: Fri, 28 Jun 2024 13:50:35 -0400 Subject: url no longer working as expected In-Reply-To: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> References: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> Message-ID: <499fc022-eafb-49dd-96df-1dcd18afb8fb@researchware.com> I get a response from Yahoos that is an html page with a 404 information as part of it. This happens under LC 9.6.12 and 9.6.11 I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: > Platform: Windows 11, LC 9.6.12 > Query: Using URL to access a web page > > Problem: > Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web > browser and the page is displayed as expected. > > Use LC's URL command to access the same page direct returns a 404 > put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" > > Anyone got any insights? > > Hugh Senior > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Fri Jun 28 14:03:28 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 28 Jun 2024 18:03:28 +0000 Subject: url no longer working as expected In-Reply-To: <499fc022-eafb-49dd-96df-1dcd18afb8fb@researchware.com> References: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> <499fc022-eafb-49dd-96df-1dcd18afb8fb@researchware.com> Message-ID: Did you try that in the message box? Bob S > On Jun 28, 2024, at 10:50 AM, Paul Dupuis via use-livecode wrote: > > I get a response from Yahoos that is an html page with a 404 information as part of it. > > This happens under LC 9.6.12 and 9.6.11 > > I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. > > > On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >> Platform: Windows 11, LC 9.6.12 >> Query: Using URL to access a web page >> >> Problem: >> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >> browser and the page is displayed as expected. >> >> Use LC's URL command to access the same page direct returns a 404 >> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >> >> Anyone got any insights? >> >> Hugh Senior >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Fri Jun 28 14:23:35 2024 From: paul at researchware.com (Paul Dupuis) Date: Fri, 28 Jun 2024 14:23:35 -0400 Subject: url no longer working as expected In-Reply-To: References: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> <499fc022-eafb-49dd-96df-1dcd18afb8fb@researchware.com> Message-ID: <30ffa56e-1cc0-4f83-9590-e1525a14e613@researchware.com> Yes. put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" In the message box on 9.6.11 and 9.6.12 under Windows 11. Both return a pile of HTML text that is all the formatting and CSS linked stuff to show a "404" page. This suggests that put URL is working and it is the Yahoo server that returning a different page of HTML/CSS for the put vs when you enter the URL in a browser (Firefox in my case, where I get the Yahoo finance data for Shell, although I did have to respond to a Cookies dialog first). On 6/28/2024 2:03 PM, Bob Sneidar via use-livecode wrote: > Did you try that in the message box? > > Bob S > > >> On Jun 28, 2024, at 10:50 AM, Paul Dupuis via use-livecode wrote: >> >> I get a response from Yahoos that is an html page with a 404 information as part of it. >> >> This happens under LC 9.6.12 and 9.6.11 >> >> I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. >> >> >> On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >>> Platform: Windows 11, LC 9.6.12 >>> Query: Using URL to access a web page >>> >>> Problem: >>> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >>> browser and the page is displayed as expected. >>> >>> Use LC's URL command to access the same page direct returns a 404 >>> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >>> >>> Anyone got any insights? >>> >>> Hugh Senior >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Fri Jun 28 14:59:34 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Fri, 28 Jun 2024 18:59:34 +0000 Subject: url no longer working as expected Message-ID: Likely the case. The expense of collating all that data and presenting it to their site visitors is considerable. They use advertising to cover those costs. If the data were easily scrapable, scrapers diminish revenue, putting the resource itself at risk. Some data provides offer APIs. When you see anti-scraping effects, look for API options (I saw none there but I didn't look deeply). APIs take fewer resources to deliver, and may have strategic benefit for some data brokers. But if they have scrape-prevention and no API, they're sending a clear signal: "We need to pay our bills, please send your traffic to our page so we can do that." That said, I've come across stock APIs before, and while I don't recall many free ones there likely are some. Richard Gaskin FourthWorld.com Paul Dupuis wrote: > I get a response from Yahoos that is an html page with a 404 > information as part of it. ... > I think this is Yahoo Finance not being able to detect the > browser type and intentionally returning a 404 as a method > of deterring screen scraping. > > On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: ... >> Problem: >> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into >> any web browser and the page is displayed as expected. >> >> Use LC's URL command to access the same page direct returns a >> 404 >> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >> >> Anyone got any insights? From neville.smythe at optusnet.com.au Sat Jun 29 03:53:58 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Sat, 29 Jun 2024 17:53:58 +1000 Subject: Slow stack problem Message-ID: <76E596CE-7A40-4060-8A40-A9BD9DC0FFA8@optusnet.com.au> Thanks Mark for pointing me (as ever) in the right direction, away from the red herring but to the hidden inner loop entailed in evaluating line k of fff A bit embarrassing because I was party to the discussion some time ago about the slowness of lineOffset when working with unicode text. And thanks for the neat array trick which I wouldn’t have thought of. There is indeed just one line in the text which contains a single Unicode character. Without that character evidently the variable fff would internally be an ascii (or native?) string, but otherwise is entirely utf16 and we hit the LineOffset problem. But I am still bemused. Is it not the case that the processing time for looping over the number of lines and getting the k-th line in each iteration, for some arbitrary k, going to be Order(N^2) * C * T where N = the number of lines in the text C = the number of codepoints in each line T = the (average) time for processing each codepoint to check for a return character Now N and C are the same whether the text is ascii or unicode Test 1 If I get rid of the red herring by replacing the matchChunk call with a simple put line k of fff into x; put true into found — as if matchChunk always finds a match on the first line tested so that I am timing just the getting of lines endings: The time for processing plain ascii is. 0.008 seconds The time for processing unicode is. 0.84 seconds Which would appear to mean that processing unicode codepoints for the apparently simple task of checking for return takes 100 times as much time as processing ascii. That seems excessive, to put it mildly! Test 2 With the original code using matchChunk, which of course is going to have its own internal loop on code points so multiply by another 8 (it only searches the first few characters) and will not always return true so more lines must be processed — but again these are same multipliers whether ascii or unicode Plain ascii takes 0.07 seconds Unicode takes 19.9 seconds, a multiplier of nearly 300. — I can easily believe matchChunk takes 3 times as long to process unicode as ascii, this is the sort of factor I would have expected in Test 1. OK Mark, hit me again, I am a glutton for punishment, what is wrong with this analysis? Neville Smythe From mark at livecode.com Sat Jun 29 05:27:19 2024 From: mark at livecode.com (Mark Waddingham) Date: Sat, 29 Jun 2024 10:27:19 +0100 Subject: Slow stack problem In-Reply-To: <76E596CE-7A40-4060-8A40-A9BD9DC0FFA8@optusnet.com.au> References: <76E596CE-7A40-4060-8A40-A9BD9DC0FFA8@optusnet.com.au> Message-ID: <0aa021b2188068c191e11ba49db857cc@livecode.com> On 2024-06-29 08:53, Neville Smythe via use-livecode wrote: > Is it not the case that the processing time for looping over the number > of lines and getting the k-th line in each iteration, for some > arbitrary k, going to be > > Order(N^2) * C * T > > where > > N = the number of lines in the text > > C = the number of codepoints in each line > > T = the (average) time for processing each codepoint to check for a > return character > > Now N and C are the same whether the text is ascii or unicode Largely - yes - although for stuff like this you need to think in terms of bytes not codepoints (as memory throughput becomes 'a thing' when the strings are anything longer than a few characters) - so unicode is 2*ascii in this regard [ Its actually more than 2x for longer strings but how much more depends on CPU/memory architecture - CPUs can only read from their level 1 cache, and there's a cost to a cache miss, and you get 2x as many cache misses with unicode data as native data, assuming the data is larger than a single level 1 cache line. ] > Test 1 > If I get rid of the red herring by replacing the matchChunk call with a > simple > ... > Which would appear to mean that processing unicode codepoints for the > apparently simple task of checking for return takes 100 times as much > time as processing ascii. That seems excessive, to put it mildly! Its a lot slower certainly, but then searching unicode text for a string is (in the general case) a lot more complex than searching native/ascii text for a string. > Test 2 > With the original code using matchChunk, which of course is going to > have its own internal loop on code points so multiply by another 8 (it > only searches the first few characters) > and will not always return true so more lines must be processed but > again these are same multipliers whether ascii or unicode > ... > Plain ascii takes 0.07 seconds > Unicode takes 19.9 seconds, a multiplier of nearly 300. I can > easily believe matchChunk takes 3 times as long to process unicode as > ascii, this is the sort of factor I would have expected in Test 1. So 'Test 2' is slightly misleading - as it still suggests matchChunk is causing a slowdown - which it isn't. The difference here is Test 2 is doing more work as it isn't always exiting. If you test: get line k of fff put true into tFound I suspect you'll find the time to process your data if it contains unicode is pretty similar to that when matchChunk is also called. In my quick test (which is 32 index lines, 200 fff lines) I get about 10ms (no unicode) vs 1400ms (unicode) > OK Mark, hit me again, I am a glutton for punishment, what is wrong > with this analysis? Nothing in particular - apart from thinking that matchChunk is actually a relevant factor here ;) The reasons this delimiter search operation on unicode strings is so much slower than native is for two reasons: 1) We (well, I) heavily optimized the core native/ascii string operations in 2015 to make sure there were as fast as possible 2) Searching a unicode string for another string (which is what is going on here) is much more complex than doing the same for native/ascii Native/ascii strings have some very pleasant properties: - one byte (codeunit) is one character - always. - each character has only one representation - its byte value - casing is a simple mapping between lower and upper case characters - and only about 25% of characters are affected Unicode has none of these properties - a unicode character (grapheme) can be arbitrarily many codeunits (2 byte quantities) long - characters can have multiple representations - e.g. e-acute vs e,combining-acute - casing is not (in general) a simple mapping of one codeunit to another Currently the unicode operations in the engine are largely unoptimized - they assume the general case in all things so even searching a string for LF (which is the case here) is still done under the assumption that it might need that (very hefty) extra processing. Of course it would be nice to have highly optimized low-level unicode string optimizations but you have to pick your battles (particular when the battles are incredibly technical ones!) but the reality is that this (admittedly large!) speed difference is only really noticeable 'at scale' and when scale is involved, there's pretty much always an algorithmic change which can make those 'low-level' performance differences irrelevant. The case here is a really good example. The line X based code gives (no matchChunk / with matchChunk): ASCII 300 lines 13ms / 22ms ASCII 3000 lines - 986ms / 1104ms ASCII 10000 lines - 10804ms / 11213ms The array based code gives (no matchChunk / with matchChunk): ASCII 300 lines - 2ms / 11ms ASCII 3000 lines - 19ms / 101ms ASCII 10000 lines - 69ms / 336ms UNICODE 300 lines - 7ms / 12ms UNICODE 3000 lines - 52ms / 108ms UNICODE 10000 lines - 170ms / 359ms Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Build Amazing Things From Neville.Smythe at optusnet.com.au Sat Jun 29 13:49:49 2024 From: Neville.Smythe at optusnet.com.au (Neville Smythe) Date: Sun, 30 Jun 2024 03:49:49 +1000 Subject: use-livecode Digest, Vol 249, Issue 24 Message-ID: <0EE136D5-54A3-474A-BB79-326A0956BB18@optusnet.com.au> Thanks Mark for the gory details which i found fascinating. Unicode is even more complicated than I realized, and I thought I had a pretty good understanding of it. Actually I thought my test 2 demonstrated that matchchunk performed very well on Unicode, rather than trying to show it was part of the problem. As to my back of the envelope analysis, I realized after I hit the Send button that my sloppy code computed the end condition the number of lines of fff in the inner loop as well as the outer, which makes the timing computation incorrect. So, end of story, my original problem is resolved, and I have that nifty array trick for random access to lines of large text data which is going to be invaluable, plus a tutorial on Unicode. All worth the embarrassment of exposing my ignorance in front of God and everyone (God in this case being Mark) Neville Smythe > On 30 Jun 2024, at 2:01 am, use-livecode-request at lists.runrev.com wrote: > > Send use-livecode mailing list submissions to > use-livecode at lists.runrev.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.runrev.com/mailman/listinfo/use-livecode > or, via email, send a message with subject or body 'help' to > use-livecode-request at lists.runrev.com > > You can reach the person managing the list at > use-livecode-owner at lists.runrev.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of use-livecode digest..." > > > you can find the archives for this list at: > > http://lists.runrev.com/pipermail/use-livecode/ > > and search them using this link: > > https://www.mail-archive.com/use-livecode at lists.runrev.com/ > > > Today's Topics: > > 1. Re: Socket Packaging (Bob Sneidar) > 2. url no longer working as expected (Hugh Senior) > 3. Re: url no longer working as expected (Bob Sneidar) > 4. Re: url no longer working as expected (Paul Dupuis) > 5. Re: url no longer working as expected (Bob Sneidar) > 6. Re: url no longer working as expected (Paul Dupuis) > 7. Re: url no longer working as expected (Richard Gaskin) > 8. Re: Slow stack problem (Neville Smythe) > 9. Re: Slow stack problem (Mark Waddingham) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 28 Jun 2024 16:44:24 +0000 > From: Bob Sneidar > To: How to use LiveCode > Subject: Re: Socket Packaging > Message-ID: <2D093B01-C351-4AA7-B2F3-AE44CDC3503E at iotecdigital.com> > Content-Type: text/plain; charset="utf-8" > > Added error checking. Also the payload can now be a string or an array. > > command packagePayload @pPayload, pUseEncryption > try > if pPayload is an array then \ > put arrayEncode(pPayload) into pPayload > > if pUseEncryption then \ > put slyEncrypt(pPayload) into pPayload > > put base64Encode(pPayload) into pPayload > catch tError > return "ERROR:" && tError > end try > end packagePayload > > command unpackPayload @pPayload, pUseEncryption > try > put base64Decode(pPayload) into pPayload > > if pUseEncryption is true or pPayload begins with "salted" then \ > put slyDecrypt(pPayload) into pPayload > > if pPayload is an array then \ > put arrayDecode(pPayload) into pPayload > catch tError > return "ERROR:" && tError > end try > end unpackPayload > > Bob S > > >> On Jun 24, 2024, at 9:21 AM, Bob Sneidar wrote: >> Hi all. >> I came up with deceptively simple wrappers for packaging data for transmission over raw sockets. I can?t send the slyEncrypt and slyDecrypt handlers because I use methods no one else knows. But you can roll your own or else eliminate encryption altogether. >> And to answer the question befor it?s asked, I don?t use SSL because I don?t like having to deal with certificates, and also because I use a method for encryption that I don?t think anyone else has thought of, or at least I can?t find any info online. >> Bob S >> command packagePayload @pPayload, pUseEncryption >> if pPayload is an array then \ >> put arrayEncode(pPayload) into pPayload >> if pUseEncryption then \ >> put slyEncrypt(pPayload) into pPayload >> put base64Encode(pPayload) into pPayload >> end packagePayload >> command unpackPayload @pPayload >> put base64Decode(pPayload) into pPayload >> if pPayload begins with "salted" then \ >> put slyDecrypt(pPayload) into pPayload >> try >> put arrayDecode(pPayload) into tResult >> put tResult into pPayload >> catch tError >> -- not an array >> end try >> end unpackPayload > > > ------------------------------ > > Message: 2 > Date: Fri, 28 Jun 2024 18:04:09 +0100 > From: "Hugh Senior" > To: > Subject: url no longer working as expected > Message-ID: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> > Content-Type: text/plain; charset="us-ascii" > > > Platform: Windows 11, LC 9.6.12 > Query: Using URL to access a web page > > Problem: > Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web > browser and the page is displayed as expected. > > Use LC's URL command to access the same page direct returns a 404 > put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" > > Anyone got any insights? > > Hugh Senior > > > > > ------------------------------ > > Message: 3 > Date: Fri, 28 Jun 2024 17:07:55 +0000 > From: Bob Sneidar > To: How to use LiveCode > Subject: Re: url no longer working as expected > Message-ID: <7CFEFE88-133D-48B6-9E28-3728C5A7AB37 at iotecdigital.com> > Content-Type: text/plain; charset="us-ascii" > > I get the HTML of the page. Are you trying to open the page in a browser? > > Bob S > > >> On Jun 28, 2024, at 10:04 AM, Hugh Senior via use-livecode wrote: >> Platform: Windows 11, LC 9.6.12 >> Query: Using URL to access a web page >> Problem: >> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >> browser and the page is displayed as expected. >> Use LC's URL command to access the same page direct returns a 404 >> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >> Anyone got any insights? >> Hugh Senior >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > ------------------------------ > > Message: 4 > Date: Fri, 28 Jun 2024 13:50:35 -0400 > From: Paul Dupuis > To: use-livecode at lists.runrev.com > Subject: Re: url no longer working as expected > Message-ID: <499fc022-eafb-49dd-96df-1dcd18afb8fb at researchware.com> > Content-Type: text/plain; charset=UTF-8; format=flowed > > I get a response from Yahoos that is an html page with a 404 information > as part of it. > > This happens under LC 9.6.12 and 9.6.11 > > I think this is Yahoo Finance not being able to detect the browser type > and intentionally returning a 404 as a method of deterring screen scraping. > > >> On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >> Platform: Windows 11, LC 9.6.12 >> Query: Using URL to access a web page >> Problem: >> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >> browser and the page is displayed as expected. >> Use LC's URL command to access the same page direct returns a 404 >> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >> Anyone got any insights? >> Hugh Senior >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > ------------------------------ > > Message: 5 > Date: Fri, 28 Jun 2024 18:03:28 +0000 > From: Bob Sneidar > To: How to use LiveCode > Subject: Re: url no longer working as expected > Message-ID: > Content-Type: text/plain; charset="us-ascii" > > Did you try that in the message box? > > Bob S > > >> On Jun 28, 2024, at 10:50 AM, Paul Dupuis via use-livecode wrote: >> I get a response from Yahoos that is an html page with a 404 information as part of it. >> This happens under LC 9.6.12 and 9.6.11 >> I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. >>> On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >>> Platform: Windows 11, LC 9.6.12 >>> Query: Using URL to access a web page >>> Problem: >>> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >>> browser and the page is displayed as expected. >>> Use LC's URL command to access the same page direct returns a 404 >>> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >>> Anyone got any insights? >>> Hugh Senior >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > ------------------------------ > > Message: 6 > Date: Fri, 28 Jun 2024 14:23:35 -0400 > From: Paul Dupuis > To: use-livecode at lists.runrev.com > Subject: Re: url no longer working as expected > Message-ID: <30ffa56e-1cc0-4f83-9590-e1525a14e613 at researchware.com> > Content-Type: text/plain; charset=UTF-8; format=flowed > > Yes. > > put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" > > In the message box on 9.6.11 and 9.6.12 under Windows 11. Both return a > pile of HTML text that is all the formatting and CSS linked stuff to > show a "404" page. > > This suggests that put URL is working and it is the Yahoo server that > returning a different page of HTML/CSS for the put vs when you enter the > URL in a browser (Firefox in my case, where I get the Yahoo finance data > for Shell, although I did have to respond to a Cookies dialog first). > > >> On 6/28/2024 2:03 PM, Bob Sneidar via use-livecode wrote: >> Did you try that in the message box? >> Bob S >>>> On Jun 28, 2024, at 10:50 AM, Paul Dupuis via use-livecode wrote: >>> I get a response from Yahoos that is an html page with a 404 information as part of it. >>> This happens under LC 9.6.12 and 9.6.11 >>> I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. >>> On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >>>> Platform: Windows 11, LC 9.6.12 >>>> Query: Using URL to access a web page >>>> Problem: >>>> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >>>> browser and the page is displayed as expected. >>>> Use LC's URL command to access the same page direct returns a 404 >>>> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >>>> Anyone got any insights? >>>> Hugh Senior >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode at 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 at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > ------------------------------ > > Message: 7 > Date: Fri, 28 Jun 2024 18:59:34 +0000 > From: "Richard Gaskin" > To: use-livecode at lists.runrev.com > Subject: Re: url no longer working as expected > Message-ID: > Content-Type: text/plain; charset="utf-8" > > Likely the case. The expense of collating all that data and presenting it to their site visitors is considerable. They use advertising to cover those costs. If the data were easily scrapable, scrapers diminish revenue, putting the resource itself at risk. > > Some data provides offer APIs. When you see anti-scraping effects, look for API options (I saw none there but I didn't look deeply). APIs take fewer resources to deliver, and may have strategic benefit for some data brokers. > > But if they have scrape-prevention and no API, they're sending a clear signal: "We need to pay our bills, please send your traffic to our page so we can do that." > > That said, I've come across stock APIs before, and while I don't recall many free ones there likely are some. > > Richard Gaskin > FourthWorld.com > > > > Paul Dupuis wrote: > >> I get a response from Yahoos that is an html page with a 404 >> information as part of it. > ... >> I think this is Yahoo Finance not being able to detect the >> browser type and intentionally returning a 404 as a method >> of deterring screen scraping. > On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: > ... >>> Problem: >>> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into >>> any web browser and the page is displayed as expected. >>> Use LC's URL command to access the same page direct returns a >>> 404 >>> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >>> Anyone got any insights? > > > > ------------------------------ > > Message: 8 > Date: Sat, 29 Jun 2024 17:53:58 +1000 > From: Neville Smythe > To: How to use LiveCode > Subject: Re: Slow stack problem > Message-ID: <76E596CE-7A40-4060-8A40-A9BD9DC0FFA8 at optusnet.com.au> > Content-Type: text/plain; charset=utf-8 > > Thanks Mark for pointing me (as ever) in the right direction, away from the red herring but to the hidden inner loop entailed in evaluating > > line k of fff > > A bit embarrassing because I was party to the discussion some time ago about the slowness of lineOffset when working with unicode text. > > And thanks for the neat array trick which I wouldn?t have thought of. > > There is indeed just one line in the text which contains a single Unicode character. Without that character evidently the variable fff would internally be an ascii (or native?) string, but otherwise is entirely utf16 and we hit the LineOffset problem. > > But I am still bemused. > > Is it not the case that the processing time for looping over the number of lines and getting the k-th line in each iteration, for some arbitrary k, going to be > > Order(N^2) * C * T > > where > > N = the number of lines in the text > > C = the number of codepoints in each line > > T = the (average) time for processing each codepoint to check for a return character > > Now N and C are the same whether the text is ascii or unicode > > Test 1 > If I get rid of the red herring by replacing the matchChunk call with a simple > > put line k of fff into x; put true into found ? as if matchChunk always finds a match on the first line tested so that I am timing just the getting of lines endings: > > The time for processing plain ascii is. 0.008 seconds > The time for processing unicode is. 0.84 seconds > > Which would appear to mean that processing unicode codepoints for the apparently simple task of checking for return takes 100 times as much time as processing ascii. That seems excessive, to put it mildly! > > Test 2 > With the original code using matchChunk, which of course is going to have its own internal loop on code points so multiply by another 8 (it only searches the first few characters) > and will not always return true so more lines must be processed ? but again these are same multipliers whether ascii or unicode > > Plain ascii takes 0.07 seconds > Unicode takes 19.9 seconds, a multiplier of nearly 300. ? I can easily believe matchChunk takes 3 times as long to process unicode as ascii, this is the sort of factor I would have expected in Test 1. > > OK Mark, hit me again, I am a glutton for punishment, what is wrong with this analysis? > > Neville Smythe > > > > > > > ------------------------------ > > Message: 9 > Date: Sat, 29 Jun 2024 10:27:19 +0100 > From: Mark Waddingham > To: How to use LiveCode > Subject: Re: Slow stack problem > Message-ID: <0aa021b2188068c191e11ba49db857cc at livecode.com> > Content-Type: text/plain; charset=UTF-8; format=flowed > >> On 2024-06-29 08:53, Neville Smythe via use-livecode wrote: >> Is it not the case that the processing time for looping over the number >> of lines and getting the k-th line in each iteration, for some >> arbitrary k, going to be >> Order(N^2) * C * T >> where >> N = the number of lines in the text >> C = the number of codepoints in each line >> T = the (average) time for processing each codepoint to check for a >> return character >> Now N and C are the same whether the text is ascii or unicode > > Largely - yes - although for stuff like this you need to think in terms > of bytes not codepoints (as memory throughput becomes 'a thing' when the > strings are anything longer than a few characters) - so unicode is > 2*ascii in this regard > > [ Its actually more than 2x for longer strings but how much more depends > on CPU/memory architecture - CPUs can only read from their level 1 > cache, and there's a cost to a cache miss, and you get 2x as many cache > misses with unicode data as native data, assuming the data is larger > than a single level 1 cache line. ] > >> Test 1 >> If I get rid of the red herring by replacing the matchChunk call with a >> simple >> ... >> Which would appear to mean that processing unicode codepoints for the >> apparently simple task of checking for return takes 100 times as much >> time as processing ascii. That seems excessive, to put it mildly! > > Its a lot slower certainly, but then searching unicode text for a string > is (in the general case) a lot more complex than searching native/ascii > text for a string. > >> Test 2 >> With the original code using matchChunk, which of course is going to >> have its own internal loop on code points so multiply by another 8 (it >> only searches the first few characters) >> and will not always return true so more lines must be processed ? but >> again these are same multipliers whether ascii or unicode >> ... >> Plain ascii takes 0.07 seconds >> Unicode takes 19.9 seconds, a multiplier of nearly 300. ? I can >> easily believe matchChunk takes 3 times as long to process unicode as >> ascii, this is the sort of factor I would have expected in Test 1. > > So 'Test 2' is slightly misleading - as it still suggests matchChunk is > causing a slowdown - which it isn't. > > The difference here is Test 2 is doing more work as it isn't always > exiting. If you test: > > get line k of fff > put true into tFound > > I suspect you'll find the time to process your data if it contains > unicode is pretty similar to that when matchChunk is also called. > > In my quick test (which is 32 index lines, 200 fff lines) I get about > 10ms (no unicode) vs 1400ms (unicode) > >> OK Mark, hit me again, I am a glutton for punishment, what is wrong >> with this analysis? > > Nothing in particular - apart from thinking that matchChunk is actually > a relevant factor here ;) > > The reasons this delimiter search operation on unicode strings is so > much slower than native is for two reasons: > 1) We (well, I) heavily optimized the core native/ascii string > operations in 2015 to make sure there were as fast as possible > 2) Searching a unicode string for another string (which is what is > going on here) is much more complex than doing the same for native/ascii > > Native/ascii strings have some very pleasant properties: > - one byte (codeunit) is one character - always. > - each character has only one representation - its byte value > - casing is a simple mapping between lower and upper case characters - > and only about 25% of characters are affected > > Unicode has none of these properties > - a unicode character (grapheme) can be arbitrarily many codeunits (2 > byte quantities) long > - characters can have multiple representations - e.g. e-acute vs > e,combining-acute > - casing is not (in general) a simple mapping of one codeunit to > another > > Currently the unicode operations in the engine are largely unoptimized - > they assume the general case in all things so even searching a string > for LF (which is the case here) is still done under the assumption that > it might need that (very hefty) extra processing. > > Of course it would be nice to have highly optimized low-level unicode > string optimizations but you have to pick your battles (particular when > the battles are incredibly technical ones!) but the reality is that this > (admittedly large!) speed difference is only really noticeable 'at > scale' and when scale is involved, there's pretty much always an > algorithmic change which can make those 'low-level' performance > differences irrelevant. > > The case here is a really good example. > > The line X based code gives (no matchChunk / with matchChunk): > > ASCII 300 lines 13ms / 22ms > ASCII 3000 lines - 986ms / 1104ms > ASCII 10000 lines - 10804ms / 11213ms > > The array based code gives (no matchChunk / with matchChunk): > > ASCII 300 lines - 2ms / 11ms > ASCII 3000 lines - 19ms / 101ms > ASCII 10000 lines - 69ms / 336ms > > UNICODE 300 lines - 7ms / 12ms > UNICODE 3000 lines - 52ms / 108ms > UNICODE 10000 lines - 170ms / 359ms > > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Build Amazing Things > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > http://lists.runrev.com/mailman/listinfo/use-livecode > > > ------------------------------ > > End of use-livecode Digest, Vol 249, Issue 24 > ********************************************* From Bernd.Niggemann at uni-wh.de Sat Jun 1 07:18:41 2024 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sat, 1 Jun 2024 11:18:41 +0000 Subject: Snapshot question Message-ID: <8DC380B5-23ED-49DC-87E4-955717BA7A49@uni-wh.de> Neville wrote > Now while referenced images such as png’s can be > rotated (more precisely, have their angle set) they lose their scaling, > reverting to their native size; and rotated images cannot be scaled (why?? set the resizeQuality of the image to good or best depending on your image (images get a bit fuzzy when rotated) you can resize a rotated image if you set the imageData of the rotated image to the imageData of the rotated image set the angle of image 1 to 15 set the imageData of image 1 to the imageData of image 1 As soon as you set the imageData of the image it is not referenced anymore. But it can be resized. I do not know your requirements exactly but if you want to set the angle repeatedly then it is best to store the original (non-rotated) text of the image and do your rotation every time from that starting point. i.e. store original set angle restore to origina set next angle Examples of rotating and resizing of image can be found in this topic of the Forum (old stuff but still working) https://forums.livecode.com/viewtopic.php?f=27&t=8042 Kind regards Bernd From Bernd.Niggemann at uni-wh.de Sat Jun 1 09:57:12 2024 From: Bernd.Niggemann at uni-wh.de (Niggemann, Bernd) Date: Sat, 1 Jun 2024 13:57:12 +0000 Subject: Snapshot question Message-ID: <1E534C68-6918-4E46-B135-2AC1C7908995@uni-wh.de> Neville wrote Now while referenced images such as png’s can be rotated (more precisely, have their angle set) they lose their scaling, reverting to their native size; and rotated images cannot be scaled (why?? set the resizeQuality of the image to good or best depending on your image (images get a bit fuzzy when rotated) you can resize a rotated image if you set the imageData of the rotated image to the imageData of the rotated image set the angle of image 1 to 15 set the imageData of image 1 to the imageData of image 1 As soon as you set the imageData of the image it is not referenced anymore. But it can be resized. I do not know your requirements exactly but if you want to set the angle repeatedly then it is best to store the original (non-rotated) text of the image and do your rotation every time from that starting point. i.e. store original set angle restore to origina set next angle Examples of rotating and resizing of image can be found in this topic of the Forum (old stuff but still working) https://forums.livecode.com/viewtopic.php?f=27&t=8042 Kind regards Bernd From tom at makeshyft.com Mon Jun 3 12:02:03 2024 From: tom at makeshyft.com (Tom Glod) Date: Mon, 3 Jun 2024 12:02:03 -0400 Subject: oAuth in production? Message-ID: Hi Folks, Can anyone confirm that LCs oAuth works well in production and cross platform? Thanks, Tom From ambassador at fourthworld.com Mon Jun 3 19:22:04 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Mon, 03 Jun 2024 23:22:04 +0000 Subject: LiveCode on Social Media Message-ID: <37638b79f1777f1ae9a5158c518af995dac19af9@fourthworld.com> For LC support nothing beats this use-list and the LC Forums, but for spreading the word about LC and the cool stuff you're making with it nothing beat social media. Two of the largest social media discussion groups for LC are: LinkedIn: "LiveCode Developers" Best social media platform for professional interests https://www.linkedin.com/groups/50811/ Facebook: "LiveCode Users" One of the biggest platforms for general audiences https://www.facebook.com/groups/livecodeusers Is there a third I should include there? If you use those platforms please consider joining the LC groups. The more active discussion that takes place there, the more newcomers may be introduced to the language we love. -- Richard Gaskin FourthWorld.com From hakan at exformedia.se Tue Jun 4 04:55:13 2024 From: hakan at exformedia.se (=?utf-8?Q?H=C3=A5kan_Liljegren?=) Date: Tue, 4 Jun 2024 10:55:13 +0200 Subject: Snapshot question In-Reply-To: <8DC380B5-23ED-49DC-87E4-955717BA7A49@uni-wh.de> References: <8DC380B5-23ED-49DC-87E4-955717BA7A49@uni-wh.de> Message-ID: LiveCode refuses to scale rotated images if the angle is set and lockloc is false but if you set lockloc to true you can scale the rotated image. If you just rotate an image with lockloc set (to true) it will always keep the image inside the original bounding box which is normally not what you want. But if you want to rotate and keep the same scale you need to calculate the new width and height of the image based on the scale factor. But if you have the scale factor nd the wanted angle we can, with some trigonometry, calculate the new width and height and thus create a function: constant deg2Rad = pi/180 on rotateAndScaleImage pImgID pDeg pScale if pScale is empty then put 1 into pScale put the loc of pImgID into tLoc put the formattedwidth of pImgID * pScale into tWidth put the formattedheight of pImgID * pScale into tHeight put pDeg * deg2Rad into tRad put abs(sin(tRad)) into tSin put abs(cos(tRad)) into tCos put tWidth * tCos + tHeight * tSin into tNewWidth put tWidth * tSin + tHeight * tCos into tNewHeight lock screen set the angle of pImgID to pDeg set the width of pImgID to tNewWidth set the height of pImgID to tNewHeight set the loc of pImgID to tLoc end rotateAndScaleImage pImgID is the reference to the image, pDeg is the rotation angle in degrees and pScale is the scale factor for the image. E.g. rotateAndScaleImage the long id of image “MyImage”, 22, 0.5 Will rotate image “MyImage” by 22 degrees at half the original size NOTE! The function above rotates the image around it’s center and to get the function to work the lockloc needs to be set to true Happy coding! :-Håkan > 1 juni 2024 kl. 13:18 skrev Niggemann, Bernd via use-livecode : > > Neville wrote >> Now while referenced images such as png’s can be >> rotated (more precisely, have their angle set) they lose their scaling, >> reverting to their native size; and rotated images cannot be scaled (why?? > > set the resizeQuality of the image to good or best depending on your image (images get a bit fuzzy when rotated) > > you can resize a rotated image if you set the imageData of the rotated image to the imageData of the rotated image > > set the angle of image 1 to 15 > set the imageData of image 1 to the imageData of image 1 > > As soon as you set the imageData of the image it is not referenced anymore. But it can be resized. > > I do not know your requirements exactly but if you want to set the angle repeatedly then it is best to store the original (non-rotated) text of the image and do your rotation every time from that starting point. > > i.e. > store original > set angle > restore to origina > set next angle > > Examples of rotating and resizing of image can be found in this topic of the Forum (old stuff but still working) > > https://forums.livecode.com/viewtopic.php?f=27&t=8042 > > Kind regards > Bernd > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Tue Jun 4 08:10:52 2024 From: paul at researchware.com (Paul Dupuis) Date: Tue, 4 Jun 2024 08:10:52 -0400 Subject: LiveCode on Social Media In-Reply-To: <37638b79f1777f1ae9a5158c518af995dac19af9@fourthworld.com> References: <37638b79f1777f1ae9a5158c518af995dac19af9@fourthworld.com> Message-ID: <22d189d2-b90b-401e-8e5a-6e1b3347c090@researchware.com> I followed this one for a little while: https://www.reddit.com/r/livecode/ It was not very active, and, like many Reddit groups, prone to SPAM. Reddit, in general, does have a large developer community. On 6/3/2024 7:22 PM, Richard Gaskin via use-livecode wrote: > For LC support nothing beats this use-list and the LC Forums, but for spreading the word about LC and the cool stuff you're making with it nothing beat social media. > > Two of the largest social media discussion groups for LC are: > > > LinkedIn: "LiveCode Developers" > Best social media platform for professional interests > https://www.linkedin.com/groups/50811/ > > > Facebook: "LiveCode Users" > One of the biggest platforms for general audiences > https://www.facebook.com/groups/livecodeusers > > > Is there a third I should include there? > > If you use those platforms please consider joining the LC groups. The more active discussion that takes place there, the more newcomers may be introduced to the language we love. > > -- > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Tue Jun 4 10:24:40 2024 From: craig at starfirelighting.com (Craig Newman) Date: Tue, 4 Jun 2024 10:24:40 -0400 Subject: Snapshot question In-Reply-To: <800B6231-EC7E-45C7-93D8-67F28A8664D4@optusnet.com.au> References: <800B6231-EC7E-45C7-93D8-67F28A8664D4@optusnet.com.au> Message-ID: <059CFA51-2219-4139-AC98-1BBA43A012D1@starfirelighting.com> The docs must be wrong. I just tested with all seven of the graphic options in the tools palette, and they all rotate just fine. Craig > On May 31, 2024, at 9:30 PM, Neville Smythe via use-livecode wrote: > > Many thanks Craig and Bernd for your suggestions > > Craig: Unfortunately the docs say revRotatePoly only works with lines, curves and polygons > > Bernd: Oh! Yes, exporting as png does work to give transparent corner bits! Obvious now! > > I think I had briefly considered this and rejected it because at the time I was conflating the problem with an issue I am going to have later in my project. The roundrect graphics are going to be used as niches for a collection of images: the images should be scaled and rotated to fit the graphic object (or now its png alter-ego). Now while referenced images such as png’s can be rotated (more precisely, have their angle set) they lose their scaling, reverting to their native size; and rotated images cannot be scaled (why?? Rather a strange restriction. I think the graphical engine for LC is showing its age rather badly). Which somehow led me to think I had to use the bitmap form for snapshots. But if I place and scale the original image, then export that as a png, the exported image should have the required size and so can then be rotated without changing its size. I hope. > > Neville > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Tue Jun 4 14:48:12 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Tue, 04 Jun 2024 18:48:12 +0000 Subject: Snapshot question Message-ID: Craig wrote: > The docs must be wrong. I just tested with all seven of the graphic > options in the tools palette, and they all rotate just fine. I'd guess that Dictionary entry was written before July 7, 2007. In the revcommonlibrary script you'll find the revRotatePoly command on lines 496 thru 532, with the comment block above it noting the date it was added. On line 506 it gets the EFFECTIVE points for any graphic styles that doesn't innately have a points property. On line 525 it changes the style of the target graphic object to polygon if needed. Those two changes are not present in the older revRotatePolygonOld command listed just below it. -- Richard Gaskin FourthWorld.com From neville.smythe at optusnet.com.au Tue Jun 4 20:30:11 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 5 Jun 2024 10:30:11 +1000 Subject: Snapshot question In-Reply-To: References: Message-ID: <8348FF57-300D-49E5-96AA-40C58DDF7E1A@optusnet.com.au> > On 5 Jun 2024, at 2:00 am, Craig wrote: > > The docs must be wrong. I just tested with all seven of the graphic options in the tools palette, and they all rotate just fine. You are absolutely right, a roundedRect graphic does rotate with revPolyRotate. Don’t know why I trusted the docs rather than testing for myself (In my defence, I have been thinking more about my later issue of rotating scaled images). Moreover when the graphic is selected the rotated boundary is hilighted rather than the bounding box boundary as with a rotated image, which is huge advantage. The graphic's label is not rotated, which is a small disadvantage - or a feature; I can live with it for my application. So I can now delete a hundred or more lines of work-around code. And Hakan, many thanks, this will be very useful. But who knew!? Which is rather my point - perhaps scaling of rotated images was prohibited by default just because LC thought developers couldn’t deal with the trigonometry? So much good stuff from Bernd, Craig and Hakan. Neville Smythe From craig at starfirelighting.com Wed Jun 5 10:06:55 2024 From: craig at starfirelighting.com (Craig Newman) Date: Wed, 5 Jun 2024 10:06:55 -0400 Subject: Snapshot question In-Reply-To: References: Message-ID: <43E484B7-7EF1-4A98-9231-D51DA5449A03@starfirelighting.com> Richard. Intersting stuff. When one first drags a roundRect from the toolbar, the PI has a field to enter a value for the “roundRadius” property. But after a rotation, where the graphic is now defined solely by its “points” property, the ability to get or set that property disappears. I suppose this makes sense. And if one sets the roundRadius property to a value greater than the geometry of the graphic will allow, that is, the radius of the corners is greater than that which will ‘fit” onto the graphic itself, one gets a circle, though defined by points as opposed to the usual startAngle and arcAngle. Craig > On Jun 4, 2024, at 2:48 PM, Richard Gaskin via use-livecode wrote: > > Craig wrote: >> The docs must be wrong. I just tested with all seven of the graphic >> options in the tools palette, and they all rotate just fine. > > I'd guess that Dictionary entry was written before July 7, 2007. > > In the revcommonlibrary script you'll find the revRotatePoly command on lines 496 thru 532, with the comment block above it noting the date it was added. > > On line 506 it gets the EFFECTIVE points for any graphic styles that doesn't innately have a points property. > > On line 525 it changes the style of the target graphic object to polygon if needed. > > Those two changes are not present in the older revRotatePolygonOld command listed just below it. > > -- > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From jaguayo at telur.es Thu Jun 6 11:05:18 2024 From: jaguayo at telur.es (JosebaTELUR) Date: Thu, 6 Jun 2024 17:05:18 +0200 Subject: Mosquitto library. In-Reply-To: References: Message-ID: Hello: I'm trying to get the Mosquitto library to work and can't get it to work. Any help from the forum? (LiveCode 9.6.9 and Mojave System). Un saludo. Joseba. From tom at makeshyft.com Fri Jun 7 12:43:12 2024 From: tom at makeshyft.com (Tom Glod) Date: Fri, 7 Jun 2024 12:43:12 -0400 Subject: Mosquitto library. In-Reply-To: References: Message-ID: How are you trying to get it to work with Livecode? On Thu, Jun 6, 2024 at 11:06 AM JosebaTELUR via use-livecode < use-livecode at lists.runrev.com> wrote: > Hello: > > I'm trying to get the Mosquitto library to work and can't get it to work. > Any help from the forum? > (LiveCode 9.6.9 and Mojave System). > > Un saludo. > > Joseba. > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From bogdanoff at me.com Fri Jun 7 14:24:48 2024 From: bogdanoff at me.com (Peter Bogdanoff) Date: Fri, 7 Jun 2024 14:24:48 -0400 Subject: Mosquitto library. In-Reply-To: References: Message-ID: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Related to Mosquitto and the publish/subscribe model: is there any method now in LiveCode for my application to receive outside messages without explicitly checking to see if anything is available? In other words, is there a way for a message from a server to directly enter the message path within LC? Or is this totally dependent on a plugin based on something like what Joseba is asking? Peter Bogdanoff > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode wrote: > >> Mosquitto library From MikeKerner at roadrunner.com Fri Jun 7 15:44:42 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Fri, 7 Jun 2024 15:44:42 -0400 Subject: Mosquitto library. In-Reply-To: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> References: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Message-ID: * if you're on mobile, you can use push * you can also set up a small web server in your app to receive messages. levure uses this technique to receive messages from a plugin in sublime text that a script has been updated (so livecode will reload the script) * if we get websockets working, that will be another way to make this work. On Fri, Jun 7, 2024 at 2:26 PM Peter Bogdanoff via use-livecode < use-livecode at lists.runrev.com> wrote: > Related to Mosquitto and the publish/subscribe model: is there any method > now in LiveCode for my application to receive outside messages without > explicitly checking to see if anything is available? In other words, is > there a way for a message from a server to directly enter the message path > within LC? > > Or is this totally dependent on a plugin based on something like what > Joseba is asking? > > Peter Bogdanoff > > > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > >> Mosquitto library > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From tom at makeshyft.com Fri Jun 7 18:13:30 2024 From: tom at makeshyft.com (Tom Glod) Date: Fri, 7 Jun 2024 18:13:30 -0400 Subject: Mosquitto library. In-Reply-To: References: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Message-ID: websockets ....again. On Fri, Jun 7, 2024 at 3:46 PM Mike Kerner via use-livecode < use-livecode at lists.runrev.com> wrote: > * if you're on mobile, you can use push > * you can also set up a small web server in your app to receive messages. > levure uses this technique to receive messages from a plugin in sublime > text that a script has been updated (so livecode will reload the script) > * if we get websockets working, that will be another way to make this work. > > On Fri, Jun 7, 2024 at 2:26 PM Peter Bogdanoff via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > Related to Mosquitto and the publish/subscribe model: is there any method > > now in LiveCode for my application to receive outside messages without > > explicitly checking to see if anything is available? In other words, is > > there a way for a message from a server to directly enter the message > path > > within LC? > > > > Or is this totally dependent on a plugin based on something like what > > Joseba is asking? > > > > Peter Bogdanoff > > > > > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > > > >> Mosquitto library > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > -- > On the first day, God created the heavens and the Earth > On the second day, God created the oceans. > On the third day, God put the animals on hold for a few hours, > and did a little diving. > And God said, "This is good." > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From tom at makeshyft.com Fri Jun 7 18:14:15 2024 From: tom at makeshyft.com (Tom Glod) Date: Fri, 7 Jun 2024 18:14:15 -0400 Subject: Mosquitto library. In-Reply-To: References: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Message-ID: I think it might be time to solve this. On Fri, Jun 7, 2024 at 6:13 PM Tom Glod wrote: > websockets ....again. > > On Fri, Jun 7, 2024 at 3:46 PM Mike Kerner via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> * if you're on mobile, you can use push >> * you can also set up a small web server in your app to receive messages. >> levure uses this technique to receive messages from a plugin in sublime >> text that a script has been updated (so livecode will reload the script) >> * if we get websockets working, that will be another way to make this >> work. >> >> On Fri, Jun 7, 2024 at 2:26 PM Peter Bogdanoff via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> >> > Related to Mosquitto and the publish/subscribe model: is there any >> method >> > now in LiveCode for my application to receive outside messages without >> > explicitly checking to see if anything is available? In other words, is >> > there a way for a message from a server to directly enter the message >> path >> > within LC? >> > >> > Or is this totally dependent on a plugin based on something like what >> > Joseba is asking? >> > >> > Peter Bogdanoff >> > >> > > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode < >> > use-livecode at lists.runrev.com> wrote: >> > > >> > >> Mosquitto library >> > >> > _______________________________________________ >> > use-livecode mailing list >> > use-livecode at lists.runrev.com >> > Please visit this url to subscribe, unsubscribe and manage your >> > subscription preferences: >> > http://lists.runrev.com/mailman/listinfo/use-livecode >> > >> >> >> -- >> On the first day, God created the heavens and the Earth >> On the second day, God created the oceans. >> On the third day, God put the animals on hold for a few hours, >> and did a little diving. >> And God said, "This is good." >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > From MikeKerner at roadrunner.com Sat Jun 8 10:12:11 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Sat, 8 Jun 2024 10:12:11 -0400 Subject: Mosquitto library. In-Reply-To: References: <9600E51C-4C98-43E1-B435-F77CF4CB6619@me.com> Message-ID: it might be time for the compiler to come out of the vaporware or the web features to come out of the vaporware if you've never set up a web server, there is example code in levure for setting up a tiny one to receive and respond to events. On Fri, Jun 7, 2024 at 6:15 PM Tom Glod via use-livecode < use-livecode at lists.runrev.com> wrote: > I think it might be time to solve this. > > On Fri, Jun 7, 2024 at 6:13 PM Tom Glod wrote: > > > websockets ....again. > > > > On Fri, Jun 7, 2024 at 3:46 PM Mike Kerner via use-livecode < > > use-livecode at lists.runrev.com> wrote: > > > >> * if you're on mobile, you can use push > >> * you can also set up a small web server in your app to receive > messages. > >> levure uses this technique to receive messages from a plugin in sublime > >> text that a script has been updated (so livecode will reload the script) > >> * if we get websockets working, that will be another way to make this > >> work. > >> > >> On Fri, Jun 7, 2024 at 2:26 PM Peter Bogdanoff via use-livecode < > >> use-livecode at lists.runrev.com> wrote: > >> > >> > Related to Mosquitto and the publish/subscribe model: is there any > >> method > >> > now in LiveCode for my application to receive outside messages without > >> > explicitly checking to see if anything is available? In other words, > is > >> > there a way for a message from a server to directly enter the message > >> path > >> > within LC? > >> > > >> > Or is this totally dependent on a plugin based on something like what > >> > Joseba is asking? > >> > > >> > Peter Bogdanoff > >> > > >> > > On Jun 7, 2024, at 12:43 PM, Tom Glod via use-livecode < > >> > use-livecode at lists.runrev.com> wrote: > >> > > > >> > >> Mosquitto library > >> > > >> > _______________________________________________ > >> > use-livecode mailing list > >> > use-livecode at lists.runrev.com > >> > Please visit this url to subscribe, unsubscribe and manage your > >> > subscription preferences: > >> > http://lists.runrev.com/mailman/listinfo/use-livecode > >> > > >> > >> > >> -- > >> On the first day, God created the heavens and the Earth > >> On the second day, God created the oceans. > >> On the third day, God put the animals on hold for a few hours, > >> and did a little diving. > >> And God said, "This is good." > >> _______________________________________________ > >> use-livecode mailing list > >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From ambassador at fourthworld.com Sat Jun 8 21:11:54 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Sun, 09 Jun 2024 01:11:54 +0000 Subject: Mosquitto library. Message-ID: <924925da58c2560273c1ce6345fe1a02c376e4f0@fourthworld.com> Mike Kerner wrote: > * if you're on mobile, you can use push Desktop push isn't supported in LC's notifications API? > * you can also set up a small web server in your app to receive messages. > levure uses this technique to receive messages from a plugin in sublime > text that a script has been updated (so livecode will reload the script) Good on a LAN, but how do you get past a firewall without port forwarding? > * if we get websockets working, that will be another way to make this work. Do we need websockets on this? XMPP, for example, runs over regular sockets. Either way, I'd imagine a subscribe client looking to avoid polling is going to depend on a long-lived socket, no? Richard Gaskin FourthWorld.com From bobsneidar at iotecdigital.com Mon Jun 10 11:37:16 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 10 Jun 2024 15:37:16 +0000 Subject: Mosquitto library. In-Reply-To: <924925da58c2560273c1ce6345fe1a02c376e4f0@fourthworld.com> References: <924925da58c2560273c1ce6345fe1a02c376e4f0@fourthworld.com> Message-ID: <28700611-BB31-4B6A-B744-EC8EBDA9B58A@iotecdigital.com> No, and Yes. ;-) Bob S On Jun 8, 2024, at 6:11 PM, Richard Gaskin via use-livecode wrote: * if we get websockets working, that will be another way to make this work. Do we need websockets on this? XMPP, for example, runs over regular sockets. Either way, I'd imagine a subscribe client looking to avoid polling is going to depend on a long-lived socket, no? Richard Gaskin FourthWorld.com From MikeKerner at roadrunner.com Tue Jun 11 17:08:26 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Tue, 11 Jun 2024 17:08:26 -0400 Subject: Mosquitto library. In-Reply-To: <28700611-BB31-4B6A-B744-EC8EBDA9B58A@iotecdigital.com> References: <924925da58c2560273c1ce6345fe1a02c376e4f0@fourthworld.com> <28700611-BB31-4B6A-B744-EC8EBDA9B58A@iotecdigital.com> Message-ID: >Either way, I'd imagine a subscribe client looking to avoid polling is going to depend on a long-lived socket, no? That's part of the point of a websocket. you don't have to keep reopening it, and both ends can use it, as needed. On Mon, Jun 10, 2024 at 11:38 AM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > No, and Yes. ;-) > > Bob S > > > On Jun 8, 2024, at 6:11 PM, Richard Gaskin via use-livecode < > use-livecode at lists.runrev.com> wrote: > > * if we get websockets working, that will be another way to make this work. > > Do we need websockets on this? XMPP, for example, runs over regular > sockets. > > Either way, I'd imagine a subscribe client looking to avoid polling is > going to depend on a long-lived socket, no? > > > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From tariel at mac.com Wed Jun 12 11:07:24 2024 From: tariel at mac.com (Tariel Gogoberidze) Date: Wed, 12 Jun 2024 19:07:24 +0400 Subject: Apple developer application and installer certificates In-Reply-To: References: Message-ID: Hello, I received message from apple that -- Your Developer ID Installer Certificate will no longer be valid in 30 days. To generate a new certificate, sign in and visit Certificates, Identifiers & Profiles. And Your Developer ID Application Certificate will no longer be valid in 30 days. To generate a new certificate, sign in and visit Certificates, Identifiers & Profiles. — We do have applications created in LiveCode that we are still selling (outside of apple store) but this applications were apple certified with the help of Matthias Rebbe and I have no idea how to renew or generate new Installer and Developer ID certificates. The remote colocation computer on which Matthias did this certification magic is still available to connect to and we do have apple developer account. So if Matthias or somebody else is willing to help (for a payment of course) I will appreciate it and will provide access to remote computer, apple developer ID and other necessary information. Regards Tariel Gogoveridze From bobsneidar at iotecdigital.com Wed Jun 12 11:20:47 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 15:20:47 +0000 Subject: Date Words Message-ID: <9A1C0830-0504-4373-91BB-ACBAC3BA4350@iotecdigital.com> Hi all. Did you ever want to use phrases like yesterday, last tuesday or next friday in a date field? function dateWords pDate if word 1 of pDate is not among the items of "last,next,yesterday,today,tomorrow" then \ return empty put date() into tCurrentDate convert tCurrentDate to dateItems if the number of words of pDate = 2 then put "sunday,monday,tuesday,wednesday,thursday,friday,saturday" into tDaysOfWeek put itemOffset(word 2 of pDate, tDaysOfWeek) into tDayNumber put item 7 of tCurrentDate into tThisDayNumber if tDayNumber = 0 then \ return empty end if switch case word 1 of pDate is "last" if tDayNumber >= tThisDayNumber then \ subtract 7 from item 3 of tCurrentDate add (tDayNumber - tThisDayNumber) to item 3 of tCurrentDate break case word 1 of pDate is "next" add 7-tDayNumber to item 3 of tCurrentDate break case pDate is "yesterday" subtract 1 from item 3 of tCurrentDate break case pDate is "today" -- don't do anything break case pDate is "tomorrow" add 1 to item 3 of tCurrentDate break end switch put formatDate(tCurrentDate, "standard") into pDate return pDate end dateWords FUNCTION formatDate theDate, theFormat /* Accepts any valid date for the first parameter. If not a valid date, it simply returns what was passed. Second parameter can be any of the following: sql date: date in the yyyy-mm-dd format short date, abbreviated date, internet date, long date: LC versions of the same julian date: Julian number based on (I believe) Jacques formula standard date: The date in the form of "mm/dd/yyyy" */ put theDate into tSavedDate put the itemdelimiter into theOldDelim set the itemdelimiter to "-" IF the length of item 1 of theDate = 4 AND \ the number of items of theDate = 3 AND \ item 1 of theDate is a number AND \ item 2 of theDate is a number AND \ item 3 of theDate is a number THEN put item 2 of theDate & "/" & \ item 3 of theDate & "/" & \ item 1 of theDate into theDate END IF -- replace "." with "/" in theDate convert theDate to dateitems set the itemdelimiter to theOldDelim -- if the number of items of theDate <> 7 then -- answer "'" & theDate & "' is not a valid date format!" -- return tSavedDate -- end if SWITCH word 1 of theFormat CASE "sql" /* put item 1 of theDate & "-" & \ format("%02d",item 2 of theDate) & "-" & \ format("%02d",item 3 of theDate) into theDate */ put format("%s-%02d-%02d", item 1 of theDate, item 2 of theDate, \ item 3 of theDate) into theDate break CASE "short" convert theDate from dateitems to short date break CASE "abbreviated" convert theDate from dateitems to abbreviated date break CASE "abbr" convert theDate from dateitems to abbreviated date break CASE "internet" convert theDate from dateitems to internet date break CASE "long" convert theDate from dateitems to long date break CASE "julian" put the date into theDate convert theDate to dateItems IF ((item 2 of theDate = 1) OR (item 2 of theDate = 2)) THEN put 1 into theDay ELSE put 0 into theDay END IF put item 1 of theDate + 4800 - theDay into theYear put item 2 of theDate + (12 * theDay) - 3 into theMonth put item 3 of theDate + \ ((153 * theMonth + 2) div 5) + \ (365 * theYear) + \ (theYear div 4) - \ (theYear div 100) + \ (theYear div 400) - \ 32045 into theDate break case "standard" put format("%02d/%02d/%04d", item 2 of theDate, item 3 of theDate, \ item 1 of theDate) into theDate break default -- answer info "'" & theFormat & "' is not a valid parameter." As sheet put tSavedDate into theDate END SWITCH return theDate END formatDate Bob S From ambassador at fourthworld.com Wed Jun 12 13:26:33 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Wed, 12 Jun 2024 17:26:33 +0000 Subject: Mosquitto library. Message-ID: Mike Kerner wrote: > Richard wrote: >> Either way, I'd imagine a subscribe client looking to avoid polling >> is going to depend on a long-lived socket, no? > > That's part of the point of a websocket. you don't have to keep > reopening it, and both ends can use it, as needed. Exactly, websockets are useful in browser apps because browsers don't offer direct socket support. LiveCode makes OS-native apps and supports sockets. The socketTimeoutInterval lets us set how long they live. What am I missing? -- Richard Gaskin FourthWorld.com From bobsneidar at iotecdigital.com Wed Jun 12 13:39:06 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 17:39:06 +0000 Subject: Mosquitto library. In-Reply-To: References: Message-ID: Hi Richard. This email thread now has me curious. If I have an app that starts listening on a port, does that server port have a timeout associated with it that needs refreshing, or does the timeout only exist when a client connects? I have always assumed the latter. Bob S > On Jun 12, 2024, at 10:26 AM, Richard Gaskin via use-livecode wrote: > > Mike Kerner wrote: > >> Richard wrote: >>> Either way, I'd imagine a subscribe client looking to avoid polling >>> is going to depend on a long-lived socket, no? >> >> That's part of the point of a websocket. you don't have to keep >> reopening it, and both ends can use it, as needed. > > Exactly, websockets are useful in browser apps because browsers don't offer direct socket support. > > LiveCode makes OS-native apps and supports sockets. > > The socketTimeoutInterval lets us set how long they live. > > What am I missing? > > -- > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 12 14:20:24 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 18:20:24 +0000 Subject: Pop Combo Menu Message-ID: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> Hi all. I have a Combo Menu button. I want to have it “pop” open and show the options via script, but I cannot find a command to do that. Bob S From MikeKerner at roadrunner.com Wed Jun 12 14:42:49 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 12 Jun 2024 14:42:49 -0400 Subject: Mosquitto library. In-Reply-To: References: Message-ID: the original question was about mosquitto and handling messaging, thus the remarks about websockets. bob: the server just opens the port and listens. there is no timeout on the server. the client sends the request, and then times out if it does not receive a reply. whether it receives a reply or times out, the request is closed, and the client stops listening. the server does not retain the ability to continue to communicate with the client, once it has replied. websockets keep that channel open. On Wed, Jun 12, 2024 at 1:40 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi Richard. > > This email thread now has me curious. If I have an app that starts > listening on a port, does that server port have a timeout associated with > it that needs refreshing, or does the timeout only exist when a client > connects? I have always assumed the latter. > > Bob S > > > > On Jun 12, 2024, at 10:26 AM, Richard Gaskin via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > > Mike Kerner wrote: > > > >> Richard wrote: > >>> Either way, I'd imagine a subscribe client looking to avoid polling > >>> is going to depend on a long-lived socket, no? > >> > >> That's part of the point of a websocket. you don't have to keep > >> reopening it, and both ends can use it, as needed. > > > > Exactly, websockets are useful in browser apps because browsers don't > offer direct socket support. > > > > LiveCode makes OS-native apps and supports sockets. > > > > The socketTimeoutInterval lets us set how long they live. > > > > What am I missing? > > > > -- > > Richard Gaskin > > FourthWorld.com > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From paul at researchware.com Wed Jun 12 15:01:14 2024 From: paul at researchware.com (Paul Dupuis) Date: Wed, 12 Jun 2024 15:01:14 -0400 Subject: Pop Combo Menu In-Reply-To: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> Message-ID: <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> On 6/12/2024 2:20 PM, Bob Sneidar via use-livecode wrote: > Hi all. I have a Combo Menu button. I want to have it pop open and show the options via script, but I cannot find a command to do that. > > Bob S > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode You can use: *click*at(rightofbtn1- 5,topofbtn1+ 5) assuming the combo button is 'btn 1' on your card or replace btn 1 with a reference to your combo button. The idea is to generate a "click" at the location of the pulldown arrow part of the combo button. You can create a new empty stack and place a combo btn on it and try line of code in the message box with the browse tool selected. From paul at researchware.com Wed Jun 12 16:01:21 2024 From: paul at researchware.com (Paul Dupuis) Date: Wed, 12 Jun 2024 16:01:21 -0400 Subject: Pop Combo Menu In-Reply-To: <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> Message-ID: <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> On 6/12/2024 3:01 PM, Paul Dupuis via use-livecode wrote: > *click*at(rightofbtn1- 5,topofbtn1+ 5) Sorry that line of code is: (paste of formatted text messed it up) click at (right of btn 1 - 5,top of btn 1 + 5) From bobsneidar at iotecdigital.com Wed Jun 12 16:23:07 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 20:23:07 +0000 Subject: Pop Combo Menu In-Reply-To: <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> Message-ID: Thanks I was hoping I could do it without a click. Something like pop menu . There is a popup menu command but I think that only works with popup menus. Bob S > On Jun 12, 2024, at 1:01 PM, Paul Dupuis via use-livecode wrote: > > On 6/12/2024 3:01 PM, Paul Dupuis via use-livecode wrote: >> *click*at(rightofbtn1- 5,topofbtn1+ 5) > > Sorry that line of code is: (paste of formatted text messed it up) > > click at (right of btn 1 - 5,top of btn 1 + 5) > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 12 16:25:59 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 20:25:59 +0000 Subject: Pop Combo Menu In-Reply-To: References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> Message-ID: <88F1E79F-FF0A-4BB3-8A12-A12F5F44D268@iotecdigital.com> Hmmm looks like I can use popup button and provide a location. Bob S > On Jun 12, 2024, at 1:23 PM, Bob Sneidar via use-livecode wrote: > > Thanks I was hoping I could do it without a click. Something like pop menu . There is a popup menu command but I think that only works with popup menus. > > Bob S > > >> On Jun 12, 2024, at 1:01 PM, Paul Dupuis via use-livecode wrote: >> >> On 6/12/2024 3:01 PM, Paul Dupuis via use-livecode wrote: >>> *click*at(rightofbtn1- 5,topofbtn1+ 5) >> >> Sorry that line of code is: (paste of formatted text messed it up) >> >> click at (right of btn 1 - 5,top of btn 1 + 5) >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 12 16:30:41 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 12 Jun 2024 20:30:41 +0000 Subject: Pop Combo Menu In-Reply-To: <88F1E79F-FF0A-4BB3-8A12-A12F5F44D268@iotecdigital.com> References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> <88F1E79F-FF0A-4BB3-8A12-A12F5F44D268@iotecdigital.com> Message-ID: BUUUTTT… It looks like that detaches the menu from the button so any subsequent click on the actual menu button displays the button as a popup menu. Bob S > On Jun 12, 2024, at 1:25 PM, Bob Sneidar wrote: > > Hmmm looks like I can use popup button and provide a location. > > Bob S > > >> On Jun 12, 2024, at 1:23 PM, Bob Sneidar via use-livecode wrote: >> >> Thanks I was hoping I could do it without a click. Something like pop menu . There is a popup menu command but I think that only works with popup menus. >> >> Bob S >> >> >>> On Jun 12, 2024, at 1:01 PM, Paul Dupuis via use-livecode wrote: >>> >>> On 6/12/2024 3:01 PM, Paul Dupuis via use-livecode wrote: >>>> *click*at(rightofbtn1- 5,topofbtn1+ 5) >>> >>> Sorry that line of code is: (paste of formatted text messed it up) >>> >>> click at (right of btn 1 - 5,top of btn 1 + 5) >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > From marksmithhfx at gmail.com Wed Jun 12 16:36:25 2024 From: marksmithhfx at gmail.com (Mark Smith) Date: Wed, 12 Jun 2024 21:36:25 +0100 Subject: Date Words In-Reply-To: <9A1C0830-0504-4373-91BB-ACBAC3BA4350@iotecdigital.com> References: <9A1C0830-0504-4373-91BB-ACBAC3BA4350@iotecdigital.com> Message-ID: <83C09BB9-F0E4-40AC-B9FF-79029D7793CE@gmail.com> Hi Bob, I love the concept in principle but that’s a lot of code (to write and debug) and it does’t cover every possible permutation and combination of date requests. I long for a time when we can just capture a string like “a week from next Friday” and then call… function string2gptDate chatGPT “what is the date “ & “a week from next Friday” -- the latter being the captured input, probably expressed as a field or var return it end string2gptDate Which I just tried after prompting “when asked for a date please return the date and not an explanation as to how you arrived at the date” and in response to the above it returned "June 28, 2024”. Magnifico! Mark > On 12 Jun 2024, at 4:20 PM, Bob Sneidar via use-livecode wrote: > > Hi all. > > Did you ever want to use phrases like yesterday, last tuesday or next friday in a date field? > > function dateWords pDate > if word 1 of pDate is not among the items of "last,next,yesterday,today,tomorrow" then \ > return empty > > put date() into tCurrentDate > convert tCurrentDate to dateItems > > if the number of words of pDate = 2 then > put "sunday,monday,tuesday,wednesday,thursday,friday,saturday" into tDaysOfWeek > put itemOffset(word 2 of pDate, tDaysOfWeek) into tDayNumber > put item 7 of tCurrentDate into tThisDayNumber > > if tDayNumber = 0 then \ > return empty > end if > > switch > case word 1 of pDate is "last" > if tDayNumber >= tThisDayNumber then \ > subtract 7 from item 3 of tCurrentDate > add (tDayNumber - tThisDayNumber) to item 3 of tCurrentDate > break > case word 1 of pDate is "next" > add 7-tDayNumber to item 3 of tCurrentDate > break > case pDate is "yesterday" > subtract 1 from item 3 of tCurrentDate > break > case pDate is "today" > -- don't do anything > break > case pDate is "tomorrow" > add 1 to item 3 of tCurrentDate > break > end switch > > put formatDate(tCurrentDate, "standard") into pDate > return pDate > end dateWords > > FUNCTION formatDate theDate, theFormat > /* > Accepts any valid date for the first parameter. If not a valid date, it simply returns > what was passed. Second parameter can be any of the following: > sql date: date in the yyyy-mm-dd format > short date, abbreviated date, internet date, long date: LC versions of the same > julian date: Julian number based on (I believe) Jacques formula > standard date: The date in the form of "mm/dd/yyyy" > */ > > put theDate into tSavedDate > put the itemdelimiter into theOldDelim > set the itemdelimiter to "-" > > IF the length of item 1 of theDate = 4 AND \ > the number of items of theDate = 3 AND \ > item 1 of theDate is a number AND \ > item 2 of theDate is a number AND \ > item 3 of theDate is a number THEN > put item 2 of theDate & "/" & \ > item 3 of theDate & "/" & \ > item 1 of theDate into theDate > END IF > > -- replace "." with "/" in theDate > convert theDate to dateitems > set the itemdelimiter to theOldDelim > > -- if the number of items of theDate <> 7 then > -- answer "'" & theDate & "' is not a valid date format!" > -- return tSavedDate > -- end if > > SWITCH word 1 of theFormat > CASE "sql" > /* > put item 1 of theDate & "-" & \ > format("%02d",item 2 of theDate) & "-" & \ > format("%02d",item 3 of theDate) into theDate > */ > put format("%s-%02d-%02d", item 1 of theDate, item 2 of theDate, \ > item 3 of theDate) into theDate > break > CASE "short" > convert theDate from dateitems to short date > break > CASE "abbreviated" > convert theDate from dateitems to abbreviated date > break > CASE "abbr" > convert theDate from dateitems to abbreviated date > break > CASE "internet" > convert theDate from dateitems to internet date > break > CASE "long" > convert theDate from dateitems to long date > break > CASE "julian" > put the date into theDate > convert theDate to dateItems > IF ((item 2 of theDate = 1) OR (item 2 of theDate = 2)) THEN > put 1 into theDay > ELSE > put 0 into theDay > END IF > put item 1 of theDate + 4800 - theDay into theYear > put item 2 of theDate + (12 * theDay) - 3 into theMonth > put item 3 of theDate + \ > ((153 * theMonth + 2) div 5) + \ > (365 * theYear) + \ > (theYear div 4) - \ > (theYear div 100) + \ > (theYear div 400) - \ > 32045 into theDate > break > case "standard" > put format("%02d/%02d/%04d", item 2 of theDate, item 3 of theDate, \ > item 1 of theDate) into theDate > break > default > -- answer info "'" & theFormat & "' is not a valid parameter." As sheet > put tSavedDate into theDate > END SWITCH > > return theDate > END formatDate > > Bob S > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Wed Jun 12 18:10:19 2024 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Thu, 13 Jun 2024 00:10:19 +0200 Subject: Apple developer application and installer certificates In-Reply-To: References: Message-ID: Hello Tariel, renewing is very easy and takes only minutes. If you want, I can guide you through this process. Just contact me off-list. Regards, Matthias > Am 12.06.2024 um 17:07 schrieb Tariel Gogoberidze via use-livecode : > > Hello, > > I received message from apple that > > -- > Your Developer ID Installer Certificate will no longer be valid in 30 days. To generate a new certificate, sign in and visit Certificates, Identifiers & Profiles. > > And > > Your Developer ID Application Certificate will no longer be valid in 30 days. To generate a new certificate, sign in and visit Certificates, Identifiers & Profiles. > — > > We do have applications created in LiveCode that we are still selling (outside of apple store) but this applications were apple certified with the help of Matthias Rebbe and I have no idea how to renew or generate new Installer and Developer ID certificates. > > The remote colocation computer on which Matthias did this certification magic is still available to connect to and we do have apple developer account. So if Matthias or somebody else is willing to help (for a payment of course) I will appreciate it and will provide access to remote computer, apple developer ID and other necessary information. > > Regards > Tariel Gogoveridze > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From alex at tweedly.net Wed Jun 12 19:33:25 2024 From: alex at tweedly.net (Alex Tweedly) Date: Thu, 13 Jun 2024 00:33:25 +0100 Subject: Mosquitto library. In-Reply-To: References: Message-ID: On 12/06/2024 18:26, Richard Gaskin via use-livecode wrote: > Mike Kerner wrote: > >> Richard wrote: >>> Either way, I'd imagine a subscribe client looking to avoid polling >>> is going to depend on a long-lived socket, no? >> That's part of the point of a websocket. you don't have to keep >> reopening it, and both ends can use it, as needed. > Exactly, websockets are useful in browser apps because browsers don't offer direct socket support. > > LiveCode makes OS-native apps and supports sockets.\ If the "OS" is 'web', will LC support sockets? According to the dictionary, it doesn't = but that might (I hope) be out of date. But this might be the place we really need to use websockets. Alex. From MikeKerner at roadrunner.com Wed Jun 12 21:31:38 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Wed, 12 Jun 2024 21:31:38 -0400 Subject: Apple developer application and installer certificates In-Reply-To: References: Message-ID: for anyone else dropping into this thread, custom apps have to be rebuilt with a new cert, once per year. it's not a big deal, it's just something that has to be done. it takes a few minutes, max. On Wed, Jun 12, 2024 at 6:11 PM matthias rebbe via use-livecode < use-livecode at lists.runrev.com> wrote: > Hello Tariel, > > renewing is very easy and takes only minutes. If you want, I can guide you > through this process. > Just contact me off-list. > > Regards, > Matthias > > > Am 12.06.2024 um 17:07 schrieb Tariel Gogoberidze via use-livecode < > use-livecode at lists.runrev.com>: > > > > Hello, > > > > I received message from apple that > > > > -- > > Your Developer ID Installer Certificate will no longer be valid in 30 > days. To generate a new certificate, sign in and visit Certificates, > Identifiers & Profiles. > > > > And > > > > Your Developer ID Application Certificate will no longer be valid in 30 > days. To generate a new certificate, sign in and visit Certificates, > Identifiers & Profiles. > > — > > > > We do have applications created in LiveCode that we are still selling > (outside of apple store) but this applications were apple certified with > the help of Matthias Rebbe and I have no idea how to renew or generate new > Installer and Developer ID certificates. > > > > The remote colocation computer on which Matthias did this certification > magic is still available to connect to and we do have apple developer > account. So if Matthias or somebody else is willing to help (for a payment > of course) I will appreciate it and will provide access to remote computer, > apple developer ID and other necessary information. > > > > Regards > > Tariel Gogoveridze > > > > > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From scott at elementarysoftware.com Wed Jun 12 21:53:19 2024 From: scott at elementarysoftware.com (scott at elementarysoftware.com) Date: Wed, 12 Jun 2024 18:53:19 -0700 Subject: iPad Keyboard and rawKeyDown Message-ID: <00242C07-E0C5-4961-9E7F-4685E5419A2D@elementarysoftware.com> I’m new to using a physical keyboard with an iPad and haven’t ever done any testing to see if it worked in LiveCode. My recent experience using the new “Magic Keyboard for iPad Pro" is that rawKeyDown (and rawKeyUp) messages are not being handled by LiveCode. Is this a general failing of mobileKeyboards (the dictionary suggests not) an issue with just this newly released keyboard… or perhaps the more likely problem of developer error? Just checking in before I submit a bug (or enhancement?) report. -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com email scott at elementarysoftware.com booth 1-360-734-4701 ------------------------------------------------------ From tom at makeshyft.com Wed Jun 12 21:58:35 2024 From: tom at makeshyft.com (Tom Glod) Date: Wed, 12 Jun 2024 21:58:35 -0400 Subject: Mosquitto library. In-Reply-To: References: Message-ID: I was just viewitng the "livecode" tag on github. and saw this library. https://github.com/trevordevore/lc-mosquitto Trevor is prolific. Big respect. On Wed, Jun 12, 2024 at 7:33 PM Alex Tweedly via use-livecode < use-livecode at lists.runrev.com> wrote: > > On 12/06/2024 18:26, Richard Gaskin via use-livecode wrote: > > Mike Kerner wrote: > > > >> Richard wrote: > >>> Either way, I'd imagine a subscribe client looking to avoid polling > >>> is going to depend on a long-lived socket, no? > >> That's part of the point of a websocket. you don't have to keep > >> reopening it, and both ends can use it, as needed. > > Exactly, websockets are useful in browser apps because browsers don't > offer direct socket support. > > > > LiveCode makes OS-native apps and supports sockets.\ > > If the "OS" is 'web', will LC support sockets? > > According to the dictionary, it doesn't = but that might (I hope) be out > of date. But this might be the place we really need to use websockets. > > Alex. > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From jbv at souslelogo.com Thu Jun 13 04:28:32 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Thu, 13 Jun 2024 04:28:32 -0400 Subject: Different borders for a group Message-ID: <6d092a14185510ca84acee1d4829ebd5@souslelogo.com> Hi list, Is there a way to have different border widths and colors for the top and the bottom of a group ? Or should I include graphic lines inside the group ? Thank you in advance. jbv From craig at starfirelighting.com Thu Jun 13 09:51:11 2024 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 13 Jun 2024 09:51:11 -0400 Subject: Different borders for a group In-Reply-To: <6d092a14185510ca84acee1d4829ebd5@souslelogo.com> References: <6d092a14185510ca84acee1d4829ebd5@souslelogo.com> Message-ID: <1F83D27E-51E2-49D8-8760-3B9B7917CB20@starfirelighting.com> Hi. The borderWidth is a property of the entire border. You will have to add your own one by one. Hey, at least that allows you to change colors and other things as well. Craig > On Jun 13, 2024, at 4:28 AM, jbv via use-livecode wrote: > > Hi list, > > Is there a way to have different border widths and colors > for the top and the bottom of a group ? > Or should I include graphic lines inside the group ? > > Thank you in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Thu Jun 13 09:54:53 2024 From: craig at starfirelighting.com (Craig Newman) Date: Thu, 13 Jun 2024 09:54:53 -0400 Subject: Pop Combo Menu In-Reply-To: References: <46071E44-B038-4F51-B132-2153B0C52F2C@iotecdigital.com> <01730778-22f4-4da4-b405-8c0996f5e479@researchware.com> <4057168b-c094-46b4-a9c1-ba85ecc177bb@researchware.com> Message-ID: <88036E20-765A-4951-8119-94909012CF9D@starfirelighting.com> "I was hoping I could do it without a click.” Why? That works like a charm, and does not even make the slightest sound. Craig > On Jun 12, 2024, at 4:23 PM, Bob Sneidar via use-livecode wrote: > > I was hoping I could do it without a click. From klaus at major-k.de Fri Jun 14 14:19:59 2024 From: klaus at major-k.de (Klaus major-k) Date: Fri, 14 Jun 2024 20:19:59 +0200 Subject: Survey: Would you buy one or more widgets from the PRO PACK separately? Message-ID: Hi friends, Livecode is selling most of their widgets separately, however not the ones from the PRO PACK: Mobile Debugger Script Profiler tsNet PRO mergAccessory PDF Viewer But unfortunately the PRO PACK is quite expensive: 328.90 Euro PLUS VAT! I am sure most of you do not need all the widgets in the PRO PACK, but maybe one or two of them. So please just write if you'd like to buy one or more of these, maybe we can induce LC to also sell them separately. ---------- I confess that this is a quite selfish idea from me, I only use the PDF Viewer widget in my freeware* app and the app exclusively made for my band mates, three of us use an iPad and two of us an Android tablet. *It's actually "donationware", but noone donated any money so far in the last couple of years. :-/ I bought the complete PRO Pack in the last three years, although I ONLY need the PDF viewer, but cannot afford this anymore. Especially since I do not earn any money with my apps and I need to renew my Apple Developer Membership in october. I would LOVE to buy just the PDF widget separately! Thank you for reading! P.S. Since Android browser cannot display PDF files out of the box, this is no alternative for me. Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From paul at researchware.com Fri Jun 14 15:01:24 2024 From: paul at researchware.com (Paul Dupuis) Date: Fri, 14 Jun 2024 15:01:24 -0400 Subject: Survey: Would you buy one or more widgets from the PRO PACK separately? In-Reply-To: References: Message-ID: <3d26732c-1135-4dd8-a891-cbd69e8181ba@researchware.com> Of those listed, I would pay for (if I needed to, but I have the full LC that includes extensions) the PDF Viewer and, possibly, tsNet PRO I do not develop for mobile, so mobile widgets are not of any immediate interest. On 6/14/2024 2:19 PM, Klaus major-k via use-livecode wrote: > Hi friends, > > Livecode is selling most of their widgets separately, > however not the ones from the PRO PACK: > Mobile Debugger > Script Profiler > tsNet PRO > mergAccessory > PDF Viewer > > But unfortunately the PRO PACK is quite expensive: > 328.90 Euro PLUS VAT! > > I am sure most of you do not need all the widgets in the > PRO PACK, but maybe one or two of them. > > So please just write if you'd like to buy one or more of these, > maybe we can induce LC to also sell them separately. > > ---------- > > I confess that this is a quite selfish idea from me, I only > use the PDF Viewer widget in my freeware* app and the > app exclusively made for my band mates, three of us use > an iPad and two of us an Android tablet. > > *It's actually "donationware", but noone donated any money > so far in the last couple of years. :-/ > > I bought the complete PRO Pack in the last three years, > although I ONLY need the PDF viewer, but cannot afford > this anymore. Especially since I do not earn any money > with my apps and I need to renew my Apple Developer > Membership in october. > > I would LOVE to buy just the PDF widget separately! > > Thank you for reading! > > P.S. > Since Android browser cannot display PDF files out of the box, > this is no alternative for me. > > > Best > > Klaus > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > klaus at major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From MikeKerner at roadrunner.com Mon Jun 17 10:26:53 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Mon, 17 Jun 2024 10:26:53 -0400 Subject: Hacking LiveCode In-Reply-To: References: Message-ID: the lc hack repo has been updated with more goodness from mark wieder. mark added more patches to powerPlug and more ways to apply patches to powerStrip examples: * can handle object scripts * can now add missing functions * new PowerPlugs for additional bugfixes On Sun, Sep 25, 2022 at 5:57 PM Mike Kerner wrote: > that's one of the things i'm wondering about, like "did you uninstall it, > or just unload it, or did you uninstall it but not unload it? did you build > a new version in the test environment and test that against an existing > install?" > it's been days since i ran into this, and the only notes that i have on it > are that i ran into it. i didn't keep track of the recipe. > > > On Sun, Sep 25, 2022 at 5:08 PM Brian Milby via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Did you restart LiveCode after installing the updated widget? >> >> Brian Milby >> brian at milby7.com >> >> > On Sep 25, 2022, at 4:53 PM, Mike Kerner via use-livecode < >> use-livecode at lists.runrev.com> wrote: >> > >> > 1. is that documented, somewhere, because i cannot find it. >> > 2. that isn't the problem i was having. the problem i was having was >> that >> > if i took a widget (navRad, for instance), and added code to it, then >> > installed the new version, preexisting copies of the widget would not >> > execute the new code. new copies would. >> > so, it's 100% possible that i discovered some other behavior, but after >> > testing it a few times, instead of documenting the recipe, i accepted >> that >> > this was the behavior, and went about addressing it. except, today, >> when i >> > tested it, the behavior is the one that you would want (in unbuilt apps, >> > behaviors in newer versions of the widget are reflected in existing >> copies >> > of the widget). so i have to go replicate the behavior, again and >> develop a >> > recipe, again. >> > 3. fortunately or not, chasing this particular bear for days has >> resulted >> > in a snippet in the hack repo which i hope extracts all properties for >> an >> > object, standard or specific. >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > > -- > On the first day, God created the heavens and the Earth > On the second day, God created the oceans. > On the third day, God put the animals on hold for a few hours, > and did a little diving. > And God said, "This is good." > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From klaus at major-k.de Tue Jun 18 06:34:57 2024 From: klaus at major-k.de (Klaus major-k) Date: Tue, 18 Jun 2024 12:34:57 +0200 Subject: Survey: Would you buy one or more widgets from the PRO PACK separately? In-Reply-To: <3d26732c-1135-4dd8-a891-cbd69e8181ba@researchware.com> References: <3d26732c-1135-4dd8-a891-cbd69e8181ba@researchware.com> Message-ID: <55BD4EEB-E61A-4B5A-88B8-C5A408C63BB1@major-k.de> Hi Paul, > Am 14.06.2024 um 21:01 schrieb Paul Dupuis via use-livecode : > > Of those listed, I would pay for (if I needed to, but I have the full LC that includes extensions) the PDF Viewer and, possibly, tsNet PRO > I do not develop for mobile, so mobile widgets are not of any immediate interest. sorry for the late response, thank you very much for you feedback! > On 6/14/2024 2:19 PM, Klaus major-k via use-livecode wrote: >> Hi friends, >> >> Livecode is selling most of their widgets separately, >> however not the ones from the PRO PACK: >> Mobile Debugger >> Script Profiler >> tsNet PRO >> mergAccessory >> PDF Viewer >> >> But unfortunately the PRO PACK is quite expensive: >> 328.90 Euro PLUS VAT! >> >> I am sure most of you do not need all the widgets in the >> PRO PACK, but maybe one or two of them. >> >> So please just write if you'd like to buy one or more of these, >> maybe we can induce LC to also sell them separately. >> >> ---------- >> >> I confess that this is a quite selfish idea from me, I only >> use the PDF Viewer widget in my freeware* app and the >> app exclusively made for my band mates, three of us use >> an iPad and two of us an Android tablet. >> >> *It's actually "donationware", but noone donated any money >> so far in the last couple of years. :-/ >> >> I bought the complete PRO Pack in the last three years, >> although I ONLY need the PDF viewer, but cannot afford >> this anymore. Especially since I do not earn any money >> with my apps and I need to renew my Apple Developer >> Membership in october. >> >> I would LOVE to buy just the PDF widget separately! >> >> Thank you for reading! >> >> P.S. >> Since Android browser cannot display PDF files out of the box, >> this is no alternative for me. Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass klaus at major-k.de From panos.merakos at livecode.com Thu Jun 20 09:49:17 2024 From: panos.merakos at livecode.com (panagiotis merakos) Date: Thu, 20 Jun 2024 16:49:17 +0300 Subject: [[ ANN ]] Release 9.6.12 Message-ID: Dear list members, We are pleased to announce the release of LiveCode 9.6.12 STABLE. LiveCode 9.6.12 STABLE comes with 19 bugfixes and performance improvements since the last stable version, including support for adding a privacy manifest in your iOS app, which is a new requirement for AppStore submissions. You can find more details on the bug fixes and improvements of this new release here: https://livecode.com/release-9-6-12-stable/ You can find the release in your LiveCode account area or get it via the automatic updater. Enjoy! Kind regards The LiveCode Team -- From jbv at souslelogo.com Fri Jun 21 07:15:41 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Fri, 21 Jun 2024 07:15:41 -0400 Subject: Copying groups Message-ID: <42d886e9d09d2582d52d0fb751dcd2ed@souslelogo.com> Hi list, I have a single card stack containing several groups, each group containing several fields and images. I need to copy these groups to a substack. I use : copy grp tname of cd 1 of this stack to cd 1 of stack myTarget The weird thing is that all groups are copied, but the text content of every field is missing. What did I miss ? Thank you in advance. jbv From merakosp at gmail.com Fri Jun 21 08:44:14 2024 From: merakosp at gmail.com (panagiotis merakos) Date: Fri, 21 Jun 2024 15:44:14 +0300 Subject: Copying groups In-Reply-To: <42d886e9d09d2582d52d0fb751dcd2ed@souslelogo.com> References: <42d886e9d09d2582d52d0fb751dcd2ed@souslelogo.com> Message-ID: Hello jbv, What is the sharedText property of the field(s)? I _think_ it has to be true in your use case. Kind regards, Panos -- On Fri, 21 Jun 2024 at 14:16, jbv via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi list, > > I have a single card stack containing several groups, > each group containing several fields and images. > I need to copy these groups to a substack. > I use : > copy grp tname of cd 1 of this stack to cd 1 of stack myTarget > > The weird thing is that all groups are copied, but the text > content of every field is missing. > What did I miss ? > > Thank you in advance. > jbv > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From jbv at souslelogo.com Fri Jun 21 08:57:24 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Fri, 21 Jun 2024 08:57:24 -0400 Subject: Copying groups In-Reply-To: References: <42d886e9d09d2582d52d0fb751dcd2ed@souslelogo.com> Message-ID: <871eb07b6b397a9e856232a56ef5272e@souslelogo.com> Hello, Yes, indeed, the sharedText property of the field(s) need to be set to true. Many thanks. jbv Le 2024-06-21 08:44, panagiotis merakos via use-livecode a crit : > Hello jbv, > > What is the sharedText property of the field(s)? I _think_ it has to be > true in your use case. > > Kind regards, > Panos > -- > > On Fri, 21 Jun 2024 at 14:16, jbv via use-livecode < > use-livecode at lists.runrev.com> wrote: > >> Hi list, >> >> I have a single card stack containing several groups, >> each group containing several fields and images. >> I need to copy these groups to a substack. >> I use : >> copy grp tname of cd 1 of this stack to cd 1 of stack myTarget >> >> The weird thing is that all groups are copied, but the text >> content of every field is missing. >> What did I miss ? >> >> Thank you in advance. >> jbv >> From jbv at souslelogo.com Fri Jun 21 11:13:35 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Fri, 21 Jun 2024 11:13:35 -0400 Subject: Printing to pdf Message-ID: <568ef2bd8e342c3c15b5db8ae5301d80@souslelogo.com> Hi list, I have a stack with several cards 750 x 1000px. I am trying to print these cards as pdf, but according to this lesson https://lessons.livecode.com/m/4071/l/29177-how-to-create-pdfs-using-livecode the stack size should be 575 x 800 to fit a A4 document ratio. Is it possible to "force" the printing to different sizes, without clipping the content of the cards ? I tried : print card x into 0,0,750,1000 but the cards are still clipped. The pdf I need to build is not for printing, only for reading on screen. Thank you in advance. jbv From jbv at souslelogo.com Fri Jun 21 11:21:34 2024 From: jbv at souslelogo.com (jbv at souslelogo.com) Date: Fri, 21 Jun 2024 11:21:34 -0400 Subject: Printing to pdf In-Reply-To: <568ef2bd8e342c3c15b5db8ae5301d80@souslelogo.com> References: <568ef2bd8e342c3c15b5db8ae5301d80@souslelogo.com> Message-ID: <54c5259bacf1184498d0368549aefdbb@souslelogo.com> Nevermind, I found the solution : I modified the printScale property. Best From bobsneidar at iotecdigital.com Fri Jun 21 16:30:28 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 21 Jun 2024 20:30:28 +0000 Subject: Windows SE how to clone while dragging Message-ID: <323CA777-0D10-4B04-AC1E-D38377767FAC@iotecdigital.com> On the MacOS LC SE, I can hold the optionKey down while dragging some selected text and it will clone the selection rather than just move it. For some reason, in LC for Windows SE, it still only moves the selected text. Bummer! Is there a key combo for cloning? If not, WHY? Bob S From curry at pair.com Sun Jun 23 05:36:06 2024 From: curry at pair.com (Curry Kenworthy) Date: Sun, 23 Jun 2024 05:36:06 -0400 Subject: Windows SE how to clone while dragging In-Reply-To: <323CA777-0D10-4B04-AC1E-D38377767FAC@iotecdigital.com> References: <323CA777-0D10-4B04-AC1E-D38377767FAC@iotecdigital.com> Message-ID: Bob: > On the MacOS LC SE, I can hold the optionKey down while dragging > some selected text and it will clone the selection ... > Windows SE ... Is there a key combo for cloning? Ctrl. Best wishes, Curry Kenworthy Radically Innovative Christian LiveCode Development "PASSION for Elegant, Efficient Code!" https://livecodeconsulting.com/ From bobsneidar at iotecdigital.com Mon Jun 24 11:57:13 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 24 Jun 2024 15:57:13 +0000 Subject: Windows SE how to clone while dragging In-Reply-To: References: <323CA777-0D10-4B04-AC1E-D38377767FAC@iotecdigital.com> Message-ID: Right you are. I would have sworn I tried that! Bob S > On Jun 23, 2024, at 2:36 AM, Curry Kenworthy via use-livecode wrote: > > Bob: > > > On the MacOS LC SE, I can hold the optionKey down while dragging > > some selected text and it will clone the selection ... > > > Windows SE ... Is there a key combo for cloning? > > Ctrl. > > Best wishes, > > Curry Kenworthy > > Radically Innovative Christian LiveCode Development > "PASSION for Elegant, Efficient Code!" > https://livecodeconsulting.com/ From bobsneidar at iotecdigital.com Mon Jun 24 12:22:08 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Mon, 24 Jun 2024 16:22:08 +0000 Subject: Socket Packaging Message-ID: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> Hi all. I came up with deceptively simple wrappers for packaging data for transmission over raw sockets. I can’t send the slyEncrypt and slyDecrypt handlers because I use methods no one else knows. But you can roll your own or else eliminate encryption altogether. And to answer the question befor it’s asked, I don’t use SSL because I don’t like having to deal with certificates, and also because I use a method for encryption that I don’t think anyone else has thought of, or at least I can’t find any info online. Bob S command packagePayload @pPayload, pUseEncryption if pPayload is an array then \ put arrayEncode(pPayload) into pPayload if pUseEncryption then \ put slyEncrypt(pPayload) into pPayload put base64Encode(pPayload) into pPayload end packagePayload command unpackPayload @pPayload put base64Decode(pPayload) into pPayload if pPayload begins with "salted" then \ put slyDecrypt(pPayload) into pPayload try put arrayDecode(pPayload) into tResult put tResult into pPayload catch tError -- not an array end try end unpackPayload From MikeKerner at roadrunner.com Mon Jun 24 13:54:35 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Mon, 24 Jun 2024 13:54:35 -0400 Subject: Socket Packaging In-Reply-To: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> References: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> Message-ID: have a look at caddy. it allows you to reverse proxy and have the best of both worlds: * server traffic to and from caddy is in the clear, so less mess * caddy handles all the cert silliness, while also giving you ssl to/from the clients we've been doing this for two years (maybe it's three, now). it works great, and i never have to think about it. also, the configuration was really, really simple. On Mon, Jun 24, 2024 at 12:23 PM Bob Sneidar via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi all. > > I came up with deceptively simple wrappers for packaging data for > transmission over raw sockets. I can’t send the slyEncrypt and slyDecrypt > handlers because I use methods no one else knows. But you can roll your own > or else eliminate encryption altogether. > > And to answer the question befor it’s asked, I don’t use SSL because I > don’t like having to deal with certificates, and also because I use a > method for encryption that I don’t think anyone else has thought of, or at > least I can’t find any info online. > > Bob S > > command packagePayload @pPayload, pUseEncryption > if pPayload is an array then \ > put arrayEncode(pPayload) into pPayload > > if pUseEncryption then \ > put slyEncrypt(pPayload) into pPayload > > put base64Encode(pPayload) into pPayload > end packagePayload > > command unpackPayload @pPayload > put base64Decode(pPayload) into pPayload > > if pPayload begins with "salted" then \ > put slyDecrypt(pPayload) into pPayload > > try > put arrayDecode(pPayload) into tResult > put tResult into pPayload > catch tError > -- not an array > end try > end unpackPayload > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From david.bovill at gmail.com Mon Jun 24 15:01:35 2024 From: david.bovill at gmail.com (David Bovill) Date: Mon, 24 Jun 2024 20:01:35 +0100 Subject: Socket Packaging In-Reply-To: References: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> Message-ID: Yes, I recently looked at a few reverse proxies. I now run Caddy on localhost and have some scripts to manage caddyfiles and starting and stopping the caddy server. Happy to show share if interested in a Zoom. On Mon, 24 Jun 2024 at 18:56, Mike Kerner via use-livecode < use-livecode at lists.runrev.com> wrote: > have a look at caddy. it allows you to reverse proxy and have the best of > both worlds: > * server traffic to and from caddy is in the clear, so less mess > * caddy handles all the cert silliness, while also giving you ssl to/from > the clients > we've been doing this for two years (maybe it's three, now). it works > great, and i never have to think about it. > also, the configuration was really, really simple. > > On Mon, Jun 24, 2024 at 12:23 PM Bob Sneidar via use-livecode < > use-livecode at lists.runrev.com> wrote: > > > Hi all. > > > > I came up with deceptively simple wrappers for packaging data for > > transmission over raw sockets. I can’t send the slyEncrypt and slyDecrypt > > handlers because I use methods no one else knows. But you can roll your > own > > or else eliminate encryption altogether. > > > > And to answer the question befor it’s asked, I don’t use SSL because I > > don’t like having to deal with certificates, and also because I use a > > method for encryption that I don’t think anyone else has thought of, or > at > > least I can’t find any info online. > > > > Bob S > > > > command packagePayload @pPayload, pUseEncryption > > if pPayload is an array then \ > > put arrayEncode(pPayload) into pPayload > > > > if pUseEncryption then \ > > put slyEncrypt(pPayload) into pPayload > > > > put base64Encode(pPayload) into pPayload > > end packagePayload > > > > command unpackPayload @pPayload > > put base64Decode(pPayload) into pPayload > > > > if pPayload begins with "salted" then \ > > put slyDecrypt(pPayload) into pPayload > > > > try > > put arrayDecode(pPayload) into tResult > > put tResult into pPayload > > catch tError > > -- not an array > > end try > > end unpackPayload > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode at lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > -- > On the first day, God created the heavens and the Earth > On the second day, God created the oceans. > On the third day, God put the animals on hold for a few hours, > and did a little diving. > And God said, "This is good." > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > From ambassador at fourthworld.com Mon Jun 24 18:07:08 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Mon, 24 Jun 2024 22:07:08 +0000 Subject: Socket Packaging Message-ID: <95250661daac2f77cab67805bb87f3bfec07ca7f@fourthworld.com> Bob Sneidar wrote: > I don’t use SSL because I don’t like having to deal with certificates, > and also because I use a method for encryption that I don’t think > anyone else has thought of, or at least I can’t find any info online. Encryption is half of what SSL offers, the other half being external validation that the server you're trying to reach hasn't been spoofed. I used to roll my own but these days I have audit compliance to meet, so I just do things the OG way. For those of you who need a cert on any modern Ubuntu, it's now a one-liner: sudo apt install certbot python3-certbot-apache Run that, follow the prompts, and you're good to go in seconds. Details: https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04 Of course it never hurts to do belt AND suspenders, so your encrpyted packaging can offer a second layer of protection for critical needs. Richard Gaskin FourthWorld.com From paul at researchware.com Tue Jun 25 16:35:31 2024 From: paul at researchware.com (Paul Dupuis) Date: Tue, 25 Jun 2024 16:35:31 -0400 Subject: eMail attachment: best practice? Message-ID: Under a specific condition, my app creates an email with some pre-populated information using revMail: revMail address, [ccAddress, [mailSubject, [messageBody]]] So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. I realize the user still has to click their send button in their email client, but I have 2 questions: 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? From marksmithhfx at gmail.com Tue Jun 25 17:46:47 2024 From: marksmithhfx at gmail.com (Mark Smith) Date: Tue, 25 Jun 2024 22:46:47 +0100 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: I’ve not used revMail but it’s certainly well documented in mobileComposeHtmlMail. If you need an example PM me. Mark > On 25 Jun 2024, at 9:35 PM, Paul Dupuis via use-livecode wrote: > > 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? > From matthias_livecode_150811 at m-r-d.de Tue Jun 25 18:15:35 2024 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Wed, 26 Jun 2024 00:15:35 +0200 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. Here you can find an sample stack https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode And here is a link to a Livecode Lesson https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external > Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : > > Under a specific condition, my app creates an email with some pre-populated information using revMail: > > revMail address, [ccAddress, [mailSubject, [messageBody]]] > > So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody > Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. > > I realize the user still has to click their send button in their email client, but I have 2 questions: > > 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware > > 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 25 18:54:07 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 25 Jun 2024 22:54:07 +0000 Subject: eMail attachment: best practice? In-Reply-To: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> References: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> Message-ID: <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> The demo stack URL in the script does not look right. I have never used a URL in the form of SMTP://:587/ before. That can’t be right! Bob S > On Jun 25, 2024, at 3:15 PM, matthias rebbe via use-livecode wrote: > > Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. > > The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. > > Here you can find an sample stack > https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode > > And here is a link to a Livecode Lesson > https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external > > > >> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >> >> Under a specific condition, my app creates an email with some pre-populated information using revMail: >> >> revMail address, [ccAddress, [mailSubject, [messageBody]]] >> >> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >> >> I realize the user still has to click their send button in their email client, but I have 2 questions: >> >> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >> >> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Tue Jun 25 19:01:38 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Tue, 25 Jun 2024 23:01:38 +0000 Subject: eMail attachment: best practice? In-Reply-To: <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> References: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> Message-ID: <4CD699B4-9876-4C0A-867D-F8FB3A56C8CC@iotecdigital.com> I used a properly formatted “url” (it’s not actually a URL) for the server and got a response from the server, so I am communicating, but it’s generating an error even though the user name and password are correct (They are my credentials.) Also, considering that almost all servers are forcing the use of 2 factor or Multi-factor authentication these days, it’s probably just better to use the local mail client. Bob S > On Jun 25, 2024, at 3:53 PM, Bob Sneidar wrote: > > The demo stack URL in the script does not look right. I have never used a URL in the form of SMTP://:587/ before. That can’t be right! > > Bob S > > >> On Jun 25, 2024, at 3:15 PM, matthias rebbe via use-livecode wrote: >> >> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >> >> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >> >> Here you can find an sample stack >> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >> >> And here is a link to a Livecode Lesson >> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >> >> >> >>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>> >>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>> >>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>> >>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>> >>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>> >>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>> >>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > From paul at researchware.com Tue Jun 25 20:47:34 2024 From: paul at researchware.com (Paul Dupuis) Date: Tue, 25 Jun 2024 20:47:34 -0400 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: <53a5d8f8-d010-46c1-a702-ec3a65dfb183@researchware.com> I should have mentioned that my app is for macOS and Windows - no iOS or Android version. On 6/25/2024 5:46 PM, Mark Smith wrote: > Ive not used revMail but its certainly well documented in > mobileComposeHtmlMail. If you need an example PM me. > > Mark > > >> On 25 Jun 2024, at 9:35PM, Paul Dupuis via use-livecode >> wrote: >> >> 2) My more important question is how does one create an email with an >> attached file? I see no feature of revMail to include an attachment. >> Is there some other way? If there is no way to add an attachment, >> what might the best practice for sending the contents and structure >> of a Livecode array be? >> > From matthias_livecode_150811 at m-r-d.de Wed Jun 26 03:34:48 2024 From: matthias_livecode_150811 at m-r-d.de (Matthias Rebbe) Date: Wed, 26 Jun 2024 09:34:48 +0200 Subject: eMail attachment: best practice? In-Reply-To: <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> References: <0467DA4A-AF24-43A9-9182-CFD69214E029@iotecdigital.com> Message-ID: <7394108E-089F-40F7-BD94-3B675130BF51@m-r-d.de> The url is right. The prefixes smtp:// smtps://, http:// https:// ftp:// ftps:// sftp:// and so tell the underlying tool which establish the connection to use that protocol. A trailing :587 means the connection should be established with port 587 If you are running for example a webserver on an other port than 80, e.g. 8080, you can would open use the following url in the web browser http://serverip:8080 Von meinem iPad gesendet > Am 26.06.2024 um 00:55 schrieb Bob Sneidar via use-livecode : > > The demo stack URL in the script does not look right. I have never used a URL in the form of SMTP://:587/ before. That can’t be right! > > Bob S > > >> On Jun 25, 2024, at 3:15 PM, matthias rebbe via use-livecode wrote: >> >> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >> >> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >> >> Here you can find an sample stack >> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >> >> And here is a link to a Livecode Lesson >> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >> >> >> >>>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>> >>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>> >>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>> >>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>> >>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>> >>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>> >>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Wed Jun 26 03:52:54 2024 From: matthias_livecode_150811 at m-r-d.de (Matthias Rebbe) Date: Wed, 26 Jun 2024 09:52:54 +0200 Subject: eMail attachment: best practice? In-Reply-To: <4CD699B4-9876-4C0A-867D-F8FB3A56C8CC@iotecdigital.com> References: <4CD699B4-9876-4C0A-867D-F8FB3A56C8CC@iotecdigital.com> Message-ID: I am not sure how many smtp servers support 2FA yet. If the mail client can connect to a mailserver then tsNET should also be able to. tsNET external uses a curl library. And if 2FA for SMTP gets more common, I am sure tsNet will be updated to support it. I am using tsNET in several projects for sending e-mails with logfiles and reports. This works w/o problems. Von meinem iPad gesendet > Am 26.06.2024 um 01:02 schrieb Bob Sneidar via use-livecode : > > I used a properly formatted “url” (it’s not actually a URL) for the server and got a response from the server, so I am communicating, but it’s generating an error even though the user name and password are correct (They are my credentials.) > > Also, considering that almost all servers are forcing the use of 2 factor or Multi-factor authentication these days, it’s probably just better to use the local mail client. > > Bob S > > >> On Jun 25, 2024, at 3:53 PM, Bob Sneidar wrote: >> >> The demo stack URL in the script does not look right. I have never used a URL in the form of SMTP://:587/ before. That can’t be right! >> >> Bob S >> >> >>>> On Jun 25, 2024, at 3:15 PM, matthias rebbe via use-livecode wrote: >>> >>> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >>> >>> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >>> >>> Here you can find an sample stack >>> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >>> >>> And here is a link to a Livecode Lesson >>> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >>> >>> >>> >>>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>>> >>>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>>> >>>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>>> >>>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>>> >>>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>>> >>>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>>> >>>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>>> >>>> >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From neville.smythe at optusnet.com.au Wed Jun 26 04:35:36 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Wed, 26 Jun 2024 18:35:36 +1000 Subject: Slow stack problem Message-ID: <109F54DF-1737-4C08-B6F7-694859F92D98@optusnet.com.au> I am plagued by a new problem which has arisen in an old stack that I have been using for years with hundreds of modifications over that time. It was still working well until suddenly in the last few week most of its data processing handlers have slowed to a crawl. A button that gathers text data from a number cards, does some text manipulations and then displays a modal dialog, that used to be instantaneous now takes 30 seconds to display the dialog. Another button which does extensive text gathering and processing now takes 30 minutes instead of 30 seconds. So I have done something to the data stack in the last few months. It is not a change of LC version or platform OS. A standalone I produced a couple of months ago does not display this slow behaviour when working on its old version of the data stack, but does show it when I apply it to the latest version of the data stack. But I am at loss to figure out what setting I might have changed or what else I could have done. I did not change the scripts of the offending buttons since the previous version, so it sounds like a setting change. The stack behaves as if the processing buttons have difficulty finding all the necessary handlers, or as if it is it reporting in to Shanghai or Virginia between handler calls. I don’t believe the stack is actually corrupted, actions such as scrolling fields or moving between cards all work as normal. The only other piece of information is that the CPU ramps up to 100% use in one core , so it is doing something - but what? (Memory usage goes up to 500MB but does not keep climbing, unlikely to be a memory leak or virtual memory swapping (hmmm?)) I have tried to compare the differences between the old and new version of the stacks as files using BBEdit, but most differences seem to be in binary data at the end of the files, whose meaning is opaque. Any ideas as to what might be causing this, or how I might go about diagnosis, would be hugely welcome. Neville Smytis From paul at researchware.com Wed Jun 26 09:00:00 2024 From: paul at researchware.com (Paul Dupuis) Date: Wed, 26 Jun 2024 09:00:00 -0400 Subject: eMail attachment: best practice? In-Reply-To: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> References: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> Message-ID: So this tsNet example for sending an email look great IF you are using it in an corporate or institutional setting. One where you have a known SMTP server and you know whether or not that SMTP server requires authentication. However, in the "wild" of a distributed application that could be on any customer's computer in any setting, how do you know what the customer's SMTP server is or whether it requires authentication. If it does require authentication, most people set this up in their email client ONCE (or rarely) and may not know or remember what the credentials are. So I considered using our company SMTP server, but increasingly, SMTP servers will reject messages if they are from a client computer that is not in the same domain, as is the case with ours (for anti-spamming/spoofing), so that it out as an option. I kinda need a solution that uses the clients own email client (and server). Maybe I should look at how to encode the array in a pure text form that can be part of the email body and send it that way. The problem there is that some email clients (like gMail) limit the size of the message body that can be generated from their APIs. If you use revMail with someone with gMail as their default mail, the message body can only be about 2500 characters (or maybe 5000, I forget the exact limit). I suppose I could output the array as an encoded file to the customer's desktop and ASK them to manually attach it to the generated email? I wish there was a better option. On 6/25/2024 6:15 PM, matthias rebbe via use-livecode wrote: > Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. > > The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. > > Here you can find an sample stack > https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode > > And here is a link to a Livecode Lesson > https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external > > > >> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >> >> Under a specific condition, my app creates an email with some pre-populated information using revMail: >> >> revMail address, [ccAddress, [mailSubject, [messageBody]]] >> >> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >> >> I realize the user still has to click their send button in their email client, but I have 2 questions: >> >> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >> >> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From craig at starfirelighting.com Wed Jun 26 09:33:13 2024 From: craig at starfirelighting.com (Craig Newman) Date: Wed, 26 Jun 2024 09:33:13 -0400 Subject: Slow stack problem In-Reply-To: <109F54DF-1737-4C08-B6F7-694859F92D98@optusnet.com.au> References: <109F54DF-1737-4C08-B6F7-694859F92D98@optusnet.com.au> Message-ID: <90311837-7AEF-41A7-9284-2B81154FE80A@starfirelighting.com> Have you tried trashing the LC preferences? Have you tried the recent stack with a different data stack, or perhaps one with less data? Craig > On Jun 26, 2024, at 4:35 AM, Neville Smythe via use-livecode wrote: > > I am plagued by a new problem which has arisen in an old stack that I have been using for years with hundreds of modifications over that time. It was still working well until suddenly in the last few week most of its data processing handlers have slowed to a crawl. A button that gathers text data from a number cards, does some text manipulations and then displays a modal dialog, that used to be instantaneous now takes 30 seconds to display the dialog. Another button which does extensive text gathering and processing now takes 30 minutes instead of 30 seconds. > > So I have done something to the data stack in the last few months. It is not a change of LC version or platform OS. A standalone I produced a couple of months ago does not display this slow behaviour when working on its old version of the data stack, but does show it when I apply it to the latest version of the data stack. > > But I am at loss to figure out what setting I might have changed or what else I could have done. I did not change the scripts of the offending buttons since the previous version, so it sounds like a setting change. The stack behaves as if the processing buttons have difficulty finding all the necessary handlers, or as if it is it reporting in to Shanghai or Virginia between handler calls. I don’t believe the stack is actually corrupted, actions such as scrolling fields or moving between cards all work as normal. The only other piece of information is that the CPU ramps up to 100% use in one core , so it is doing something - but what? (Memory usage goes up to 500MB but does not keep climbing, unlikely to be a memory leak or virtual memory swapping (hmmm?)) > > I have tried to compare the differences between the old and new version of the stacks as files using BBEdit, but most differences seem to be in binary data at the end of the files, whose meaning is opaque. > > Any ideas as to what might be causing this, or how I might go about diagnosis, would be hugely welcome. > > > Neville Smytis > > > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Wed Jun 26 11:18:00 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Wed, 26 Jun 2024 15:18:00 +0000 Subject: eMail attachment: best practice? In-Reply-To: References: <3101B27D-2702-4310-A37C-3BFB2FE1799B@m-r-d.de> Message-ID: <7F91DB47-7D17-4CF6-ADB3-6E420B375E0E@iotecdigital.com> You would need to present the user with an interface where they can enter their corporate or business SMTP information, then use that. But more mail providers are forcing MFA these days (as I mentioned) and Microsoft has even gone so far as to completely disable ALL SMTP relaying when Modern Security is enabled, and are progressively enforcing Modern Security permanently. Mail Clients that communicate with Office365 do not use SMTP, they use MAPI so they are not effected. The only thing I can suggest is to subscribe to a web based SMTP relay. Bundle the cost of that (which isn’t very much) into the price of your product. Bob S > On Jun 26, 2024, at 6:00 AM, Paul Dupuis via use-livecode wrote: > > So this tsNet example for sending an email look great IF you are using it in an corporate or institutional setting. One where you have a known SMTP server and you know whether or not that SMTP server requires authentication. > > However, in the "wild" of a distributed application that could be on any customer's computer in any setting, how do you know what the customer's SMTP server is or whether it requires authentication. If it does require authentication, most people set this up in their email client ONCE (or rarely) and may not know or remember what the credentials are. > > So I considered using our company SMTP server, but increasingly, SMTP servers will reject messages if they are from a client computer that is not in the same domain, as is the case with ours (for anti-spamming/spoofing), so that it out as an option. > > I kinda need a solution that uses the clients own email client (and server). Maybe I should look at how to encode the array in a pure text form that can be part of the email body and send it that way. The problem there is that some email clients (like gMail) limit the size of the message body that can be generated from their APIs. If you use revMail with someone with gMail as their default mail, the message body can only be about 2500 characters (or maybe 5000, I forget the exact limit). > > I suppose I could output the array as an encoded file to the customer's desktop and ASK them to manually attach it to the generated email? I wish there was a better option. > > > On 6/25/2024 6:15 PM, matthias rebbe via use-livecode wrote: >> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >> >> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >> >> Here you can find an sample stack >> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >> >> And here is a link to a Livecode Lesson >> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >> >> >> >>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>> >>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>> >>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>> >>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>> >>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>> >>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>> >>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From matthias_livecode_150811 at m-r-d.de Wed Jun 26 17:25:09 2024 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Wed, 26 Jun 2024 23:25:09 +0200 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: Von meinem iPad gesendet > Am 26.06.2024 um 15:01 schrieb Paul Dupuis via use-livecode : > > So this tsNet example for sending an email look great IF you are using it in an corporate or institutional setting. One where you have a known SMTP server and you know whether or not that SMTP server requires authentication. > However, in the "wild" of a distributed application that could be on any customer's computer in any setting, how do you know what the customer's SMTP server is or whether it requires authentication. If it does require authentication, most people set Your app needs to have a card or substack where the customers can add their mail account login data and the server ip or name and all the other information they would enter when adding an email account to their e-mail client. > this up in their email client ONCE (or rarely) and may not know or remember what the credentials are. > Those people would also run into trouble if they switch to another e-mail client or if they get a new computer where they have to setup the e-mail client again. This is not an email problem per se, but rather the problem that users are not doing proper password management. > So I considered using our company SMTP server, but increasingly, SMTP servers will reject messages if they are from a client computer that is not in the same domain, as is the case with ours (for anti-spamming/spoofing), so that it out as an option. > What exactly did you want to do? Use the server to send e-mails to internal accounts on that server? Or did you want to use that server as a relay server to send emails to external e-mail addresses? To do that you normally need an e-mail account on that server and your account needs to have the right to send external e-mails and you need to have to authenticate on that server when sending the e-mails to external users. > I kinda need a solution that uses the clients own email client (and server). tsNet behaves like an e-mail client. If the customer now there e-mail credentials and other information for setting up an e-mail client and if your app allows to enter those information, then tsNet will work without a problem. Maybe with one exception. If the server only allows 2FA for the e-mail clients, then tsNet needs to support this. Maybe this is already the case, maybe not. This is a question Charles Warwick or Livecode Support could answer > Maybe I should look at how to encode the array in a pure text form that can be part of the email body and send it that way. The problem there is that some email clients (like gMail) limit the size of the message body that can be generated from their APIs. If you use revMail with someone with gMail as their default mail, the message body can only be about 2500 characters (or maybe 5000, I forget the exact limit). > > I suppose I could output the array as an encoded file to the customer's desktop and ASK them to manually attach it to the generated email? I wish there was a better option. > > >> On 6/25/2024 6:15 PM, matthias rebbe via use-livecode wrote: >> Instead of using revMail which opens the default mail client app you could use tsNET external, which is availlable for Win/Mac/Linux/iOS and Android. >> >> The only thing you have to keep in mind is that tsNet directly sends the email instead of opening the default email client. >> >> Here you can find an sample stack >> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >> >> And here is a link to a Livecode Lesson >> https://lessons.livecode.com/m/4071/l/685661-how-to-send-e-mail-using-the-tsnet-external >> >> >> >>>> Am 25.06.2024 um 22:35 schrieb Paul Dupuis via use-livecode : >>> >>> Under a specific condition, my app creates an email with some pre-populated information using revMail: >>> >>> revMail address, [ccAddress, [mailSubject, [messageBody]]] >>> >>> So, my call is: revMail tSupportEmail, , "Diagnostic Report Information", tEmailBody >>> Where tSupportEmail contains a valid email address and tEmailBody contain the information I want to send. >>> >>> I realize the user still has to click their send button in their email client, but I have 2 questions: >>> >>> 1) I see the Dictionary still lists "revMailUnicode" with the same parameters. If tEmailBody contains Unicode characters do I need to textEncode(tEmailBody, "UTF-16") and use revMailUnicode OR is plain old revMail now Unicode aware >>> >>> 2) My more important question is how does one create an email with an attached file? I see no feature of revMail to include an attachment. Is there some other way? If there is no way to add an attachment, what might the best practice for sending the contents and structure of a Livecode array be? >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Wed Jun 26 20:48:25 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 27 Jun 2024 00:48:25 +0000 Subject: eMail attachment: best practice? Message-ID: <89b57739bf8f6ce14727beb9102827fadaa989fb@fourthworld.com> I wouldn't make anyone fill out anything. I'd just present a window for them to review, and POST it to my web site. The receiving CGI can do whatever I need. If the diagnostic info is for a support issue, you may be able to use your support tracking DB's API to automate creating the ticket. Richard Gaskin FourthWorld.com From matthias_livecode_150811 at m-r-d.de Thu Jun 27 03:51:13 2024 From: matthias_livecode_150811 at m-r-d.de (matthias_livecode_150811 at m-r-d.de) Date: Thu, 27 Jun 2024 09:51:13 +0200 Subject: eMail attachment: best practice? In-Reply-To: <89b57739bf8f6ce14727beb9102827fadaa989fb@fourthworld.com> References: <89b57739bf8f6ce14727beb9102827fadaa989fb@fourthworld.com> Message-ID: <80A31E9E-F4E2-464F-A10F-A45E59BDE472@m-r-d.de> > Am 27.06.2024 um 02:48 schrieb Richard Gaskin via use-livecode : > > I wouldn't make anyone fill out anything. I'd just present a window for them to review, and POST it to my web site. The receiving CGI can do whatever I need. > I would say this always depends on the purpose the app is supposed to fulfill. In my private projects I am using quite often Livecode Server as the backend for my LC apps, but I had some customer projects in the past where the customer wanted an app to send out e-mails with special attachments, like logfiles or reports or what ever and it had to be without user interaction. In the days before tsNET I either used Shao Sean's e-mail library, Chip Walter's altEmailHarness or I called command line tools using shell function to get this done. > If the diagnostic info is for a support issue, you may be able to use your support tracking DB's API to automate creating the ticket. > > Richard Gaskin > FourthWorld.com > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From mkoob at rogers.com Thu Jun 27 08:10:49 2024 From: mkoob at rogers.com (Martin Koob) Date: Thu, 27 Jun 2024 08:10:49 -0400 Subject: =?utf-8?Q?Planning_upgrade_to_Mac_OS_Sonoma_14=2E5_=E2=80=93_any_?= =?utf-8?Q?issues_with_LiveCode_9=2E6=2E12_or_LC_10_Create=3F?= References: <8864688D-5F26-43F9-BB7B-77B5EEC2C752.ref@rogers.com> Message-ID: <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> Hi all I am always a laggard when it comes to doing system upgrades. Long ago traumas still linger I guess. Anyway, it is usually between the Apple Developer Conference iatn the beginning of summer and the release of the new OS version in the fall when I get enough courage to go for it and upgrade to the current macOS. So, as the subject said are there any issues with LiveCode 9.6.12 or LC 10 Create that should give me pause or should I take the plunge? Martin Koob From MikeKerner at roadrunner.com Thu Jun 27 10:42:35 2024 From: MikeKerner at roadrunner.com (Mike Kerner) Date: Thu, 27 Jun 2024 10:42:35 -0400 Subject: =?UTF-8?Q?Re=3A_Planning_upgrade_to_Mac_OS_Sonoma_14=2E5_=E2=80=93_any_i?= =?UTF-8?Q?ssues_with_LiveCode_9=2E6=2E12_or_LC_10_Create=3F?= In-Reply-To: <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> References: <8864688D-5F26-43F9-BB7B-77B5EEC2C752.ref@rogers.com> <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> Message-ID: still sitting on ventura. usually LC is the reason why i hold off on updating macOS, but i'm not sure what is compelling about sonoma, anyway. On Thu, Jun 27, 2024 at 8:12 AM Martin Koob via use-livecode < use-livecode at lists.runrev.com> wrote: > Hi all > > I am always a laggard when it comes to doing system upgrades. Long ago > traumas still linger I guess. Anyway, it is usually between the Apple > Developer Conference iatn the beginning of summer and the release of the > new OS version in the fall when I get enough courage to go for it and > upgrade to the current macOS. > > So, as the subject said are there any issues with LiveCode 9.6.12 or LC 10 > Create that should give me pause or should I take the plunge? > > Martin Koob > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." From bobsneidar at iotecdigital.com Thu Jun 27 11:21:01 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Thu, 27 Jun 2024 15:21:01 +0000 Subject: =?utf-8?B?UmU6IFBsYW5uaW5nIHVwZ3JhZGUgdG8gTWFjIE9TIFNvbm9tYSAxNC41IA==?= =?utf-8?B?4oCTIGFueSBpc3N1ZXMgd2l0aCBMaXZlQ29kZSA5LjYuMTIgb3IgTEMgMTAg?= =?utf-8?Q?Create=3F?= In-Reply-To: <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> References: <8864688D-5F26-43F9-BB7B-77B5EEC2C752.ref@rogers.com> <8864688D-5F26-43F9-BB7B-77B5EEC2C752@rogers.com> Message-ID: <8E57466A-FC2C-4FFA-A39E-834D1958B7FB@iotecdigital.com> I think your instincts are correct. While letting your OS lag behind by 2 or more major versions is probably a bad practice, I don’t see any reason to just automatically update everytime it’s offered. But eventually Microsoft or Apple will make it, “compelling” as Mike Kerner put it. Bob S > On Jun 27, 2024, at 5:10 AM, Martin Koob via use-livecode wrote: > > Hi all > > I am always a laggard when it comes to doing system upgrades. Long ago traumas still linger I guess. Anyway, it is usually between the Apple Developer Conference iatn the beginning of summer and the release of the new OS version in the fall when I get enough courage to go for it and upgrade to the current macOS. > > So, as the subject said are there any issues with LiveCode 9.6.12 or LC 10 Create that should give me pause or should I take the plunge? > > Martin Koob From ambassador at fourthworld.com Thu Jun 27 15:54:32 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Thu, 27 Jun 2024 19:54:32 +0000 Subject: eMail attachment: best practice? Message-ID: <883a2c8680e09e8bfc98846b999646f8279ba9c0@fourthworld.com> Matthias wrote: > Am 27.06.2024 um 02:48 schrieb Richard Gaskin>: >> I wouldn't make anyone fill out anything. I'd just present >> a window for them to review, and POST it to my web site. >> The receiving CGI can do whatever I need. > > I would say this always depends on the purpose the app is > supposed to fulfill. Every good app does. :) > In my private projects I am using quite often Livecode Server > as the backend for my LC apps, but I had some customer projects > in the past where the customer wanted an app to send out e-mails > with special attachments, like logfiles or reports or whatever > and it had to be without user interaction. I think we're on the same page. I tend to prefer open disclosure for users to review data before sending from their local machine to a server, but it's not functionally necessary. Most apps don't bother, and of course a POST command can be sent without any user interaction. > In the days before tsNET I either used Shao Sean's e-mail > library, Chip Walter's altEmailHarness or I called command > line tools using shell function to get this done. If the final reciever *needs* to be an email client, nearly any method will require a mime wrapper for the payload. The nice thing about doing that for sendmail on the server, rather than for whatever the user uses for email on the client, is we don't know what the user is using. Things can get tricky with all the possible options one might discover a need to support (native email apps, webmail like GMail or Nextcloud, gawdonlyknows what special handling may be needed for monsters like Office 365, etc.). Sendmail gives us one one well-documented compatibility target to build for and test against. And it's already available; I don't need to set up half a dozen client email options just to get started. But the other benefit with POSTing to the server is you can change your mind easily about how you want to handle it. Maybe today the reciever is a support person's email In Box, but if so that's really an intermediary place, where the final destination will be some form of issue tracking DB. So one can go ahead and use sendmail to get the info to support in email today, and later revise the CGI handler to post directly into the issue tracker DB API, saving the payroll cost and error rate that comes with rote human intermediation. Another consideration is trust, esp. when the method used requires users to enter their server credentials. With a simple POST, no interaction is needed, no information the app doesn't already have in the course of normal use is obtained. The situation is trustless, in the sense of trust not being a requirement to proceed. The moment any app asks me for any server credentiails, I need to stop and consider the implications. If the app is my email client, of course I expect that, and I only use email clients I already trust. With anything else I'm going to think it through carefully, and probably contact the vendor to seek a different method, if I bother continuing using the product at all. Imagine if you went to a web site and the Contact form required your server creds. Would you hand those over? Do your users know you intimately enough to have complete confidence they can give you the keys to their kingdom in an app form? I can imagine maybe some enterprise environments where that level of trust *might* be available. But the same security awareness that makes the environment trustable probably wouldn't ask for server credentials. Good IT staff regard all networks as hostile, even LAN. In short: - POST requires no more work for mime-wrapping the payload than client email; - sendmail on the server is a simpler target than all possible email clints; - can have a UI or not, as desired; - leaves the door open for easy re-routing later on if needed; - requires no trust from the user beyond what they might expect with any web form. -- Richard Gaskin FourthWorld.com From neville.smythe at optusnet.com.au Thu Jun 27 23:01:35 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 28 Jun 2024 13:01:35 +1000 Subject: Slow stack problem Message-ID: <69BDAEB4-249D-45DF-B1FB-9E72D3E2E79E@optusnet.com.au> Thank Craig for your suggestion about replacing the Preferences file. No luck. I am down to going through line by line to find what process is taking so much time. I am now totally confused by finding that a handler which calls no handlers of mine, and simply has a repeat loop over just 32 short lines of text on each of which it does a matchChunk … takes 20 seconds! repeat with i=2 to the number of lines of indexList put line (i+1) of indexList into which put "(^[0-9-]*\t" & which & ")" into regX put false into found repeat with k=lastFound+1 to the number of lines of fff put matchChunk(line k of fff,regX,pos1,pos2) into found if found then exit repeat end repeat if found then put k into lastFound end if put lastFound into item i of mylineNumbers end repeat The same handler, same code, in a previous version of the offending stack, takes 0.06 seconds, both in the current 9.6.12 IDE, and using a standalone compiled under a previous LC version. I don’t understand how any of my code anywhere else in the stacks in use could affect the performance of an LC built-in matchChunk, which itself does not appear to have changed between versions (I certainly don’t redeclare matchChunk anywhere). I must be missing something. Neville Smythe From curry at pair.com Thu Jun 27 23:07:13 2024 From: curry at pair.com (Curry Kenworthy) Date: Thu, 27 Jun 2024 23:07:13 -0400 Subject: eMail attachment: best practice? In-Reply-To: References: Message-ID: Paul: > I wish there was a better option. in your case - simply upload the file. Best wishes, Curry Kenworthy Radically Innovative Christian LiveCode Development "PASSION for Elegant, Efficient Code!" https://livecodeconsulting.com/ From ambassador at fourthworld.com Thu Jun 27 23:22:14 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Fri, 28 Jun 2024 03:22:14 +0000 Subject: Slow stack problem Message-ID: <8343def36fe8b64890c9145c025ecc97f7240619@fourthworld.com> Neville Smythe wrote: > The same handler, same code, in a previous version of the > offending stack, takes 0.06 seconds, both in the current > 9.6.12 IDE, and using a standalone compiled under a > previous LC version. In your previous message yesterday you wrote: > So I have done something to the data stack in the last > few months. It is not a change of LC version or platform > OS. A standalone I produced a couple of months ago does > not display this slow behaviour when working on its old > version of the data stack, but does show it when I apply > it to the latest version of the data stack. If the code hasn't changed but the data has, you've narrowed it down. What is in the data stack? Where does the data come from, and when/how does the data stack get updated with new data? -- Richard Gaskin FourthWorld.com From neville.smythe at optusnet.com.au Fri Jun 28 06:15:53 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Fri, 28 Jun 2024 20:15:53 +1000 Subject: Slow stack problem Message-ID: <548217AD-2894-465E-B903-8DC47FAA4C88@optusnet.com.au> In my last epistle I mentioned the repeat loop had only 32 iterations. Much more relevant of course is the inner loop on the number of lines of the data variable fff. In this case fff had 1760 lines. So the total possible number of iterations was around 30000 to 50000, getting up there but still well within LC capability. I tried operating the loop on just the first 100 lines of fff. The repeats took 0.006 seconds (impressive). Then just the first 300 lines. Timing was 0.016 seconds, approximately linear increase as expected Then the first 500 lines. Timing is now 6.43 seconds. Something very odd there, that’s beyond exponential increase. And on the last 500 lines, timing was 0.135 seconds (Aha !!!) This would seem to point to matchChunk having indigestion over something in the middle of the text data. The data is 98% plain ascii, but quite likely it has a few Unicode characters: I have taken a whole lot of time to convert my legacy app to accept Asian and European Unicode personal names. Gives me something to work on. If I am right, it points to either a bug or a severe limitation in matchChunk if it cannot work with Unicode. And lo… Put textEncode(fff,”ascii”) into fff And now the whole 1760 lines take 0.073 seconds to complete. I have a solution or at least a workaround, and LC has an impending bug report [does anyone know if the latest versions of regexp searches have a performance problem with Unicode in other implementations?]. Neville Smythe From mark at livecode.com Fri Jun 28 08:02:13 2024 From: mark at livecode.com (Mark Waddingham) Date: Fri, 28 Jun 2024 13:02:13 +0100 Subject: Slow stack problem In-Reply-To: <548217AD-2894-465E-B903-8DC47FAA4C88@optusnet.com.au> References: <548217AD-2894-465E-B903-8DC47FAA4C88@optusnet.com.au> Message-ID: <4e66b24cff57606b2d3abd891d3dd0d7@livecode.com> On 2024-06-28 11:15, Neville Smythe via use-livecode wrote: > In my last epistle I mentioned the repeat loop had only 32 iterations. > Much more relevant of course is the inner loop on the number of lines > of the data variable fff. In this case fff had 1760 lines. So the total > possible number of iterations was around 30000 to 50000, getting up > there but still well within LC capability. > > I tried operating the loop on just the first 100 lines of fff. The > repeats took 0.006 seconds (impressive). > > Then just the first 300 lines. Timing was 0.016 seconds, approximately > linear increase as expected Are you sure a linear increase is expected? > Then the first 500 lines. Timing is now 6.43 seconds. Something very > odd there, thats beyond exponential increase. > > And on the last 500 lines, timing was 0.135 seconds (Aha !!!) I take it you tested this by doing the loop where fff was just line 1 to 300, then just line 1 to 500 and then just -500 to -1? My guess here is that the first 300 lines do not have a unicode character, there is somewhere in the next 200, and there are none in the last 500. > This would seem to point to matchChunk having indigestion over > something in the middle of the text data. The data is 98% plain ascii, > but quite likely it has a few Unicode characters: I have taken a whole > lot of time to convert my legacy app to accept Asian and European > Unicode personal names. All regex matches in LC are Unicode (under the hood) - so thinking this is regex related is a red-herring. Running a regex on Unicode text, is no different from on native text - its just its dealing with 16-bit units rather than 8-bit (regex is generally a linear operation - it takes time proportional, roughly to length of pattern * length of string - well, as long as you don't use any backtracking type features). The issue here is the assumption that your code is doing something linear... It *looks* linear because your code is only doing two nested repeat loops - so from the point of view of lines of script its iterating the central loop roughly 'the number of lines of indexList * the number of lines of fff' - however the engine is doing a lot more work. The central loop is doing (paraphrased); repeat with x = 1 to N get line x of jjj end repeat This means the engine is searching for a line delimiter not N times, but sum(1, ..., N) times (which is N*(N-1)/2 - i.e. N^2 roughly). Processing 300 lines will take the engine about 45000 steps, processing 500 lines will take the engine 125000 steps, processing 1760 lines will take the engine > 1,500,000. This means that a small change in how long it takes to search for a line delimiter (which is the fundamental operation here) makes a big difference to how long doing 1000's of them will take - and searching a string containing unicode is a fair bit slower than searching a string which contains only native characters. Fortunately there is an easy solution here - use an array so you get random access to the lines of fff: split fff by return repeat with i=2 to the number of lines of indexList put line (i+1) of indexList into which put "(^[0-9-]*\t" & which & ")" into regX put false into found repeat with k=lastFound+1 to the number of elements of fff put matchChunk(fff[k],regX,pos1,pos2) into found if found then exit repeat end repeat if found then put k into lastFound end if put lastFound into item i of mylineNumbers end repeat This should do exactly the same thing but SUBSTANTIALLY faster whether your fff variable contains native or unicode characters. Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Build Amazing Things From bobsneidar at iotecdigital.com Fri Jun 28 11:23:08 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 28 Jun 2024 15:23:08 +0000 Subject: Slow stack problem In-Reply-To: <4e66b24cff57606b2d3abd891d3dd0d7@livecode.com> References: <548217AD-2894-465E-B903-8DC47FAA4C88@optusnet.com.au> <4e66b24cff57606b2d3abd891d3dd0d7@livecode.com> Message-ID: <6BD625A2-F8D1-4B35-87E5-2C34ED013EF1@iotecdigital.com> I love using red herring in conversations. Most people don’t know what that is, so they can’t contradict me! :-) Bob S On Jun 28, 2024, at 5:02 AM, Mark Waddingham via use-livecode wrote: so thinking this is regex related is a red-herring. From bobsneidar at iotecdigital.com Fri Jun 28 12:44:24 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 28 Jun 2024 16:44:24 +0000 Subject: Socket Packaging In-Reply-To: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> References: <120C01ED-C267-4512-A8B7-7863E0666C2E@iotecdigital.com> Message-ID: <2D093B01-C351-4AA7-B2F3-AE44CDC3503E@iotecdigital.com> Added error checking. Also the payload can now be a string or an array. command packagePayload @pPayload, pUseEncryption try if pPayload is an array then \ put arrayEncode(pPayload) into pPayload if pUseEncryption then \ put slyEncrypt(pPayload) into pPayload put base64Encode(pPayload) into pPayload catch tError return "ERROR:" && tError end try end packagePayload command unpackPayload @pPayload, pUseEncryption try put base64Decode(pPayload) into pPayload if pUseEncryption is true or pPayload begins with "salted" then \ put slyDecrypt(pPayload) into pPayload if pPayload is an array then \ put arrayDecode(pPayload) into pPayload catch tError return "ERROR:" && tError end try end unpackPayload Bob S > On Jun 24, 2024, at 9:21 AM, Bob Sneidar wrote: > > Hi all. > > I came up with deceptively simple wrappers for packaging data for transmission over raw sockets. I can’t send the slyEncrypt and slyDecrypt handlers because I use methods no one else knows. But you can roll your own or else eliminate encryption altogether. > > And to answer the question befor it’s asked, I don’t use SSL because I don’t like having to deal with certificates, and also because I use a method for encryption that I don’t think anyone else has thought of, or at least I can’t find any info online. > > Bob S > > command packagePayload @pPayload, pUseEncryption > if pPayload is an array then \ > put arrayEncode(pPayload) into pPayload > > if pUseEncryption then \ > put slyEncrypt(pPayload) into pPayload > > put base64Encode(pPayload) into pPayload > end packagePayload > > command unpackPayload @pPayload > put base64Decode(pPayload) into pPayload > > if pPayload begins with "salted" then \ > put slyDecrypt(pPayload) into pPayload > > try > put arrayDecode(pPayload) into tResult > put tResult into pPayload > catch tError > -- not an array > end try > end unpackPayload > From admin at flexiblelearning.com Fri Jun 28 13:04:09 2024 From: admin at flexiblelearning.com (Hugh Senior) Date: Fri, 28 Jun 2024 18:04:09 +0100 Subject: url no longer working as expected In-Reply-To: References: Message-ID: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> Platform: Windows 11, LC 9.6.12 Query: Using URL to access a web page Problem: Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web browser and the page is displayed as expected. Use LC's URL command to access the same page direct returns a 404 put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" Anyone got any insights? Hugh Senior From bobsneidar at iotecdigital.com Fri Jun 28 13:07:55 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 28 Jun 2024 17:07:55 +0000 Subject: url no longer working as expected In-Reply-To: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> References: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> Message-ID: <7CFEFE88-133D-48B6-9E28-3728C5A7AB37@iotecdigital.com> I get the HTML of the page. Are you trying to open the page in a browser? Bob S > On Jun 28, 2024, at 10:04 AM, Hugh Senior via use-livecode wrote: > > > Platform: Windows 11, LC 9.6.12 > Query: Using URL to access a web page > > Problem: > Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web > browser and the page is displayed as expected. > > Use LC's URL command to access the same page direct returns a 404 > put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" > > Anyone got any insights? > > Hugh Senior > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Fri Jun 28 13:50:35 2024 From: paul at researchware.com (Paul Dupuis) Date: Fri, 28 Jun 2024 13:50:35 -0400 Subject: url no longer working as expected In-Reply-To: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> References: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> Message-ID: <499fc022-eafb-49dd-96df-1dcd18afb8fb@researchware.com> I get a response from Yahoos that is an html page with a 404 information as part of it. This happens under LC 9.6.12 and 9.6.11 I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: > Platform: Windows 11, LC 9.6.12 > Query: Using URL to access a web page > > Problem: > Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web > browser and the page is displayed as expected. > > Use LC's URL command to access the same page direct returns a 404 > put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" > > Anyone got any insights? > > Hugh Senior > > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From bobsneidar at iotecdigital.com Fri Jun 28 14:03:28 2024 From: bobsneidar at iotecdigital.com (Bob Sneidar) Date: Fri, 28 Jun 2024 18:03:28 +0000 Subject: url no longer working as expected In-Reply-To: <499fc022-eafb-49dd-96df-1dcd18afb8fb@researchware.com> References: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> <499fc022-eafb-49dd-96df-1dcd18afb8fb@researchware.com> Message-ID: Did you try that in the message box? Bob S > On Jun 28, 2024, at 10:50 AM, Paul Dupuis via use-livecode wrote: > > I get a response from Yahoos that is an html page with a 404 information as part of it. > > This happens under LC 9.6.12 and 9.6.11 > > I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. > > > On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >> Platform: Windows 11, LC 9.6.12 >> Query: Using URL to access a web page >> >> Problem: >> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >> browser and the page is displayed as expected. >> >> Use LC's URL command to access the same page direct returns a 404 >> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >> >> Anyone got any insights? >> >> Hugh Senior >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From paul at researchware.com Fri Jun 28 14:23:35 2024 From: paul at researchware.com (Paul Dupuis) Date: Fri, 28 Jun 2024 14:23:35 -0400 Subject: url no longer working as expected In-Reply-To: References: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> <499fc022-eafb-49dd-96df-1dcd18afb8fb@researchware.com> Message-ID: <30ffa56e-1cc0-4f83-9590-e1525a14e613@researchware.com> Yes. put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" In the message box on 9.6.11 and 9.6.12 under Windows 11. Both return a pile of HTML text that is all the formatting and CSS linked stuff to show a "404" page. This suggests that put URL is working and it is the Yahoo server that returning a different page of HTML/CSS for the put vs when you enter the URL in a browser (Firefox in my case, where I get the Yahoo finance data for Shell, although I did have to respond to a Cookies dialog first). On 6/28/2024 2:03 PM, Bob Sneidar via use-livecode wrote: > Did you try that in the message box? > > Bob S > > >> On Jun 28, 2024, at 10:50 AM, Paul Dupuis via use-livecode wrote: >> >> I get a response from Yahoos that is an html page with a 404 information as part of it. >> >> This happens under LC 9.6.12 and 9.6.11 >> >> I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. >> >> >> On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >>> Platform: Windows 11, LC 9.6.12 >>> Query: Using URL to access a web page >>> >>> Problem: >>> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >>> browser and the page is displayed as expected. >>> >>> Use LC's URL command to access the same page direct returns a 404 >>> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >>> >>> Anyone got any insights? >>> >>> Hugh Senior >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at 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 at lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode From ambassador at fourthworld.com Fri Jun 28 14:59:34 2024 From: ambassador at fourthworld.com (Richard Gaskin) Date: Fri, 28 Jun 2024 18:59:34 +0000 Subject: url no longer working as expected Message-ID: Likely the case. The expense of collating all that data and presenting it to their site visitors is considerable. They use advertising to cover those costs. If the data were easily scrapable, scrapers diminish revenue, putting the resource itself at risk. Some data provides offer APIs. When you see anti-scraping effects, look for API options (I saw none there but I didn't look deeply). APIs take fewer resources to deliver, and may have strategic benefit for some data brokers. But if they have scrape-prevention and no API, they're sending a clear signal: "We need to pay our bills, please send your traffic to our page so we can do that." That said, I've come across stock APIs before, and while I don't recall many free ones there likely are some. Richard Gaskin FourthWorld.com Paul Dupuis wrote: > I get a response from Yahoos that is an html page with a 404 > information as part of it. ... > I think this is Yahoo Finance not being able to detect the > browser type and intentionally returning a 404 as a method > of deterring screen scraping. > > On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: ... >> Problem: >> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into >> any web browser and the page is displayed as expected. >> >> Use LC's URL command to access the same page direct returns a >> 404 >> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >> >> Anyone got any insights? From neville.smythe at optusnet.com.au Sat Jun 29 03:53:58 2024 From: neville.smythe at optusnet.com.au (Neville Smythe) Date: Sat, 29 Jun 2024 17:53:58 +1000 Subject: Slow stack problem Message-ID: <76E596CE-7A40-4060-8A40-A9BD9DC0FFA8@optusnet.com.au> Thanks Mark for pointing me (as ever) in the right direction, away from the red herring but to the hidden inner loop entailed in evaluating line k of fff A bit embarrassing because I was party to the discussion some time ago about the slowness of lineOffset when working with unicode text. And thanks for the neat array trick which I wouldn’t have thought of. There is indeed just one line in the text which contains a single Unicode character. Without that character evidently the variable fff would internally be an ascii (or native?) string, but otherwise is entirely utf16 and we hit the LineOffset problem. But I am still bemused. Is it not the case that the processing time for looping over the number of lines and getting the k-th line in each iteration, for some arbitrary k, going to be Order(N^2) * C * T where N = the number of lines in the text C = the number of codepoints in each line T = the (average) time for processing each codepoint to check for a return character Now N and C are the same whether the text is ascii or unicode Test 1 If I get rid of the red herring by replacing the matchChunk call with a simple put line k of fff into x; put true into found — as if matchChunk always finds a match on the first line tested so that I am timing just the getting of lines endings: The time for processing plain ascii is. 0.008 seconds The time for processing unicode is. 0.84 seconds Which would appear to mean that processing unicode codepoints for the apparently simple task of checking for return takes 100 times as much time as processing ascii. That seems excessive, to put it mildly! Test 2 With the original code using matchChunk, which of course is going to have its own internal loop on code points so multiply by another 8 (it only searches the first few characters) and will not always return true so more lines must be processed — but again these are same multipliers whether ascii or unicode Plain ascii takes 0.07 seconds Unicode takes 19.9 seconds, a multiplier of nearly 300. — I can easily believe matchChunk takes 3 times as long to process unicode as ascii, this is the sort of factor I would have expected in Test 1. OK Mark, hit me again, I am a glutton for punishment, what is wrong with this analysis? Neville Smythe From mark at livecode.com Sat Jun 29 05:27:19 2024 From: mark at livecode.com (Mark Waddingham) Date: Sat, 29 Jun 2024 10:27:19 +0100 Subject: Slow stack problem In-Reply-To: <76E596CE-7A40-4060-8A40-A9BD9DC0FFA8@optusnet.com.au> References: <76E596CE-7A40-4060-8A40-A9BD9DC0FFA8@optusnet.com.au> Message-ID: <0aa021b2188068c191e11ba49db857cc@livecode.com> On 2024-06-29 08:53, Neville Smythe via use-livecode wrote: > Is it not the case that the processing time for looping over the number > of lines and getting the k-th line in each iteration, for some > arbitrary k, going to be > > Order(N^2) * C * T > > where > > N = the number of lines in the text > > C = the number of codepoints in each line > > T = the (average) time for processing each codepoint to check for a > return character > > Now N and C are the same whether the text is ascii or unicode Largely - yes - although for stuff like this you need to think in terms of bytes not codepoints (as memory throughput becomes 'a thing' when the strings are anything longer than a few characters) - so unicode is 2*ascii in this regard [ Its actually more than 2x for longer strings but how much more depends on CPU/memory architecture - CPUs can only read from their level 1 cache, and there's a cost to a cache miss, and you get 2x as many cache misses with unicode data as native data, assuming the data is larger than a single level 1 cache line. ] > Test 1 > If I get rid of the red herring by replacing the matchChunk call with a > simple > ... > Which would appear to mean that processing unicode codepoints for the > apparently simple task of checking for return takes 100 times as much > time as processing ascii. That seems excessive, to put it mildly! Its a lot slower certainly, but then searching unicode text for a string is (in the general case) a lot more complex than searching native/ascii text for a string. > Test 2 > With the original code using matchChunk, which of course is going to > have its own internal loop on code points so multiply by another 8 (it > only searches the first few characters) > and will not always return true so more lines must be processed but > again these are same multipliers whether ascii or unicode > ... > Plain ascii takes 0.07 seconds > Unicode takes 19.9 seconds, a multiplier of nearly 300. I can > easily believe matchChunk takes 3 times as long to process unicode as > ascii, this is the sort of factor I would have expected in Test 1. So 'Test 2' is slightly misleading - as it still suggests matchChunk is causing a slowdown - which it isn't. The difference here is Test 2 is doing more work as it isn't always exiting. If you test: get line k of fff put true into tFound I suspect you'll find the time to process your data if it contains unicode is pretty similar to that when matchChunk is also called. In my quick test (which is 32 index lines, 200 fff lines) I get about 10ms (no unicode) vs 1400ms (unicode) > OK Mark, hit me again, I am a glutton for punishment, what is wrong > with this analysis? Nothing in particular - apart from thinking that matchChunk is actually a relevant factor here ;) The reasons this delimiter search operation on unicode strings is so much slower than native is for two reasons: 1) We (well, I) heavily optimized the core native/ascii string operations in 2015 to make sure there were as fast as possible 2) Searching a unicode string for another string (which is what is going on here) is much more complex than doing the same for native/ascii Native/ascii strings have some very pleasant properties: - one byte (codeunit) is one character - always. - each character has only one representation - its byte value - casing is a simple mapping between lower and upper case characters - and only about 25% of characters are affected Unicode has none of these properties - a unicode character (grapheme) can be arbitrarily many codeunits (2 byte quantities) long - characters can have multiple representations - e.g. e-acute vs e,combining-acute - casing is not (in general) a simple mapping of one codeunit to another Currently the unicode operations in the engine are largely unoptimized - they assume the general case in all things so even searching a string for LF (which is the case here) is still done under the assumption that it might need that (very hefty) extra processing. Of course it would be nice to have highly optimized low-level unicode string optimizations but you have to pick your battles (particular when the battles are incredibly technical ones!) but the reality is that this (admittedly large!) speed difference is only really noticeable 'at scale' and when scale is involved, there's pretty much always an algorithmic change which can make those 'low-level' performance differences irrelevant. The case here is a really good example. The line X based code gives (no matchChunk / with matchChunk): ASCII 300 lines 13ms / 22ms ASCII 3000 lines - 986ms / 1104ms ASCII 10000 lines - 10804ms / 11213ms The array based code gives (no matchChunk / with matchChunk): ASCII 300 lines - 2ms / 11ms ASCII 3000 lines - 19ms / 101ms ASCII 10000 lines - 69ms / 336ms UNICODE 300 lines - 7ms / 12ms UNICODE 3000 lines - 52ms / 108ms UNICODE 10000 lines - 170ms / 359ms Warmest Regards, Mark. -- Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ LiveCode: Build Amazing Things From Neville.Smythe at optusnet.com.au Sat Jun 29 13:49:49 2024 From: Neville.Smythe at optusnet.com.au (Neville Smythe) Date: Sun, 30 Jun 2024 03:49:49 +1000 Subject: use-livecode Digest, Vol 249, Issue 24 Message-ID: <0EE136D5-54A3-474A-BB79-326A0956BB18@optusnet.com.au> Thanks Mark for the gory details which i found fascinating. Unicode is even more complicated than I realized, and I thought I had a pretty good understanding of it. Actually I thought my test 2 demonstrated that matchchunk performed very well on Unicode, rather than trying to show it was part of the problem. As to my back of the envelope analysis, I realized after I hit the Send button that my sloppy code computed the end condition the number of lines of fff in the inner loop as well as the outer, which makes the timing computation incorrect. So, end of story, my original problem is resolved, and I have that nifty array trick for random access to lines of large text data which is going to be invaluable, plus a tutorial on Unicode. All worth the embarrassment of exposing my ignorance in front of God and everyone (God in this case being Mark) Neville Smythe > On 30 Jun 2024, at 2:01 am, use-livecode-request at lists.runrev.com wrote: > > Send use-livecode mailing list submissions to > use-livecode at lists.runrev.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.runrev.com/mailman/listinfo/use-livecode > or, via email, send a message with subject or body 'help' to > use-livecode-request at lists.runrev.com > > You can reach the person managing the list at > use-livecode-owner at lists.runrev.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of use-livecode digest..." > > > you can find the archives for this list at: > > http://lists.runrev.com/pipermail/use-livecode/ > > and search them using this link: > > https://www.mail-archive.com/use-livecode at lists.runrev.com/ > > > Today's Topics: > > 1. Re: Socket Packaging (Bob Sneidar) > 2. url no longer working as expected (Hugh Senior) > 3. Re: url no longer working as expected (Bob Sneidar) > 4. Re: url no longer working as expected (Paul Dupuis) > 5. Re: url no longer working as expected (Bob Sneidar) > 6. Re: url no longer working as expected (Paul Dupuis) > 7. Re: url no longer working as expected (Richard Gaskin) > 8. Re: Slow stack problem (Neville Smythe) > 9. Re: Slow stack problem (Mark Waddingham) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 28 Jun 2024 16:44:24 +0000 > From: Bob Sneidar > To: How to use LiveCode > Subject: Re: Socket Packaging > Message-ID: <2D093B01-C351-4AA7-B2F3-AE44CDC3503E at iotecdigital.com> > Content-Type: text/plain; charset="utf-8" > > Added error checking. Also the payload can now be a string or an array. > > command packagePayload @pPayload, pUseEncryption > try > if pPayload is an array then \ > put arrayEncode(pPayload) into pPayload > > if pUseEncryption then \ > put slyEncrypt(pPayload) into pPayload > > put base64Encode(pPayload) into pPayload > catch tError > return "ERROR:" && tError > end try > end packagePayload > > command unpackPayload @pPayload, pUseEncryption > try > put base64Decode(pPayload) into pPayload > > if pUseEncryption is true or pPayload begins with "salted" then \ > put slyDecrypt(pPayload) into pPayload > > if pPayload is an array then \ > put arrayDecode(pPayload) into pPayload > catch tError > return "ERROR:" && tError > end try > end unpackPayload > > Bob S > > >> On Jun 24, 2024, at 9:21 AM, Bob Sneidar wrote: >> Hi all. >> I came up with deceptively simple wrappers for packaging data for transmission over raw sockets. I can?t send the slyEncrypt and slyDecrypt handlers because I use methods no one else knows. But you can roll your own or else eliminate encryption altogether. >> And to answer the question befor it?s asked, I don?t use SSL because I don?t like having to deal with certificates, and also because I use a method for encryption that I don?t think anyone else has thought of, or at least I can?t find any info online. >> Bob S >> command packagePayload @pPayload, pUseEncryption >> if pPayload is an array then \ >> put arrayEncode(pPayload) into pPayload >> if pUseEncryption then \ >> put slyEncrypt(pPayload) into pPayload >> put base64Encode(pPayload) into pPayload >> end packagePayload >> command unpackPayload @pPayload >> put base64Decode(pPayload) into pPayload >> if pPayload begins with "salted" then \ >> put slyDecrypt(pPayload) into pPayload >> try >> put arrayDecode(pPayload) into tResult >> put tResult into pPayload >> catch tError >> -- not an array >> end try >> end unpackPayload > > > ------------------------------ > > Message: 2 > Date: Fri, 28 Jun 2024 18:04:09 +0100 > From: "Hugh Senior" > To: > Subject: url no longer working as expected > Message-ID: <000001dac97d$3292afe0$97b80fa0$@flexiblelearning.com> > Content-Type: text/plain; charset="us-ascii" > > > Platform: Windows 11, LC 9.6.12 > Query: Using URL to access a web page > > Problem: > Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web > browser and the page is displayed as expected. > > Use LC's URL command to access the same page direct returns a 404 > put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" > > Anyone got any insights? > > Hugh Senior > > > > > ------------------------------ > > Message: 3 > Date: Fri, 28 Jun 2024 17:07:55 +0000 > From: Bob Sneidar > To: How to use LiveCode > Subject: Re: url no longer working as expected > Message-ID: <7CFEFE88-133D-48B6-9E28-3728C5A7AB37 at iotecdigital.com> > Content-Type: text/plain; charset="us-ascii" > > I get the HTML of the page. Are you trying to open the page in a browser? > > Bob S > > >> On Jun 28, 2024, at 10:04 AM, Hugh Senior via use-livecode wrote: >> Platform: Windows 11, LC 9.6.12 >> Query: Using URL to access a web page >> Problem: >> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >> browser and the page is displayed as expected. >> Use LC's URL command to access the same page direct returns a 404 >> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >> Anyone got any insights? >> Hugh Senior >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > ------------------------------ > > Message: 4 > Date: Fri, 28 Jun 2024 13:50:35 -0400 > From: Paul Dupuis > To: use-livecode at lists.runrev.com > Subject: Re: url no longer working as expected > Message-ID: <499fc022-eafb-49dd-96df-1dcd18afb8fb at researchware.com> > Content-Type: text/plain; charset=UTF-8; format=flowed > > I get a response from Yahoos that is an html page with a 404 information > as part of it. > > This happens under LC 9.6.12 and 9.6.11 > > I think this is Yahoo Finance not being able to detect the browser type > and intentionally returning a 404 as a method of deterring screen scraping. > > >> On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >> Platform: Windows 11, LC 9.6.12 >> Query: Using URL to access a web page >> Problem: >> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >> browser and the page is displayed as expected. >> Use LC's URL command to access the same page direct returns a 404 >> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >> Anyone got any insights? >> Hugh Senior >> _______________________________________________ >> use-livecode mailing list >> use-livecode at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > ------------------------------ > > Message: 5 > Date: Fri, 28 Jun 2024 18:03:28 +0000 > From: Bob Sneidar > To: How to use LiveCode > Subject: Re: url no longer working as expected > Message-ID: > Content-Type: text/plain; charset="us-ascii" > > Did you try that in the message box? > > Bob S > > >> On Jun 28, 2024, at 10:50 AM, Paul Dupuis via use-livecode wrote: >> I get a response from Yahoos that is an html page with a 404 information as part of it. >> This happens under LC 9.6.12 and 9.6.11 >> I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. >>> On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >>> Platform: Windows 11, LC 9.6.12 >>> Query: Using URL to access a web page >>> Problem: >>> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >>> browser and the page is displayed as expected. >>> Use LC's URL command to access the same page direct returns a 404 >>> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >>> Anyone got any insights? >>> Hugh Senior >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > ------------------------------ > > Message: 6 > Date: Fri, 28 Jun 2024 14:23:35 -0400 > From: Paul Dupuis > To: use-livecode at lists.runrev.com > Subject: Re: url no longer working as expected > Message-ID: <30ffa56e-1cc0-4f83-9590-e1525a14e613 at researchware.com> > Content-Type: text/plain; charset=UTF-8; format=flowed > > Yes. > > put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" > > In the message box on 9.6.11 and 9.6.12 under Windows 11. Both return a > pile of HTML text that is all the formatting and CSS linked stuff to > show a "404" page. > > This suggests that put URL is working and it is the Yahoo server that > returning a different page of HTML/CSS for the put vs when you enter the > URL in a browser (Firefox in my case, where I get the Yahoo finance data > for Shell, although I did have to respond to a Cookies dialog first). > > >> On 6/28/2024 2:03 PM, Bob Sneidar via use-livecode wrote: >> Did you try that in the message box? >> Bob S >>>> On Jun 28, 2024, at 10:50 AM, Paul Dupuis via use-livecode wrote: >>> I get a response from Yahoos that is an html page with a 404 information as part of it. >>> This happens under LC 9.6.12 and 9.6.11 >>> I think this is Yahoo Finance not being able to detect the browser type and intentionally returning a 404 as a method of deterring screen scraping. >>> On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: >>>> Platform: Windows 11, LC 9.6.12 >>>> Query: Using URL to access a web page >>>> Problem: >>>> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into any web >>>> browser and the page is displayed as expected. >>>> Use LC's URL command to access the same page direct returns a 404 >>>> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >>>> Anyone got any insights? >>>> Hugh Senior >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode at 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 at 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 at lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > ------------------------------ > > Message: 7 > Date: Fri, 28 Jun 2024 18:59:34 +0000 > From: "Richard Gaskin" > To: use-livecode at lists.runrev.com > Subject: Re: url no longer working as expected > Message-ID: > Content-Type: text/plain; charset="utf-8" > > Likely the case. The expense of collating all that data and presenting it to their site visitors is considerable. They use advertising to cover those costs. If the data were easily scrapable, scrapers diminish revenue, putting the resource itself at risk. > > Some data provides offer APIs. When you see anti-scraping effects, look for API options (I saw none there but I didn't look deeply). APIs take fewer resources to deliver, and may have strategic benefit for some data brokers. > > But if they have scrape-prevention and no API, they're sending a clear signal: "We need to pay our bills, please send your traffic to our page so we can do that." > > That said, I've come across stock APIs before, and while I don't recall many free ones there likely are some. > > Richard Gaskin > FourthWorld.com > > > > Paul Dupuis wrote: > >> I get a response from Yahoos that is an html page with a 404 >> information as part of it. > ... >> I think this is Yahoo Finance not being able to detect the >> browser type and intentionally returning a 404 as a method >> of deterring screen scraping. > On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote: > ... >>> Problem: >>> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/" into >>> any web browser and the page is displayed as expected. >>> Use LC's URL command to access the same page direct returns a >>> 404 >>> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/" >>> Anyone got any insights? > > > > ------------------------------ > > Message: 8 > Date: Sat, 29 Jun 2024 17:53:58 +1000 > From: Neville Smythe > To: How to use LiveCode > Subject: Re: Slow stack problem > Message-ID: <76E596CE-7A40-4060-8A40-A9BD9DC0FFA8 at optusnet.com.au> > Content-Type: text/plain; charset=utf-8 > > Thanks Mark for pointing me (as ever) in the right direction, away from the red herring but to the hidden inner loop entailed in evaluating > > line k of fff > > A bit embarrassing because I was party to the discussion some time ago about the slowness of lineOffset when working with unicode text. > > And thanks for the neat array trick which I wouldn?t have thought of. > > There is indeed just one line in the text which contains a single Unicode character. Without that character evidently the variable fff would internally be an ascii (or native?) string, but otherwise is entirely utf16 and we hit the LineOffset problem. > > But I am still bemused. > > Is it not the case that the processing time for looping over the number of lines and getting the k-th line in each iteration, for some arbitrary k, going to be > > Order(N^2) * C * T > > where > > N = the number of lines in the text > > C = the number of codepoints in each line > > T = the (average) time for processing each codepoint to check for a return character > > Now N and C are the same whether the text is ascii or unicode > > Test 1 > If I get rid of the red herring by replacing the matchChunk call with a simple > > put line k of fff into x; put true into found ? as if matchChunk always finds a match on the first line tested so that I am timing just the getting of lines endings: > > The time for processing plain ascii is. 0.008 seconds > The time for processing unicode is. 0.84 seconds > > Which would appear to mean that processing unicode codepoints for the apparently simple task of checking for return takes 100 times as much time as processing ascii. That seems excessive, to put it mildly! > > Test 2 > With the original code using matchChunk, which of course is going to have its own internal loop on code points so multiply by another 8 (it only searches the first few characters) > and will not always return true so more lines must be processed ? but again these are same multipliers whether ascii or unicode > > Plain ascii takes 0.07 seconds > Unicode takes 19.9 seconds, a multiplier of nearly 300. ? I can easily believe matchChunk takes 3 times as long to process unicode as ascii, this is the sort of factor I would have expected in Test 1. > > OK Mark, hit me again, I am a glutton for punishment, what is wrong with this analysis? > > Neville Smythe > > > > > > > ------------------------------ > > Message: 9 > Date: Sat, 29 Jun 2024 10:27:19 +0100 > From: Mark Waddingham > To: How to use LiveCode > Subject: Re: Slow stack problem > Message-ID: <0aa021b2188068c191e11ba49db857cc at livecode.com> > Content-Type: text/plain; charset=UTF-8; format=flowed > >> On 2024-06-29 08:53, Neville Smythe via use-livecode wrote: >> Is it not the case that the processing time for looping over the number >> of lines and getting the k-th line in each iteration, for some >> arbitrary k, going to be >> Order(N^2) * C * T >> where >> N = the number of lines in the text >> C = the number of codepoints in each line >> T = the (average) time for processing each codepoint to check for a >> return character >> Now N and C are the same whether the text is ascii or unicode > > Largely - yes - although for stuff like this you need to think in terms > of bytes not codepoints (as memory throughput becomes 'a thing' when the > strings are anything longer than a few characters) - so unicode is > 2*ascii in this regard > > [ Its actually more than 2x for longer strings but how much more depends > on CPU/memory architecture - CPUs can only read from their level 1 > cache, and there's a cost to a cache miss, and you get 2x as many cache > misses with unicode data as native data, assuming the data is larger > than a single level 1 cache line. ] > >> Test 1 >> If I get rid of the red herring by replacing the matchChunk call with a >> simple >> ... >> Which would appear to mean that processing unicode codepoints for the >> apparently simple task of checking for return takes 100 times as much >> time as processing ascii. That seems excessive, to put it mildly! > > Its a lot slower certainly, but then searching unicode text for a string > is (in the general case) a lot more complex than searching native/ascii > text for a string. > >> Test 2 >> With the original code using matchChunk, which of course is going to >> have its own internal loop on code points so multiply by another 8 (it >> only searches the first few characters) >> and will not always return true so more lines must be processed ? but >> again these are same multipliers whether ascii or unicode >> ... >> Plain ascii takes 0.07 seconds >> Unicode takes 19.9 seconds, a multiplier of nearly 300. ? I can >> easily believe matchChunk takes 3 times as long to process unicode as >> ascii, this is the sort of factor I would have expected in Test 1. > > So 'Test 2' is slightly misleading - as it still suggests matchChunk is > causing a slowdown - which it isn't. > > The difference here is Test 2 is doing more work as it isn't always > exiting. If you test: > > get line k of fff > put true into tFound > > I suspect you'll find the time to process your data if it contains > unicode is pretty similar to that when matchChunk is also called. > > In my quick test (which is 32 index lines, 200 fff lines) I get about > 10ms (no unicode) vs 1400ms (unicode) > >> OK Mark, hit me again, I am a glutton for punishment, what is wrong >> with this analysis? > > Nothing in particular - apart from thinking that matchChunk is actually > a relevant factor here ;) > > The reasons this delimiter search operation on unicode strings is so > much slower than native is for two reasons: > 1) We (well, I) heavily optimized the core native/ascii string > operations in 2015 to make sure there were as fast as possible > 2) Searching a unicode string for another string (which is what is > going on here) is much more complex than doing the same for native/ascii > > Native/ascii strings have some very pleasant properties: > - one byte (codeunit) is one character - always. > - each character has only one representation - its byte value > - casing is a simple mapping between lower and upper case characters - > and only about 25% of characters are affected > > Unicode has none of these properties > - a unicode character (grapheme) can be arbitrarily many codeunits (2 > byte quantities) long > - characters can have multiple representations - e.g. e-acute vs > e,combining-acute > - casing is not (in general) a simple mapping of one codeunit to > another > > Currently the unicode operations in the engine are largely unoptimized - > they assume the general case in all things so even searching a string > for LF (which is the case here) is still done under the assumption that > it might need that (very hefty) extra processing. > > Of course it would be nice to have highly optimized low-level unicode > string optimizations but you have to pick your battles (particular when > the battles are incredibly technical ones!) but the reality is that this > (admittedly large!) speed difference is only really noticeable 'at > scale' and when scale is involved, there's pretty much always an > algorithmic change which can make those 'low-level' performance > differences irrelevant. > > The case here is a really good example. > > The line X based code gives (no matchChunk / with matchChunk): > > ASCII 300 lines 13ms / 22ms > ASCII 3000 lines - 986ms / 1104ms > ASCII 10000 lines - 10804ms / 11213ms > > The array based code gives (no matchChunk / with matchChunk): > > ASCII 300 lines - 2ms / 11ms > ASCII 3000 lines - 19ms / 101ms > ASCII 10000 lines - 69ms / 336ms > > UNICODE 300 lines - 7ms / 12ms > UNICODE 3000 lines - 52ms / 108ms > UNICODE 10000 lines - 170ms / 359ms > > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/ > LiveCode: Build Amazing Things > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > use-livecode mailing list > use-livecode at lists.runrev.com > http://lists.runrev.com/mailman/listinfo/use-livecode > > > ------------------------------ > > End of use-livecode Digest, Vol 249, Issue 24 > *********************************************