## Search found 75 matches

Thu Apr 09, 2020 10:15 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Combination of list of word
Replies: 3
Views: 349

### Re: Combination of list of word

18 words per sequence
18! sequences
5 bits per word (minimum to distinguish 18 individuals)
a billion bytes per gigabyte
~= 70 million gigabytes in your one file

You can be very sure, as you say, "there will be problems to do it."
-- Dick
Thu Apr 09, 2020 4:40 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Combination of list of word
Replies: 3
Views: 349

### Re: Combination of list of word

Hi, Alessio. See "https://en.wikipedia.org/wiki/Permutation" section "k-permutations of n" Since the formula for the number of k-permutations is n factorial, generating the sequences can be very time-consuming. Here's a summary from my code, which follows. name count,sequence count,milliseconds 2,2,...
Thu Jan 23, 2020 7:50 am
Forum: Talking LiveCode
Topic: How to split a folder structure into an array with sub arrays?
Replies: 11
Views: 1169

### Re: How to split a folder structure into an array with sub arrays?

...a list of full paths to the files within the specified folder ... The list of paths has the content for the array, so you can build the array without code to read directories: function arrayFromPaths pPaths local tArray, tFile set the itemDelimiter to "/" repeat for each line tPath in pPaths put...
Mon Jan 20, 2020 11:37 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: combine two fields
Replies: 19
Views: 2026

### Re: combine two fields

Hi, Larry. Here's a technique that may be faster, especially for longer lists, because it does not seek line n of each list for each and every n. function joinLines pList1, tList2, pLineDelimiter, pItemDelimiter -- join lines on line number local tLineNumber, tJoin split tList2 by pLineDelimiter set...
Mon Dec 09, 2019 10:56 pm
Forum: Talking LiveCode
Topic: Concurrent loop/string processing to speed up Livecode
Replies: 21
Views: 2454

### Re: Concurrent loop/string processing to speed up Livecode

Thanks. Yes, the description was clear enough. It host seemed a curious choice to have a specific string as the default value. I'm assuming there was a reason for that choice; it might be useful to know what that reason was. I'm guessing it was strictly arbitrary, you have to put *something* in the...
Thu Dec 05, 2019 6:17 am
Forum: Talking LiveCode
Topic: Concurrent loop/string processing to speed up Livecode
Replies: 21
Views: 2454

### Re: Concurrent loop/string processing to speed up Livecode

FourthWorld wrote:
Thu Dec 05, 2019 4:39 am
... I had forgotten about the "as set" option with the "split" command, but alas it's not mentioned in the dictionary. Where can I find a description of what that does?
Dictionary:split, section:Description, paragraph:6+

<aside>How could the dictionary evolve to help more?</aside>
Thu Dec 05, 2019 3:48 am
Forum: Talking LiveCode
Topic: Concurrent loop/string processing to speed up Livecode
Replies: 21
Views: 2454

### Re: Concurrent loop/string processing to speed up Livecode

Another way to speed up the processing is to eliminate the chunk counting, by invoking the split command. The code from [-hh] derives line numbers and word numbers within the lines of the text. The code from FourthWorld derives word numbers within the whole text. With split they're about 20% faster....
Tue Oct 29, 2019 8:10 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Number combinations [Solved]
Replies: 13
Views: 1704

### Re: Number combinations [Solved]

Bogs: Even though you don't care about speed for this app, perhaps much faster code would be interesting or illuminating. Some feel the need for speed. Hermann's nBits presents a good opportunity for eliminating a "repeat for each line" statement. Here's a version that produces the same output as nB...
Fri Jun 07, 2019 10:05 am
Forum: Talking LiveCode
Topic: Fastest method of comparing two lists.
Replies: 16
Views: 2244

### Re: Fastest method of comparing two lists.

rkriesel wrote:
Fri Jun 07, 2019 9:01 am
You can just feed your long delimited lists into commands difference and union.
should have been:
You can just split your long delimited lists and then feed them into commands difference and union.
Fri Jun 07, 2019 9:01 am
Forum: Talking LiveCode
Topic: Fastest method of comparing two lists.
Replies: 16
Views: 2244

### Re: Fastest method of comparing two lists.

Have you tried commands union and difference? While I have not tried these commands reading the dictionary makes me think that can't use them with the arrays I presently use. You don't seem to need the arrays you presently use. You can just feed your long delimited lists into commands difference an...
Fri Jun 07, 2019 6:04 am
Forum: Talking LiveCode
Topic: Fastest method of comparing two lists.
Replies: 16
Views: 2244

### Re: Fastest method of comparing two lists.

Hi, Simon. Could there be a file name that's used for two different files? Could there be two file names that have the same content? Have you tried commands union and difference? If I understand your requirement, you can get what you want like this: command digest @rUnion, pNewBatch, @rNewLines diff...
Wed Jul 25, 2018 9:36 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to sort out this
Replies: 50
Views: 6444

### Re: How to sort out this

hi rkriesel, ... So bwmilby's script wins the race ;) Despite that, you and bwmilby both won my heart :D Here's a version of bwmilby's handler that's a little simpler (because it uses booleans instead of counters) and therefore a little easier to read and a little faster (a few percent). And it sho...
Tue Jul 24, 2018 10:17 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to sort out this
Replies: 50
Views: 6444

### Re: How to sort out this

alemrantareq wrote:
Tue Jul 24, 2018 6:57 pm

Code: Select all

set the text of fld "f1" to singletonKeys(Temp, ":")
still no success, got my LC crashed while filtering
What does "got my LC crashed" mean? Do you have any evidence to share?
Mon Jul 23, 2018 8:32 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to sort out this
Replies: 50
Views: 6444

### Re: How to sort out this

bogs wrote:
Mon Jul 23, 2018 7:43 pm
That is pretty slick, rkriesel, pretty slick indeed.
Thanks, bogs. I just decided to compare a similarly instrumented edition of bwmilby's version (i.e., without accessing any field).

bwmilby's version won by about a second. That's slicker.

-- Dick
Mon Jul 23, 2018 5:57 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to sort out this
Replies: 50
Views: 6444

### Re: How to sort out this

The goal is to completely remove any key that is repeated (not just the duplicates). ... Hi, Alemrantareq. Here's a version which finds 457999 singleton keys in your file of 1373240 lines in under 6 seconds here. function singletonKeys pLines, pItemDelimiter local tAllKeys, tPriorKey, tDuplicatedKe...