Search found 71 matches

by rkriesel
Mon Dec 09, 2019 10:56 pm
Forum: Talking LiveCode
Topic: Concurrent loop/string processing to speed up Livecode
Replies: 21
Views: 1233

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...
by rkriesel
Thu Dec 05, 2019 6:17 am
Forum: Talking LiveCode
Topic: Concurrent loop/string processing to speed up Livecode
Replies: 21
Views: 1233

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>
by rkriesel
Thu Dec 05, 2019 3:48 am
Forum: Talking LiveCode
Topic: Concurrent loop/string processing to speed up Livecode
Replies: 21
Views: 1233

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....
by rkriesel
Tue Oct 29, 2019 8:10 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Number combinations [Solved]
Replies: 13
Views: 1074

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...
by rkriesel
Fri Jun 07, 2019 10:05 am
Forum: Talking LiveCode
Topic: Fastest method of comparing two lists.
Replies: 16
Views: 1616

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.
by rkriesel
Fri Jun 07, 2019 9:01 am
Forum: Talking LiveCode
Topic: Fastest method of comparing two lists.
Replies: 16
Views: 1616

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...
by rkriesel
Fri Jun 07, 2019 6:04 am
Forum: Talking LiveCode
Topic: Fastest method of comparing two lists.
Replies: 16
Views: 1616

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...
by rkriesel
Wed Jul 25, 2018 9:36 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to sort out this
Replies: 50
Views: 5330

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...
by rkriesel
Tue Jul 24, 2018 10:17 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to sort out this
Replies: 50
Views: 5330

Re: How to sort out this

alemrantareq wrote:
Tue Jul 24, 2018 6:57 pm
hi bwmilby, if you are talking about this:

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?
by rkriesel
Mon Jul 23, 2018 8:32 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to sort out this
Replies: 50
Views: 5330

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
by rkriesel
Mon Jul 23, 2018 5:57 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to sort out this
Replies: 50
Views: 5330

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...
by rkriesel
Fri Jul 20, 2018 6:07 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to sort out this
Replies: 50
Views: 5330

Re: How to sort out this

... but the actual result I want is: matsas007@server1:info3143 thedevilcry95@server8:info50289 devilcry537@server7:info3656 xuanphungbd@server3:info51343 44boysatthu98@server5:info96315 tuananhhau@server1:info53476 ... Hi, almenrantareq. Your earlier description suggests you'd also want these: boy...
by rkriesel
Tue May 15, 2018 12:53 am
Forum: Talking LiveCode
Topic: mouseDown cripples menuPick
Replies: 17
Views: 2232

Re: mouseDown cripples menuPick

Code: Select all

on mouseDown
   exit to top
end mouseDown
Now the menu button does not work.
<snip>
Is this OK with everyone?
A system event handler that does not pass risks failure.

mouseDown would happen before menuPick. Why should something happen after exit to top?

-- Dick
by rkriesel
Wed Mar 14, 2018 12:22 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to sort out this
Replies: 50
Views: 5330

Re: How to sort out this

I want to filter a list without dups, but these dups are not lines, just a string before the '@' sign. Hi, alemrantareq. Here's a technique that derives your desired output without invoking repeat: function digestRecords t split t using return and "@" delete variable t["rawdata"] combine t using re...
by rkriesel
Wed Mar 15, 2017 9:52 am
Forum: LiveCode Builder
Topic: array key does not exist ...
Replies: 5
Views: 1925

Re: array key does not exist ...

For the record, a version of what I needed is here: http://forums.livecode.com/viewtopic.php?f=93&t=27408
--Dick

Go to advanced search