Re: Sort IP List

2018-06-30 Thread Mark Wieder via use-livecode

Ralph-

Not that I'm doubting your findings, but those both seem mind-bogglingly 
nonsensical to me. Can you post your test code?


--
 Mark Wieder
 ahsoftw...@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: Sort IP List

2018-06-30 Thread Ralph DiMola via use-livecode
How fortuitous... I am finding the bottlenecks in some code under a deadline
the last few days and found some interesting observations.

1) Assembling, putting data into a field and doing text editing (replace x
with y in fld F1) in an non-visible field object is faster than assembling a
line in a local var and then putting it into the field once. I understand
that I'm moving the data twice but I thought there was some overhead of
field formatting every time I changed the data. apparently not...

I had a function call in a loop with two params and it returned a text
string of a few hundred to a few thousand cars. I changed it to a handler
with three params all by ref(the third being the var that the function
version set. Now I would have though the with everything by ref it would be
faster but in fact it was slower by 50%.

LC makes it so easy to do timings. I actually had fun tracking down and
attacking each bottleneck. Some stuff like putting simple calculations
in-line repeat constructs speeded things up as expected, others befuddled
me.

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

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of Tom Glod via use-livecode
Sent: Saturday, June 30, 2018 3:51 PM
To: How to use LiveCode
Cc: Tom Glod
Subject: Re: Sort IP List

good thread you guys...code optimization questswhat fun.

On Sat, Jun 30, 2018 at 2:01 PM, Niggemann, Bernd via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hermann,
>
> I did not see Alex's solution until after I posted. I agree that 
> inline is probably always faster.
>
> And after I saw Alex's post I would not have thought that one could do 
> it that way, thanks Alex. On top it is by far the fastest.
>
> On the other hand sort by myFunction(each) is so powerful that you can 
> do things that are probably not possible inline.
>
> Kind regards
> Bernd
>
>
>
>
> hh via use-livecode<https://www.mail-archive.com/search?l=use-
> livec...@lists.runrev.com=from:%22hh+via+use%5C-livecode%22> Sat, 30 
> Jun 2018 03:12:55 -0700<https://www.mail-archive.com/search?l=use-
> livec...@lists.runrev.com=date:20180630> wrote:
>
>
> @Bernd
> Depending on the function an inline computation (as Alex denoted) may 
> be even faster than the private function calls?
> Here, with IPv4 addresses, it is faster.
>
> ___
> 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: WooCommerce API Manager & Livecode

2018-06-30 Thread Tom Glod via use-livecode
ok i did.wanted to pass this along too

https://wordpress.org/plugins/software-license-manager/

On Sat, Jun 30, 2018 at 3:52 PM, Peter Bogdanoff via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Yes, of course.
>
> bogdan...@me.com
>
> Peter
>
>
> > On Jun 30, 2018, at 12:23 PM, Tom Glod via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Woocommerce works awesome ..its a safe and sound decision.  I almost did
> > all that work, but the project did not go ahead.
> >
> > I checked out your website and i am quite interested in what you are
> > building.
> >
> > Can I send you a PM about your project?
> >
> >
> > On Sat, Jun 30, 2018 at 3:09 PM, Peter Bogdanoff via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> >> Hi,
> >>
> >> Has anyone integrated WooCommerce API Manager into Livecode?
> >>
> >> I have a WooCommerce/WordPress website using WooCommerce Subscriptions.
> I
> >> want to use issued serial keys from API Manager to activate my
> application
> >> and then later have my application verify subscription currency when the
> >> app opens.
> >>
> >> I need to implement direct communication between WooCommerce and my
> >> application. I see that there is PHP and JSON involved. Some hints about
> >> how to get going with this would be great!
> >>
> >> Earlier, on this list, I was looking for help with a product call
> >> SoftwareShield, but that product appears to be so obscure that no one
> seems
> >> to have any knowledge of it, I’m switching to a WooCommerce plugin for
> the
> >> time being.
> >>
> >> Peter Bogdanoff
> >> ArtsInteractive
> >>
> >>
> >> ___
> >> 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: WooCommerce API Manager & Livecode

2018-06-30 Thread Peter Bogdanoff via use-livecode
Yes, of course.

bogdan...@me.com

Peter


> On Jun 30, 2018, at 12:23 PM, Tom Glod via use-livecode 
>  wrote:
> 
> Woocommerce works awesome ..its a safe and sound decision.  I almost did
> all that work, but the project did not go ahead.
> 
> I checked out your website and i am quite interested in what you are
> building.
> 
> Can I send you a PM about your project?
> 
> 
> On Sat, Jun 30, 2018 at 3:09 PM, Peter Bogdanoff via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Hi,
>> 
>> Has anyone integrated WooCommerce API Manager into Livecode?
>> 
>> I have a WooCommerce/WordPress website using WooCommerce Subscriptions. I
>> want to use issued serial keys from API Manager to activate my application
>> and then later have my application verify subscription currency when the
>> app opens.
>> 
>> I need to implement direct communication between WooCommerce and my
>> application. I see that there is PHP and JSON involved. Some hints about
>> how to get going with this would be great!
>> 
>> Earlier, on this list, I was looking for help with a product call
>> SoftwareShield, but that product appears to be so obscure that no one seems
>> to have any knowledge of it, I’m switching to a WooCommerce plugin for the
>> time being.
>> 
>> Peter Bogdanoff
>> ArtsInteractive
>> 
>> 
>> ___
>> 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: Sort IP List

2018-06-30 Thread Tom Glod via use-livecode
good thread you guys...code optimization questswhat fun.

On Sat, Jun 30, 2018 at 2:01 PM, Niggemann, Bernd via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hermann,
>
> I did not see Alex's solution until after I posted. I agree that inline is
> probably always faster.
>
> And after I saw Alex's post I would not have thought that one could do it
> that way, thanks Alex. On top it is by far the fastest.
>
> On the other hand sort by myFunction(each) is so powerful that you can do
> things that are probably not possible inline.
>
> Kind regards
> Bernd
>
>
>
>
> hh via use-livecode<https://www.mail-archive.com/search?l=use-
> livec...@lists.runrev.com=from:%22hh+via+use%5C-livecode%22> Sat, 30
> Jun 2018 03:12:55 -0700<https://www.mail-archive.com/search?l=use-
> livec...@lists.runrev.com=date:20180630> wrote:
>
>
> @Bernd
> Depending on the function an inline computation (as Alex denoted)
> may be even faster than the private function calls?
> Here, with IPv4 addresses, it is faster.
>
> ___
> 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: WooCommerce API Manager & Livecode

2018-06-30 Thread Tom Glod via use-livecode
Woocommerce works awesome ..its a safe and sound decision.  I almost did
all that work, but the project did not go ahead.

I checked out your website and i am quite interested in what you are
building.

Can I send you a PM about your project?


On Sat, Jun 30, 2018 at 3:09 PM, Peter Bogdanoff via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi,
>
> Has anyone integrated WooCommerce API Manager into Livecode?
>
> I have a WooCommerce/WordPress website using WooCommerce Subscriptions. I
> want to use issued serial keys from API Manager to activate my application
> and then later have my application verify subscription currency when the
> app opens.
>
> I need to implement direct communication between WooCommerce and my
> application. I see that there is PHP and JSON involved. Some hints about
> how to get going with this would be great!
>
> Earlier, on this list, I was looking for help with a product call
> SoftwareShield, but that product appears to be so obscure that no one seems
> to have any knowledge of it, I’m switching to a WooCommerce plugin for the
> time being.
>
> Peter Bogdanoff
> ArtsInteractive
>
>
> ___
> 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

WooCommerce API Manager & Livecode

2018-06-30 Thread Peter Bogdanoff via use-livecode
Hi,

Has anyone integrated WooCommerce API Manager into Livecode?

I have a WooCommerce/WordPress website using WooCommerce Subscriptions. I want 
to use issued serial keys from API Manager to activate my application and then 
later have my application verify subscription currency when the app opens.

I need to implement direct communication between WooCommerce and my 
application. I see that there is PHP and JSON involved. Some hints about how to 
get going with this would be great!

Earlier, on this list, I was looking for help with a product call 
SoftwareShield, but that product appears to be so obscure that no one seems to 
have any knowledge of it, I’m switching to a WooCommerce plugin for the time 
being.

Peter Bogdanoff
ArtsInteractive


___
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: Sort IP List

2018-06-30 Thread Niggemann, Bernd via use-livecode
Hermann,

I did not see Alex's solution until after I posted. I agree that inline is 
probably always faster.

And after I saw Alex's post I would not have thought that one could do it that 
way, thanks Alex. On top it is by far the fastest.

On the other hand sort by myFunction(each) is so powerful that you can do 
things that are probably not possible inline.

Kind regards
Bernd




hh via 
use-livecode<https://www.mail-archive.com/search?l=use-livecode@lists.runrev.com=from:%22hh+via+use%5C-livecode%22>
 Sat, 30 Jun 2018 03:12:55 
-0700<https://www.mail-archive.com/search?l=use-livecode@lists.runrev.com=date:20180630>
 wrote:


@Bernd
Depending on the function an inline computation (as Alex denoted)
may be even faster than the private function calls?
Here, with IPv4 addresses, it is faster.

___
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: bitwise shifts gone?

2018-06-30 Thread Mark Wieder via use-livecode

On 06/30/2018 10:34 AM, Jerry Jensen via use-livecode wrote:


And I read about bitor in the 9.0.0 dictionary: the operands are treated as 
binary between 0 and a signed 32 bit integer (2^32 - 1) max. So bitor wouldn’t 
do unless it has grown up into the 64 bit world.


 that's a bit (or 32) disappointing.

--
 Mark Wieder
 ahsoftw...@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: bitwise shifts gone?

2018-06-30 Thread Mark Wieder via use-livecode

On 06/30/2018 10:27 AM, Paul Dupuis via use-livecode wrote:


I just looked back in dictionaries for older version back to 6.7.11 and
there are no shift operators in the dictionary. You have bitAnd, bitOr,
bitXor and botNot, but no shifts operators. Are you sure there were ever
in the language to begin with?


Urk. Good catch. I had the dictionary open to LCB.
nvm.

--
 Mark Wieder
 ahsoftw...@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: bitwise shifts gone?

2018-06-30 Thread Jerry Jensen via use-livecode

> On Jun 30, 2018, at 10:03 AM, Jerry Jensen via use-livecode 
>  wrote:
> 
> 
>> On Jun 30, 2018, at 8:00 AM, Mark Wieder via use-livecode 
>>  wrote:
>> 
>> Indeed. I'm not too upset about the loss of the bitshift operators other 
>> than the lack of backward compatibility, but I'm surprised by their demise. 
>> In terms of minimal use of microprocessor cycles I'd expect that the fastest 
>> would be
>> 
>> a || (b << 8) || (c << 16) || (d << 32)
> 
> Yabut - I don’t know if LCScript understands integer numerics. Aren’t numbers 
> always handled as floating point?

And I read about bitor in the 9.0.0 dictionary: the operands are treated as 
binary between 0 and a signed 32 bit integer (2^32 - 1) max. So bitor wouldn’t 
do unless it has grown up into the 64 bit world. 

Agreed that bitshift operators would be a desirable operator, not necessarily 
for this task.
.Jerry



___
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: bitwise shifts gone?

2018-06-30 Thread Paul Dupuis via use-livecode
On Jun 30, 2018, at 8:00 AM, Mark Wieder via use-livecode
 wrote:
> Indeed. I'm not too upset about the loss of the bitshift operators other than 
> the lack of backward compatibility, but I'm surprised by their demise. In 
> terms of minimal use of microprocessor cycles I'd expect that the fastest 
> would be
>
> a || (b << 8) || (c << 16) || (d << 32)

I just looked back in dictionaries for older version back to 6.7.11 and
there are no shift operators in the dictionary. You have bitAnd, bitOr,
bitXor and botNot, but no shifts operators. Are you sure there were ever
in the language to begin with?


___
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: bitwise shifts gone?

2018-06-30 Thread Mark Wieder via use-livecode

On 06/30/2018 10:03 AM, Jerry Jensen via use-livecode wrote:



On Jun 30, 2018, at 8:00 AM, Mark Wieder via use-livecode 
 wrote:

Indeed. I'm not too upset about the loss of the bitshift operators other than 
the lack of backward compatibility, but I'm surprised by their demise. In terms 
of minimal use of microprocessor cycles I'd expect that the fastest would be

a || (b << 8) || (c << 16) || (d << 32)


Yabut - I don’t know if LCScript understands integer numerics. Aren’t numbers 
always handled as floating point?


The operator formerly known as bitShiftLeft would have to use integers, 
at least down at the bytecode level. I think numbers are always strings 
unless they're not.


--
 Mark Wieder
 ahsoftw...@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: bitwise shifts gone?

2018-06-30 Thread Jerry Jensen via use-livecode

> On Jun 30, 2018, at 8:00 AM, Mark Wieder via use-livecode 
>  wrote:
> 
> Indeed. I'm not too upset about the loss of the bitshift operators other than 
> the lack of backward compatibility, but I'm surprised by their demise. In 
> terms of minimal use of microprocessor cycles I'd expect that the fastest 
> would be
> 
> a || (b << 8) || (c << 16) || (d << 32)

Yabut - I don’t know if LCScript understands integer numerics. Aren’t numbers 
always handled as floating point?
.Jerry


___
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: Sort IP List

2018-06-30 Thread Brian Milby via use-livecode
Here are some times on my system for comparison (10 random IPs):

216% - ip2dec: 463 ms
190% - ip2decpvt: 407 ms
171% - ip2dec2: 366 ms
147% - ip2dec2pvt: 314 ms
200% - sortIPList: 427 ms --> original from Bob
100% - sortIPList2: 215 ms --> Alex's inline with constants
152% - sortIPList3: 325 ms --> numtobyte(item 1) &...
107% - sortIPList4: 230 ms --> bitOr instead of +
100% - sortIPList5: 214 ms --> item 4 of each + 256 * (...

sortIPList2 comes out fastest most of the time.  sortIPList5 does come out
ahead on some runs (Alex's alternate code).  I did all of this because I
was curious how the speed of using numtobyte would impact things.  It is
comparable to using a private function (ip2dec2pvt), but still slower than
inline.  While there I decided to also test the bitOr.


On Sat, Jun 30, 2018 at 5:10 AM, hh via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Remains to remark that the upcoming standard IPv6
> with its text representations
> (Section 2.2 of https://tools.ietf.org/html/rfc4291)
> will require more detailed methods,
> both for number base conversion and for item sorts/cosorts
> (the items are hex numbers ...)
>
> @Bernd
> Depending on the function an inline computation (as Alex denoted)
> may be even faster than the private function calls?
> Here, with IPv4 addresses, it is faster.
>
>
>
> ___
> 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: bitwise shifts gone?

2018-06-30 Thread Mark Wieder via use-livecode

On 06/30/2018 03:50 AM, hh via use-livecode wrote:

Mark,

obviously you ask relating to Bob's IPv4 sort problem.


A perceptive observation, as always.



But when optimising (for speed) the connected formula

(1) a + b * 2^8 + c * 2^16 + d * 2^32

using the constants is slightly faster:

(2) a + b * 256 + c * 65536 + d * 16777216


Would bitOr operators increase the speed over additions?



Why is the engine not handling the internal bitshifts easier with (1)?


Indeed. I'm not too upset about the loss of the bitshift operators other 
than the lack of backward compatibility, but I'm surprised by their 
demise. In terms of minimal use of microprocessor cycles I'd expect that 
the fastest would be


a || (b << 8) || (c << 16) || (d << 32)

--
 Mark Wieder
 ahsoftw...@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: MouseMove and HTML5

2018-06-30 Thread Roger Guay via use-livecode
Huh, back to the drawing board. 

Thanks!

> On Jun 30, 2018, at 2:09 AM, hh via use-livecode 
>  wrote:
> 
> MouseMove works in HTML5 standalones, see for example
> http://hyperhh.de/html5/RGBPuzzle-8.0.2X.html
> 
> ___
> 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: bitwise shifts gone?

2018-06-30 Thread hh via use-livecode
Mark,

obviously you ask relating to Bob's IPv4 sort problem.

But when optimising (for speed) the connected formula

(1) a + b * 2^8 + c * 2^16 + d * 2^32

using the constants is slightly faster:

(2) a + b * 256 + c * 65536 + d * 16777216

Why is the engine not handling the internal bitshifts easier with (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: Sort IP List

2018-06-30 Thread hh via use-livecode
Remains to remark that the upcoming standard IPv6
with its text representations
(Section 2.2 of https://tools.ietf.org/html/rfc4291)
will require more detailed methods,
both for number base conversion and for item sorts/cosorts
(the items are hex numbers ...)

@Bernd
Depending on the function an inline computation (as Alex denoted)
may be even faster than the private function calls?
Here, with IPv4 addresses, it is faster.



___
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: MouseMove and HTML5

2018-06-30 Thread hh via use-livecode
MouseMove works in HTML5 standalones, see for example
http://hyperhh.de/html5/RGBPuzzle-8.0.2X.html

___
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: Sort IP List

2018-06-30 Thread Niggemann, Bernd via use-livecode
if you replace ip2dec with the same functionality as Hermann's (HH) function 
with

private function ip2dec2 x
   set the itemdel to "."
   return (item 4 of x) + (item 3 of x * 256) + (item 2 of x * 65536) + (item 1 
of x * 16777216)
end ip2dec2

then the special sort via function is faster than sorting the 4 items of the 
IPlist.

Note "private function" saves about 10 percent, overall Hermann's modified 
script saves about 20 percent compared to Bob's sort by item solution which was 
fastest up to now.

Tested 100.000 random IP addresses.

Kind regards
Bernd



hh via 
use-livecode
 Fri, 29 Jun 2018 16:43:38 
-0700
 wrote:

Your IP addresses [0-255].[0-255].[0-255].[0-255]
are the hex IP numbers converted to base 256.
So you may try the following sorting function that
converts the IPs from base 256 to base 10 (decimal).


function ip2dec x
  set itemdel to "."
  repeat with i=0 to 3
add (item 4-i of x)*256^i to y
  end repeat
  return y
end ip2dec

on mouseUp
  put fld "ips" into s
  sort s numeric by ip2dec(each) # <
  put s into fld "out"
end mouseUp

___
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: Tessellated hexagonal grid?

2018-06-30 Thread Richmond Mathewson via use-livecode

Marvellous.

Thank you very much indeed!

Richmond.

On 30/6/2018 3:26 am, hh via use-livecode wrote:

A simple hexagonal grid creating stack:
http://forums.livecode.com/viewtopic.php?p=168657#p168657

You choose the number of rows and columns and, for "scaling",
the horizontal radius and vertical radius of the circumellipses.

___
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