Re: [OT] Poll: What does it mean for 1 rect to be 'within' a certain distance of another rect?

2021-02-16 Thread Paul Dupuis via use-livecode

On 2/16/2021 2:46 PM, Alex Tweedly via use-livecode wrote:
Paul - if you need to do this (i.e. find pairs of rects which are too 
close) for LARGE numbers of rects, I have some code to do this very 
efficiently (somewhere in an old archive, just ready to translate from 
C to LC). It uses a 'trailing window horizontal scan' so reduces the 
complexity/time from N^2 to N log N


Alex.



The actual application is for a product my company Researchware produces 
called HyperRESEARCH for performing qualitative data analysis. 
Researchers can take unstructured content (text files, word documents, 
PDFs, images, audio, video, etc.) and make selection and apply a "code" 
or label to the selection and perform various analytics.


In this specific case there is an interest in generating the following 
"report". If I have coded some rectangular area of an image file with 
the code "A", report on what other of my many codes on that image file 
are "within" X pixels of my code A and list those codes. So the 
researcher would select code "A" and a range, like 50px, and get a list 
of codes B, E, F, and G which either overlap with A or are within 50px. 
If they change the distance to 200px, then maybe the report returns 
codes B, E, F, G, H, I  J, K, L, M, N, and Z.


The report generator is not working with graphic objects (actual LC 
rects, but just with lists of stored rectangles (l,t,r,b), so everything 
is in variables and it is just tacking the rect of A and comparing it to 
the remaining N-1 rects in the list of codes for that image file. So it 
will always be an N-1 task for each file where N is the number of codes 
the researcher applied to the content of the file. Worst case would be 
if they want to see what codes are within X distance of every code on 
the file which makes it an N(N-1) or N^2-N problem but most researchers 
would not have very large numbers of iimage codes.



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


Re: SSL Error - question from Stack Overflow

2021-02-16 Thread matthias rebbe via use-livecode
Could you try 

tsNetVerifySSLPeer false

instead of
libURLSetSSLVerification false ?

Maybe setting libURLSetSSLVerification does not have any effect on tsNET.




-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 16.02.2021 um 19:06 schrieb Devin Asay via use-livecode 
> :
> 
> Hi all,
> 
> I came across this question on stack overflow. I like to try to give good 
> LiveCode answers there when I can, just to do a little to boost the 
> reputation of the LC community there. But I don’t have a clue on this one.
> 
> 
> A Livecode script:
> get URL 
> "https://www.uspto.gov/patent/laws-and-regulations/patent-term-extension/patent-terms-extended-under-35-usc-156";
> Winds up with the following in "the result":
> 
> tsneterr: (56) SSLRead() return error -9806
> 
> 
> I tried setting libURLSetSSLVerification to both true and false, but got the 
> same error each time. Any ideas why this is happening, and is there a 
> solution?
> 
> 
> I verified that this error is returned consistently in the result. Anybody 
> have any ideas? Charles, are you lurking perhaps?
> 
> Devin
> 
> 
> Devin Asay
> Director
> Office of Digital Humanities
> Brigham Young University
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Another question about multiple stack projects

2021-02-16 Thread Peter Bogdanoff via use-livecode
Also, if you are going to notarize the application package after code signing 
in macOS, the files need to be where the standalone maker puts them. Otherwise 
it will fail Apple’s notarization service.

I found this out after trial and error. Previously I had manually put them into 
the package where I liked them to be, which is OK for simple code signing and 
creating and signing the DMG. But not for notarization.

Peter Bogdanoff
ArtsInteractive

> On Feb 16, 2021, at 10:57 AM, William Prothero via use-livecode 
>  wrote:
> 
> What I should have done is search the help files first, but I somehow chose 
> unhelpful search terms, so didn’t see this until this morning. Sorry.
> 
> So it appears that the only purpose of the “Stacks” setting is to set 
> properties for each stack that locates them within the particular app 
> directory. Very convenient.
> 
> For example, suppose one line of the stackfiles property is, by extracting a 
> line from “the stackfiles of this stack":
> appNavigation-Lib,resources/libStacks/appNavigation-Lib.livecodescript(= 
> theSelectedLine)
> 
> put specialFolderPath("resources”)&”/“&(item 2 of theSelectedLine) into 
> tFilePath
> start using tFilePath
> 
> I see, in the IDE, anyway, that no matter where I am in the multiple stacks 
> in the project, that if I do:
> "put the stackfiles of this stack”, I get the list of stackfiles that was 
> entered from the settings.
> 
> Best.
> Bill
> 
> 
>> On Feb 16, 2021, at 8:45 AM, Bob Sneidar via use-livecode 
>>  wrote:
>> 
>> Listing them in the stack files gives LC the ability to find them when you 
>> refer to them by name only (as opposed to the full path.) In the case of 
>> script only Libraries, you can start using them at any time before you make 
>> a call to them. For instance, I have a database setup card that configures 
>> the database connection when the card is opened. I start using my database 
>> library on openCard. 
>> 
>> Bob S
>> 
>> 
>>> On Feb 15, 2021, at 9:40 PM, William Prothero via use-livecode 
>>>  wrote:
>>> 
>>> Folks:
>>> I have a question about multiple stack projects. My project starts with a 
>>> splash stack. In the standalone preferences of this stack, I list all 
>>> stacks the project uses, including script only stacks I use as libraries. 
>>> Should I do a “Start using” on all of these stacks at this point? But I 
>>> could have just done a “start using” for the required stacks for each of 
>>> the other component stacks when they were first accessed, and got the same 
>>> result?
>>> 
>>> I guess my question is: how does the build process make use of the list of 
>>> stacks in the splash stack? Are they all built into the project in some way 
>>> that doesn’t happen otherwise? I still seem to be required to “Start using” 
>>> each of the library stacks anyway.
>>> 
>>> Best,
>>> Bill
>>> 
>>> William Prothero
>>> waproth...@gmail.com
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> William Prothero
> waproth...@gmail.com
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: SSL Error - question from Stack Overflow

2021-02-16 Thread Richard Gaskin via use-livecode

Devin Asay wrote:

I came across this question on stack overflow. I like to try to give good 
LiveCode answers there when I can, just to do a little to boost the reputation 
of the LC community there. But I don’t have a clue on this one.


A Livecode script:
get URL 
"https://www.uspto.gov/patent/laws-and-regulations/patent-term-extension/patent-terms-extended-under-35-usc-156";
Winds up with the following in "the result":

 tsneterr: (56) SSLRead() return error -9806


I tried setting libURLSetSSLVerification to both true and false, but got the 
same error each time. Any ideas why this is happening, and is there a solution?



As a cURL wrapper, tsNet's error messages tend to follow the same 
conventions other cURL devs see, lending itself to generic searches:


https://duckduckgo.com/?q=SSLRead()+return+error+-9806&ia=web

I only briefly looked at a few of the results, but it seems related to a 
very specific SSL cert config that results in timeouts.  Beyond that 
you'll have to read more, but hopefully that link will at least get you 
started until Charles shows up with his usual thorough response.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

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


Re: [OT] Poll: What does it mean for 1 rect to be 'within' a certain distance of another rect?

2021-02-16 Thread Alex Tweedly via use-livecode
Paul - if you need to do this (i.e. find pairs of rects which are too 
close) for LARGE numbers of rects, I have some code to do this very 
efficiently (somewhere in an old archive, just ready to translate from C 
to LC). It uses a 'trailing window horizontal scan' so reduces the 
complexity/time from N^2 to N log N


Alex.

On 16/02/2021 18:27, Paul Dupuis via use-livecode wrote:

On 2/15/2021 5:53 PM, Paul Dupuis via use-livecode wrote:
This is an Off Topic informal poll of sorts, but related to LiveCode 
as I am writing a LiveCode expression to determine if 2 arbitrary 
rectangles (r1,r2) are with some distance d (in px) of one another. 
In considering this problem, the questions comes up: What is meant by 
rectangles being within a distance d of one another. What is the 'd' 
measured from?


center to center? Easiest is many ways, but I don't think this is 
what most people would think of.


adjacent edge to adjacent edge? This is harder (I think), but I think 
this is what more people intuitively think of. To me, implicit in the 
visual concept of 2 rects being within some distance of one another 
is that they are NOT overlapping, but that some gap exists between 
the nearest adjacent edges?


Something else? What does 2 rects  being 'within' d pixels of one 
another mean to you, if not one of the two above options?


Maybe there is a exact mathematical definition of what 2 rectangles 
being within distance d of one another is, but, if there is, I am 
unfamiliar with it.



Okay, Poll Closed!

Thank you everyone. I think the responses (informal as this is) 
confirms the majority fo people think of distance between 2 rectangles 
as the distance between nearest edges or vertices which is the same as 
saying the *smallest* distance between any two points in the rects 
(mathematically)


I appreciate all the responses! (and the links and code examples!)

-- Paul

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

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


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


Re: Another question about multiple stack projects

2021-02-16 Thread William Prothero via use-livecode
What I should have done is search the help files first, but I somehow chose 
unhelpful search terms, so didn’t see this until this morning. Sorry.

So it appears that the only purpose of the “Stacks” setting is to set 
properties for each stack that locates them within the particular app 
directory. Very convenient.

For example, suppose one line of the stackfiles property is, by extracting a 
line from “the stackfiles of this stack":
appNavigation-Lib,resources/libStacks/appNavigation-Lib.livecodescript(= 
theSelectedLine)

put specialFolderPath("resources”)&”/“&(item 2 of theSelectedLine) into 
tFilePath
start using tFilePath

I see, in the IDE, anyway, that no matter where I am in the multiple stacks in 
the project, that if I do:
"put the stackfiles of this stack”, I get the list of stackfiles that was 
entered from the settings.

Best.
Bill


> On Feb 16, 2021, at 8:45 AM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Listing them in the stack files gives LC the ability to find them when you 
> refer to them by name only (as opposed to the full path.) In the case of 
> script only Libraries, you can start using them at any time before you make a 
> call to them. For instance, I have a database setup card that configures the 
> database connection when the card is opened. I start using my database 
> library on openCard. 
> 
> Bob S
> 
> 
>> On Feb 15, 2021, at 9:40 PM, William Prothero via use-livecode 
>>  wrote:
>> 
>> Folks:
>> I have a question about multiple stack projects. My project starts with a 
>> splash stack. In the standalone preferences of this stack, I list all stacks 
>> the project uses, including script only stacks I use as libraries. Should I 
>> do a “Start using” on all of these stacks at this point? But I could have 
>> just done a “start using” for the required stacks for each of the other 
>> component stacks when they were first accessed, and got the same result?
>> 
>> I guess my question is: how does the build process make use of the list of 
>> stacks in the splash stack? Are they all built into the project in some way 
>> that doesn’t happen otherwise? I still seem to be required to “Start using” 
>> each of the library stacks anyway.
>> 
>> Best,
>> Bill
>> 
>> William Prothero
>> waproth...@gmail.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

William Prothero
waproth...@gmail.com



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


Re: [OT] Poll: What does it mean for 1 rect to be 'within' a certain distance of another rect?

2021-02-16 Thread Paul Dupuis via use-livecode

On 2/15/2021 5:53 PM, Paul Dupuis via use-livecode wrote:
This is an Off Topic informal poll of sorts, but related to LiveCode 
as I am writing a LiveCode expression to determine if 2 arbitrary 
rectangles (r1,r2) are with some distance d (in px) of one another. In 
considering this problem, the questions comes up: What is meant by 
rectangles being within a distance d of one another. What is the 'd' 
measured from?


center to center? Easiest is many ways, but I don't think this is what 
most people would think of.


adjacent edge to adjacent edge? This is harder (I think), but I think 
this is what more people intuitively think of. To me, implicit in the 
visual concept of 2 rects being within some distance of one another is 
that they are NOT overlapping, but that some gap exists between the 
nearest adjacent edges?


Something else? What does 2 rects  being 'within' d pixels of one 
another mean to you, if not one of the two above options?


Maybe there is a exact mathematical definition of what 2 rectangles 
being within distance d of one another is, but, if there is, I am 
unfamiliar with it.



Okay, Poll Closed!

Thank you everyone. I think the responses (informal as this is) confirms 
the majority fo people think of distance between 2 rectangles as the 
distance between nearest edges or vertices which is the same as saying 
the *smallest* distance between any two points in the rects (mathematically)


I appreciate all the responses! (and the links and code examples!)

-- Paul

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


Re: [OT] Poll: What does it mean for 1 rect to be 'within' a certain distance of another rect?

2021-02-16 Thread Paul Dupuis via use-livecode

Alex,

Thank you. As I just posted, I think I am seeing that *most* people 
think of the distance between 2 rects as the distance between nearest 
edges or vertices which is the same as the smallest distance between any 
two points.



On 2/15/2021 7:53 PM, Alex Tweedly via use-livecode wrote:


On 15/02/2021 23:21, Sean Cole (Pi) via use-livecode wrote:

Hi,
No point reinventing the wheel..


But most of those links actually did not have this particular wheel, 
or anything like it.


The exception was the last one (programmerssought.com) which had an 
ugly, inefficient and lengthy (45 lines in Python) solution. [OK, that 
45 includs blank and comments :-) !!


For me, a more precise problem specification is:

Given two rectangles (in regular Livecode format), the distance 
between them is :


 - if they touch or overlap, distance is zero.

 - otherwise, it's the smallest distance from any point in R1 to any 
point in R2.


Which leads to a simple solution


function rdist R1, R2
   local DX, DY
   put max( item 1 of R1 - item 3 of R2, item 1 of R2 - item 3 of R1, 
0) into DX
   put max( item 2 of R1 - item 4 of R2, item 2 of R2 - item 4 of R1, 
0) into DY

   return sqrt( DX*DX + DY * DY)
end rdist


Alex.


Lots of other way. Distance between two near or far edges. distance 
between

corners, distance to centers, or area median, area of space between,
overal usage area minus the area used by the two rectangles. Math is 
fun.

Keeps us in business.

Google (distance between two rectangles):

https://stackoverflow.com/questions/4978323/how-to-calculate-distance-between-two-rectangles-context-a-game-in-lua 



https://math.stackexchange.com/questions/2724537/finding-the-clear-spacing-distance-between-two-rectangles 



https://www.wyzant.com/resources/answers/583373/finding-the-distance-between-two-rectangles 



https://www.programmersought.com/article/44554760896/

etc

On Mon, 15 Feb 2021 at 22:53, Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com> wrote:


This is an Off Topic informal poll of sorts, but related to LiveCode as
I am writing a LiveCode expression to determine if 2 arbitrary
rectangles (r1,r2) are with some distance d (in px) of one another. In
considering this problem, the questions comes up: What is meant by
rectangles being within a distance d of one another. What is the 'd'
measured from?

center to center? Easiest is many ways, but I don't think this is what
most people would think of.

adjacent edge to adjacent edge? This is harder (I think), but I think
this is what more people intuitively think of. To me, implicit in the
visual concept of 2 rects being within some distance of one another is
that they are NOT overlapping, but that some gap exists between the
nearest adjacent edges?

Something else? What does 2 rects  being 'within' d pixels of one
another mean to you, if not one of the two above options?

Maybe there is a exact mathematical definition of what 2 rectangles
being within distance d of one another is, but, if there is, I am
unfamiliar with it.


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


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

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


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

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



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


Re: [OT] Poll: What does it mean for 1 rect to be 'within' a certain distance of another rect?

2021-02-16 Thread Paul Dupuis via use-livecode

Sean,

Thank you. I had Googles a few solutions (but missed this one: 
https://math.stackexchange.com/questions/2724537/finding-the-clear-spacing-distance-between-two-rectangles 
- which I really like so thanks!) but I say that some were solving for 
center distances and some for edges and some for other things, which is 
what in part led to my original questions of:


What is the most common way people think of the distance between 2 
rects? I suppost my question presumes there is a "most' common way or a 
'more' common way that some others of the many you mentioned.


From my Googling and this poll, I am seeing a slight favorite of people 
most commonly thinking of the distance between rects as being between 
the nearest edges or vertices.


On 2/15/2021 6:21 PM, Sean Cole (Pi) via use-livecode wrote:

Hi,
No point reinventing the wheel..

Lots of other way. Distance between two near or far edges. distance between
corners, distance to centers, or area median, area of space between,
overal usage area minus the area used by the two rectangles. Math is fun.
Keeps us in business.

Google (distance between two rectangles):

https://stackoverflow.com/questions/4978323/how-to-calculate-distance-between-two-rectangles-context-a-game-in-lua

https://math.stackexchange.com/questions/2724537/finding-the-clear-spacing-distance-between-two-rectangles

https://www.wyzant.com/resources/answers/583373/finding-the-distance-between-two-rectangles

https://www.programmersought.com/article/44554760896/

etc

On Mon, 15 Feb 2021 at 22:53, Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com> wrote:


This is an Off Topic informal poll of sorts, but related to LiveCode as
I am writing a LiveCode expression to determine if 2 arbitrary
rectangles (r1,r2) are with some distance d (in px) of one another. In
considering this problem, the questions comes up: What is meant by
rectangles being within a distance d of one another. What is the 'd'
measured from?

center to center? Easiest is many ways, but I don't think this is what
most people would think of.

adjacent edge to adjacent edge? This is harder (I think), but I think
this is what more people intuitively think of. To me, implicit in the
visual concept of 2 rects being within some distance of one another is
that they are NOT overlapping, but that some gap exists between the
nearest adjacent edges?

Something else? What does 2 rects  being 'within' d pixels of one
another mean to you, if not one of the two above options?

Maybe there is a exact mathematical definition of what 2 rectangles
being within distance d of one another is, but, if there is, I am
unfamiliar with it.


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


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



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


Re: [OT] Poll: What does it mean for 1 rect to be 'within' a certain distance of another rect?

2021-02-16 Thread Paul Dupuis via use-livecode
Thank you. I think I understand the proposed approach. I appreciate the 
clarification.


On 2/16/2021 1:02 PM, David V Glasgow via use-livecode wrote:

Well, my suggestion a non starter if you need to do hard sums, and you eschew 
invisibles.

However, my thinking was this... I understood that the task was to detect when two 
rectangles r1 and r2 were within distance d of each other.   Presumably ether a 
flat bit or a pointy bit, coming in at any angle.  if each rectangle is centred and 
grouped with a rect that is bigger by d/2, any intersection of any two bigger rects 
means that the smaller corresponding r1 and r2 rects are at or within the desired 
distance d (half d measured by r1’margin over r1, and half by r2’margin over r2). 
The size of the groups is ignored, and as long as all r & r’ stay centred it 
should work, unless the rects move super quickly.

Oh.  It just occurred to me is that the bigger rects would have to have rounded 
corners.  Hmmm.


OK, I’ll just sit back and see how it should be done.

Cheers

David G




On 16 Feb 2021, at 5:08 pm, Paul Dupuis via use-livecode 
 wrote:

On 2/16/2021 6:16 AM, David V Glasgow via use-livecode wrote:

Being a bear of little brain, I would try placing each rect into a group 
centred on a larger rect, where the margin is d/2,  then test using intersect.

Now, where did I put that hunny?



Like the pooh reference!

Although I am not sure I follow exactly what you are suggests - AND - I need to 
do this via math rather than visible (or invisible) objects in LC.

for rects r1,r2, I have l1,t1,r1,b2 and l2,t2,r2,b2 for their coordinates. The 
rect min(l1,l2),min(t1,t2),max(r1,r2),max(b1,b2) is a rectangle that exactly 
bounds both rects - this would be the rect of the group (if you created them as 
objects and grouped them (less margins/borders).

I don't follow the part about 'centered on a larger rect where the margin is 
d/2?


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


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



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


SSL Error - question from Stack Overflow

2021-02-16 Thread Devin Asay via use-livecode
Hi all,

I came across this question on stack overflow. I like to try to give good 
LiveCode answers there when I can, just to do a little to boost the reputation 
of the LC community there. But I don’t have a clue on this one.


A Livecode script:
get URL 
"https://www.uspto.gov/patent/laws-and-regulations/patent-term-extension/patent-terms-extended-under-35-usc-156";
Winds up with the following in "the result":

 tsneterr: (56) SSLRead() return error -9806


I tried setting libURLSetSSLVerification to both true and false, but got the 
same error each time. Any ideas why this is happening, and is there a solution?


I verified that this error is returned consistently in the result. Anybody have 
any ideas? Charles, are you lurking perhaps?

Devin


Devin Asay
Director
Office of Digital Humanities
Brigham Young University

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


Re: [OT] Poll: What does it mean for 1 rect to be 'within' a certain distance of another rect?

2021-02-16 Thread David V Glasgow via use-livecode
Well, my suggestion a non starter if you need to do hard sums, and you eschew 
invisibles. 

However, my thinking was this... I understood that the task was to detect when 
two rectangles r1 and r2 were within distance d of each other.   Presumably 
ether a flat bit or a pointy bit, coming in at any angle.  if each rectangle is 
centred and grouped with a rect that is bigger by d/2, any intersection of any 
two bigger rects means that the smaller corresponding r1 and r2 rects are at or 
within the desired distance d (half d measured by r1’margin over r1, and half 
by r2’margin over r2). The size of the groups is ignored, and as long as all r 
& r’ stay centred it should work, unless the rects move super quickly.

Oh.  It just occurred to me is that the bigger rects would have to have rounded 
corners.  Hmmm.  


OK, I’ll just sit back and see how it should be done.

Cheers

David G



> On 16 Feb 2021, at 5:08 pm, Paul Dupuis via use-livecode 
>  wrote:
> 
> On 2/16/2021 6:16 AM, David V Glasgow via use-livecode wrote:
>> Being a bear of little brain, I would try placing each rect into a group 
>> centred on a larger rect, where the margin is d/2,  then test using 
>> intersect.
>> 
>> Now, where did I put that hunny?
>> 
>> 
> 
> Like the pooh reference!
> 
> Although I am not sure I follow exactly what you are suggests - AND - I need 
> to do this via math rather than visible (or invisible) objects in LC.
> 
> for rects r1,r2, I have l1,t1,r1,b2 and l2,t2,r2,b2 for their coordinates. 
> The rect min(l1,l2),min(t1,t2),max(r1,r2),max(b1,b2) is a rectangle that 
> exactly bounds both rects - this would be the rect of the group (if you 
> created them as objects and grouped them (less margins/borders).
> 
> I don't follow the part about 'centered on a larger rect where the margin is 
> d/2?
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Nods: "The Soul of a New App".

2021-02-16 Thread Mark Rauterkus via use-livecode
Love this:

P.P.S title suggestion "The Soul of a New App".

Mark R


-- 

--
Ta.


Mark Rauterkus   m...@rauterkus.com
Webmaster, International Swim Coaches Association, SwimISCA.org
Executive Director of SKWIM USA, a 501(c)(3), SKWIM.us
The Pittsburgh Project - swim coach and head lifeguard
Coach at The Ellis School for Swimming, T&F and Triathlon
Pittsburgh Combined Water Polo Team & Renegades (Masters)

CLOH.org  & Rauterkus.com & 4Rs.org

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


Re: iOS App just shows Splash Screen the quits

2021-02-16 Thread matthias rebbe via use-livecode
Forgot to mention. I tried with LC 9.6.2 RC 1 & 2 and LC 9.6.1
-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 16.02.2021 um 17:43 schrieb matthias rebbe via use-livecode 
> :
> 
> Hi,
> 
> i am working on an app which ran without problems on iOS14.2 on the iPad of a 
> customer.. Now the customer updated his iPad to iOS 14.4 and now the app 
> crashes after showing up the splash screen.
> Even a simple app only shows the splash screen at start and the quits.
> 
> I tried to build the app for iOS13 and 12. Both did not work.
> 
> Does anyone have an idea what might be wrong?
> 
> I am working with macOS 10.14.6 and xCode 11.3. 
> 
> 
> 
> 
> -
> Matthias Rebbe
> Life Is Too Short For Boring Code
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: [OT] Poll: What does it mean for 1 rect to be 'within' a certain distance of another rect?

2021-02-16 Thread Paul Dupuis via use-livecode

On 2/16/2021 6:16 AM, David V Glasgow via use-livecode wrote:

Being a bear of little brain, I would try placing each rect into a group 
centred on a larger rect, where the margin is d/2,  then test using intersect.

Now, where did I put that hunny?




Like the pooh reference!

Although I am not sure I follow exactly what you are suggests - AND - I 
need to do this via math rather than visible (or invisible) objects in LC.


for rects r1,r2, I have l1,t1,r1,b2 and l2,t2,r2,b2 for their 
coordinates. The rect min(l1,l2),min(t1,t2),max(r1,r2),max(b1,b2) is a 
rectangle that exactly bounds both rects - this would be the rect of the 
group (if you created them as objects and grouped them (less 
margins/borders).


I don't follow the part about 'centered on a larger rect where the 
margin is d/2?



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


Re: Livecode IDE question

2021-02-16 Thread Bob Sneidar via use-livecode
Belay my last post on this thread. I am always plagued with this problem where 
emails on a simple thread come into my inbox as multiple threads, so I don’t 
always see the original post right away. 

Bob S


> On Feb 12, 2021, at 1:21 PM, Roger Guay via use-livecode 
>  wrote:
> 
> I’m having a similar problem on my new MBP, and haven’t figured out  the 
> cause yet. Just type this in the message box for an temporary fix:
> 
>   set the top of stack revMenubar to 25 - - - or so
> 
> 
> Roger
> 
> 
>> On Feb 12, 2021, at 10:58 AM, David Squance via use-livecode 
>>  wrote:
>> 
>> I’m a hobbyist, and infrequent dabbler, and I hope my question isn’t 
>> inappropriate to post here. I find the forum too cumbersome and daunting. 
>> With recent upgrades, the toolbar at the top of the screen in the IDE is 
>> fixed about an inch below the top. Is there anyway to move it up? I use a 
>> MacBook Air and the screen is small enough.
>> 
>> Thanks.
>> Dave
>> 
>> LC9.6.2 RC2
>> OS 11.2.1

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


Re: team-xapi-in-LiveCode Update

2021-02-16 Thread Bob Sneidar via use-livecode
I have a custom development menu I remove when creating standalone. In it I 
have a Center Stack which simply sets the loc of the top stack to the 
screenLoc. 

Bob S


> On Feb 13, 2021, at 10:00 AM, Brian K. Duck via use-livecode 
>  wrote:
> 
> Erik,
> 
> The YouTube url has been validated and is included because the direct link to 
> our GitHub team link requires:
> 1) a logged in user
> 2) the user must be a member of the ‘xAPI Cohort Spring 2021’ group
> 
> GitHub gives a 404 error if either of these conditions are not met, there is 
> no feedback provided other than this error number.
> 
> Anyone wishing to see the code is welcome to join the xAPI Learning Cohort 
> and request access to the Cohort GitHub area.
> 
> The YouTube url does not have this limitation.
> 
> As I am cross posting to: use-LiveCode, gutHub discussions, slack channels, 
> and direct email to our team; I’m working to keep the urls posted valid, but 
> I am learning as I go.
> 
> Sent from my iPhone,
> Brian Duck
> 
>> On Feb 13, 2021, at 12:00 PM, use-livecode-requ...@lists.runrev.com wrote:
>> 
>> The URL is not correct.
>> 
>> Best regards,
>> Erik
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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


Re: Another question about multiple stack projects

2021-02-16 Thread Bob Sneidar via use-livecode
Listing them in the stack files gives LC the ability to find them when you 
refer to them by name only (as opposed to the full path.) In the case of script 
only Libraries, you can start using them at any time before you make a call to 
them. For instance, I have a database setup card that configures the database 
connection when the card is opened. I start using my database library on 
openCard. 

Bob S


> On Feb 15, 2021, at 9:40 PM, William Prothero via use-livecode 
>  wrote:
> 
> Folks:
> I have a question about multiple stack projects. My project starts with a 
> splash stack. In the standalone preferences of this stack, I list all stacks 
> the project uses, including script only stacks I use as libraries. Should I 
> do a “Start using” on all of these stacks at this point? But I could have 
> just done a “start using” for the required stacks for each of the other 
> component stacks when they were first accessed, and got the same result?
> 
> I guess my question is: how does the build process make use of the list of 
> stacks in the splash stack? Are they all built into the project in some way 
> that doesn’t happen otherwise? I still seem to be required to “Start using” 
> each of the library stacks anyway.
> 
> Best,
> Bill
> 
> William Prothero
> waproth...@gmail.com

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


iOS App just shows Splash Screen the quits

2021-02-16 Thread matthias rebbe via use-livecode
Hi,

i am working on an app which ran without problems on iOS14.2 on the iPad of a 
customer.. Now the customer updated his iPad to iOS 14.4 and now the app 
crashes after showing up the splash screen.
Even a simple app only shows the splash screen at start and the quits.

I tried to build the app for iOS13 and 12. Both did not work.

Does anyone have an idea what might be wrong?

I am working with macOS 10.14.6 and xCode 11.3. 




-
Matthias Rebbe
Life Is Too Short For Boring Code


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


Re: LC Roadmap

2021-02-16 Thread Bob Sneidar via use-livecode
BIG +

If not for Livecode, I would not be developing at all. I am just grateful that 
there IS a Livecode. I am not a professional developer though, so I understand 
that some have issues with certain things.

Bob S


On Feb 15, 2021, at 4:55 AM, Andre Garzia via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

LC is a small company regardless of how much we love them. They can’t provide 
solution to all our needs. It is not because they don’t want to, they have 
limited resources. We can’t treat LC as we treat Apple or Microsoft.

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


Re: LC Roadmap

2021-02-16 Thread Alex Tweedly via use-livecode


On 15/02/2021 12:55, Andre Garzia via use-livecode wrote:
It is with this in mind, that I decided to create content for our 
community. Books are an easy value proposition. Most of our community 
is beyond their thirties and have a fondness (and experience) for the 
written word and documentation. It is easy to sell books here, way 
easier than in other communities which are younger and prefer videos. 
That doesn’t mean that I can’t provide videos as well, damn I’ve 
graduated with a BA in filmmaking, I’m geared to start filming too. 
Books were the first step. I see myself more as a storyteller than a 
developer, that is why I want to focus on content for my own career 
moving forward. But that is only my own personal journey, other people 
here have a different path. I just wish that more people here decide 
to share their knowledge (and code) so that we can become a more 
vibrant community. 


Then I have a concrete suggestion for what would, I think, be a very 
useful e-book + stack.


A sample 'skeleton' app - i.e. complete but not fleshed-out. Initially 
it would be for a desktop app (the first sequel will cover mobile). It 
would implement "good practices" for many of the common features, with 
enough code being there to do something - but the focus should be on the 
architecture rather than on doing anything useful.


It should include (most of):

 - splash stack, with checks for updated versions, background 
downloading & installing them, etc.


 - proper locations for libraries, prefs files, other config data, 
other data, etc. as well as loading the libraries.


 - simple preferences handling (i.e. library which will store, retrieve 
and allow basic user interaction to view/update preferences - given some 
description of the preferences)


 - a menu, ready to extend or remove, with abstraction of the functionality

 - maybe a status bar

 - some groups that handle resizing well

 - multiple cards should be involved

 - probably simple SQL (i.e. sqlite + your DBLib)

And of course the most difficult part will be writing the e-book that 
describes the app, what it does, and maybe why those particular methods 
were chosen over some of the alternatives.


Then the sequel would cover mobile, so adding features like a Header 
Bar, segmented control, using library to overlay controls with native 
controls as needed, ... as well as describing the hoops one needs to 
jump through to actually do mobile developments.


Further sequels could then cover additional features - again for 
architecture and example, not just to make it a more complicated app. 
For example: toolbar, pane splitter, data grid, ...


Alex.

P.S. I'd be happy to collaborate on doing the development part - but I 
suspect you'd be quicker without me :-)


P.P.S title suggestion "The Soul of a New App".



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


Re: [OT] Poll: What does it mean for 1 rect to be 'within' a certain distance of another rect?

2021-02-16 Thread Alex Tweedly via use-livecode

Hi Henk,

No, it's maybe not obvious but it does take all cases into account.

If the smallest distance is between corners of each rectangle - only 
then does the 'sqrt' have real meaning. In all other cases, one or other 
of the DX and DY comes out as 0.


--
 |    |
| R1 |  --
 |    |  |    |
 |    |  | R2 |
 --  |    |
     -


So if there is an overlap in one dimension, (Y above) then DY is 
calculated as 0 - and the result is the distance in X (i.e. sqrt(DX*DX+0) ).


Alex.


On 16/02/2021 07:45, Henk van der Velden via use-livecode wrote:

Alex,
No one would challenge your definition I think, but your solution only takes 
the corner points into account, right? So this wouldn’t give correct results in 
case the rectangles have different sizes or are positioned obliquely.

Henk



On 16 Feb 2021, at 03:12, use-livecode-requ...@lists.runrev.com wrote:

For me, a more precise problem specification is:

Given two rectangles (in regular Livecode format), the distance between
them is :

?- if they touch or overlap, distance is zero.

?- otherwise, it's the smallest distance from any point in R1 to any
point in R2.

Which leads to a simple solution


function rdist R1, R2
?? local DX, DY
?? put max( item 1 of R1 - item 3 of R2, item 1 of R2 - item 3 of R1,
0) into DX
?? put max( item 2 of R1 - item 4 of R2, item 2 of R2 - item 4 of R1,
0) into DY
?? return sqrt( DX*DX + DY * DY)
end rdist


Alex.

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


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


Re: [OT] Poll: What does it mean for 1 rect to be 'within' a certain distance of another rect?

2021-02-16 Thread David V Glasgow via use-livecode
Being a bear of little brain, I would try placing each rect into a group 
centred on a larger rect, where the margin is d/2,  then test using intersect.

Now, where did I put that hunny?

Best wishes

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


Re: Using MySQL on (headless) Linux

2021-02-16 Thread Richard Gaskin via use-livecode
Thank you, Mark, but the downside to my longish emails is that I'll need 
further guidance: which part/phrases would be of greatest interest? 
Happy to see if I can put together something to help with it.


--
 Richard Gaskin
 Fourth World Systems


On 2/4/21 3:33 AM, Mark Smith wrote:
Richard, you’ve covered a lot of territory in this message most of which 
I don’t understand since I’ve never had a need to delve into this aspect 
if LC technology, but I’m really fascinated by the potential and would 
love to learn more. Could this possibly be a topic for a half day (or 
full day) workshop at the upcoming LIVECODE NYC 2022? If so, I think it 
would be one of those topics that makes it worth the price of admission.


Cheers
Mark

On Feb 4, 2021, at 9:52 AM, Richard Gaskin via use-livecode 
mailto:use-livecode@lists.runrev.com>> 
wrote:


Mark Waddingham wrote:


On 2021-02-03 20:07, Richard Gaskin via use-livecode wrote:
LC Server had already been ruled out (for whatever reason) in an 
earlier part of the thread...

That's too bad. LC Server is LiveCode build designed specifically for
command line use.
Interesting - I don't remember that being what I specifically 
designed it for :P
LiveCode Server was *specifically designed* to be used just like PHP 
- allowing you to interpolate code with HTML output for the purposes 
of constructing webpages on the fly, sitting behind a web-server... 
That's why it has unique syntax designed precisely for a CGI 
environment, and operating in that PHP-like manner.
Making it run in command-line mode as well was an obvious thing to 
do, and also made up for the fact (at the time) that bare standalone 
engines would not launch a stack on the command-line (as that was a 
rather gaping licensing hole which was closed between v3 and v4

IIRC). [ It also made it easier to test the general features of it! ]
Since the advent of the community edition, however, and perhaps more 
importantly script-only-stacks - standalone engines running with -ui 
can be just as convenient...



Indeed it can.  The -ui option for running standalones was something 
many of us enjoyed back in the MetaCard days; AFAIK it was first 
implemented with v1.0 back in '92; it least it was there when I first 
started with MC back in '96.


In addition to being an option for standalones, one could even run the 
bare engine with -ui as well.


And being a command line tool that uses stdin/stdout, running the 
engine or a standalone with -ui also worked well as a CGI under Apache 
or Lightly (though in a flavor more like Perl, Python, or Ruby than PHP).


Your fine addition in more recent years with a special Server build to 
allow PHP-like co-mingling of code and content was well done and much 
appreciated for those who enjoy that workflow on web servers.


And back in '14 David Williams reminded us that the standard shebang 
option for running a script text file is still available, though with 
a slight syntactic difference from how we used to do that with MC 
(entry point used to be a startup message, now just bare script 
statements outside of a handler):

https://livecode.com/a-livecode-shell/


With all this flexibility in one lean install, for me the pros of LC 
Server for headless work are clear:


- We get the benefits of a standalone without having to make a
 standalone (indeed the engine can be kept up to date with a
 scrape-n-wget from the Downloads page, without needing to run
 it through the Standalone Builder on a separate GUI system).

- We have the same options for running it as a standalone, without
 needing to remember to add -ui (minor, but every little simplicity
 is nice).

- BONUS: We get the bonus option of running it aa a CGI without
 needing to write our own libraries for that (reading and parsing
 POST, writing to stdOut, handling every little detail about
 headers, sessions, and more).  And when we do, we can enjoy
 PHP-style implicit merge, mixing content and code much more
 conveniently than with the merge function.

That bonus may be irrelevant for some use cases, but probably not 
many. After all, a headless machine is usually not our main dev 
machine; it's probably being deployed to provide services for client 
machines. When those services are being delivered over a network we'll 
need a protocol, and in most cases HTTP will be a great choice, 
certainly the most common one. And though we can write our own HTTP 
daemon in LC, letting Apache do that generic work gives us better 
throughput, robustness, and security, with lower maintenance costs.


Letting Apache do what it does best lets us do what we do best: focus 
on the functionality unique to our application service.



All that said, perhaps my appreciation for your work with LC Server is 
indeed misplaced, and maybe it shouldn't be encouraged as the go-to 
choice for headless LiveCode development. :)


But as one who resisted using it for many years after it was released, 
continuing to use standalones with -ui, I must adm

Re: Polygon fill algo?

2021-02-16 Thread Richard Gaskin via use-livecode

Super helpful, Mark. Thank you.

I can better understand how the existing modes work, but I need 
something a little different.


Imagine if we had a mode where each successive set of points is rendered 
so it completely paints over anything rendered before it, vertices and 
all - e.g.:



   |--->---|
   |...|
   |...|--->---|
   ^...|...|
   |...|...|
   |-- |...v
   |...|
   |---|


  set the fillmode to layered --?

--
 Richard Gaskin
 Fourth World Systems


Mark Waddingham wrote:


On 2021-02-16 05:55, Richard Gaskin via use-livecode wrote:

My expectation was almost beyond anything reasonable, but it would
seem useful if there was some way to make it happen:  imagine if each
segment within a list of discontiguous points was rendered as though
it's a separate object, back to front.

It's not going to kill me to use separate graphics to hide the
portions of the vertices I need covered, but it sure would have been
nifty if I'd found a way to have a single poly object render as though
it were many.


So the even-odd fill rule will not give you what you want - overlapping 
regions alternate.


The non-zero fill rule can give you what you want - but you need to make 
sure that all your sub-polygons go 'in the same direction'. (NB: Fixed 
width font ASCII art follows):


These two overlapping rects both go clock-wise so everything is filled.

   |--->---|
   |...|
   |...|--->---|
   ^...|...|...|
   |...|...|...|
   |-- |---|...v
   |...|
   |---|

The left rect goes anti-clockwise and the right rect goes clockwise:

   |---<---|
   |...|
   |...|--->---|
   v...|   |...|
   |...|   |...|
   |-- |---|...v
   |...|
   |---|

Notionally:
- the non-zero winding rule works by starting on the left of each 
scanline and scanning to the right

- there is a winding counter which starts at 0.
- at any pixel, if the winding counter is non-zero the pixel is 
filled.
- if an edge is crossed which goes 'down', the winding counter is 
decreased
- if an edge is crossed which goes 'up', the winding counter is 
increased


Hope this helps!

Warmest Regards,

Mark.



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