Re: Sorting by item ... of each and item ... of each

2023-09-06 Thread Craig Newman via use-livecode
gt; 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 matthias rebbe via use-livecode > Sent: Saturday, September 02, 2023

RE: Sorting by item ... of each and item ... of each

2023-09-05 Thread Ralph DiMola via use-livecode
h end f1 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 matthias rebbe via use-livecode Sent: Saturday, September 02, 2023 9:03 PM To: How to use LiveCode Cc: m

Re: Sorting by item ... of each and item ... of each

2023-09-05 Thread Craig Newman via use-livecode
I should have given better context. I one only sorts the same field numeric, one gets: 123 132 213 231 312 321 Which is correct given the list of whole numbers in question. The stable sort allows one to then sort by char 3 of each, to get the result in the “compound” sort below. So am I

Re: Sorting by item ... of each and item ... of each

2023-09-05 Thread Craig Newman via use-livecode
I may be simply misunderstanding… Since HC days, one could concatenate sort criteria using the “&” character, and obtain multiple stable sorts in one go. In LC as well, since given, in a field 1: 231 312 123 213 321 132 and in a button somewhere: on mouseUp get fld 1 sort it numeric by

Re: Sorting by item ... of each and item ... of each

2023-09-03 Thread matthias rebbe via use-livecode
Hello Mark, thanks for explanation and also for your solution. I will try. Maybe i should get my book "regular expressions" from Jeffrey E.F.Friedl from the shelf and should finish reading it, so i could make use of regular expressions in Livecode more often. Regards, Matthias > Am 03.09

Re: Sorting by item ... of each and item ... of each

2023-09-03 Thread matthias rebbe via use-livecode
Thanks Panos, you are right. ;) While reading your answer i remembered that i have done this with 2 separate sorts. I really don't know how i thought to use by sortKey1 and sortKey2 But at least the script editor did not return an error. Should not work so late in the night. Matthias > Am

Re: Sorting by item ... of each and item ... of each

2023-09-03 Thread matthias rebbe via use-livecode
Thanks Phil, i will try. > Am 03.09.2023 um 07:22 schrieb Phil Davis via use-livecode > : > > I believe this works: > > on mouseUp >put fld 1 into tList >sort lines of tList by _sortKey(each) >put tList into fld 2 > end mouseUp > > > function _sortKey pLine >

Re: Sorting by item ... of each and item ... of each

2023-09-03 Thread Mark Waddingham via use-livecode
On 2023-09-03 10:26, panagiotis m via use-livecode wrote: Hello Matthias, I do not think that the syntax "sort by sortKey1 and sortKey2" is supported Heh technically it 'is' - and does do something but it won't be what you expected... So the syntax for sort in this case is: sort by

Re: Sorting by item ... of each and item ... of each

2023-09-03 Thread panagiotis m via use-livecode
Hello Matthias, I do not think that the syntax "sort by sortKey1 and sortKey2" is supported If you have multiple sortKeys, you have to do multiple sorts, for example, in your use case, this should work: set the itemdel to ";" sort lines of tList numeric by item 3 of each sort lines of tList num

Re: Sorting by item ... of each and item ... of each

2023-09-02 Thread Phil Davis via use-livecode
I believe this works: on mouseUp     put fld 1 into tList     sort lines of tList by _sortKey(each)     put tList into fld 2 end mouseUp function _sortKey pLine     set the itemDel to ";"     return item 3 of pLine & ";" & item 2 of pLine end _sortKey I realize

Re: Sorting by item ... of each and item ... of each

2023-09-02 Thread matthias rebbe via use-livecode
Of course my "not working" sort code look like this set the itemdelimiter to ";" sort lines of tList numeric by item 3 of each and item 2 of each. > Am 03.09.2023 um 02:59 schrieb matthias_livecode_150...@m-r-d.de: > > Maybe i do not see the forest for the trees > > I have a tab delimit

Re: Sorting Arrays

2023-08-12 Thread Bob Sneidar via use-livecode
I formatted the sortKeys as I would an SQL query or an LC sort, but then I needed to isolate the key from the parameters because I couldn’t assume the sort key was simply the first word. Sent from my iPhone > On Aug 12, 2023, at 09:36, J. Landman Gay via use-livecode > wrote: > > I used a

Re: Sorting Arrays

2023-08-12 Thread J. Landman Gay via use-livecode
I used a short, one-dimensional numbered array: put the weekdayNames into tDataA split tDataA by cr simpleSortNumberedArray tDataA, "descending,text" But as Alex explained, one dimension wasn't enough. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hypera

Re: Sorting Arrays

2023-08-12 Thread J. Landman Gay via use-livecode
Got it, thanks. The array was numbered but I didn't have enough dimensions. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On August 11, 2023 7:03:33 PM Alex Tweedly via use-livecode wrote: On 11/08/2023 23:00, J. Landman Gay via use-

Re: Sorting Arrays

2023-08-11 Thread Bob Sneidar via use-livecode
Send me what you have. Thanks. Sent from my iPhone > On Aug 11, 2023, at 17:02, Alex Tweedly via use-livecode > wrote: > >  >> On 11/08/2023 23:00, J. Landman Gay via use-livecode wrote: >> On 8/10/23 2:29 PM, Alex Tweedly via use-livecode wrote: >> [ ... code from earlier posting ...] > >>

Re: Sorting Arrays

2023-08-11 Thread Alex Tweedly via use-livecode
On 11/08/2023 23:00, J. Landman Gay via use-livecode wrote: On 8/10/23 2:29 PM, Alex Tweedly via use-livecode wrote: [ ... code from earlier posting ...] I couldn't get this to work until I altered it, but I was using a very simple array. What type of array data did you use? I think I'm missi

Re: Sorting Arrays

2023-08-11 Thread J. Landman Gay via use-livecode
On 8/10/23 2:29 PM, Alex Tweedly via use-livecode wrote: Combining my "traditional" way as above, and your example, I came up with a  simpler way to do the same thing: on simpleSortNumberedArray @pArrayDataA, pSortKeys    local tKeys, tSeq, tOneSortKey, tSortCommand    put seqAsLines(pArrayDat

Re: Sorting Arrays

2023-08-10 Thread Bob Sneidar via use-livecode
I see you are sorting the keys of the array. I’ll give your method a try. Bob S On Aug 10, 2023, at 12:29 PM, Alex Tweedly via use-livecode wrote: And - overall, an alternate suggestion. I think your way is a bot complex. Combining my "traditional" way as above, and your example, I came up wi

Re: Sorting Arrays

2023-08-10 Thread Bob Sneidar via use-livecode
Thanks Alex, not sure how I missed that. I was only testing for a specific use case and only tried numeric descending. Bob S > On Aug 10, 2023, at 12:29 PM, Alex Tweedly via use-livecode > wrote: > > > On 09/08/2023 00:15, Bob Sneidar via use-livecode wrote: >> Has anyone come across a nee

Re: Sorting Arrays

2023-08-10 Thread Alex Tweedly via use-livecode
On 09/08/2023 00:15, Bob Sneidar via use-livecode wrote: Has anyone come across a need to sort a numbered array by the values of the different keys? Here you go. Absolutely I have needed that quite often now. I tend to use sequences (numbered arrays) often - maybe too often. Up until now I

Re: Sorting [was: Polygrid sorting]

2022-08-25 Thread Mike Kerner via use-livecode
oh, i love this topic. this onion is so, so thick. since you are throwing in the curveball of on-demand column sorting, i have several suggestions (and these are just my suggestions): the obvious one is to use one of the bajillion ways that LC can sort, right? grab the data (if you don't already ha

Re: Sorting [was: Polygrid sorting]

2022-08-25 Thread Paul Dupuis via use-livecode
So what if you use the column headers on a PolyGrid (or whatever) to give the user a UI for sorting by column (adding, or not, sort arrows to the header labels). Is it still more efficient to re-query the database with the new, user chosen, sort order and repopulate the PolyGrid? Or more eff

Re: Sorting [was: Polygrid sorting]

2022-08-25 Thread Bob Sneidar via use-livecode
Not sure how that happened. If the source is a DATABASE... On Aug 25, 2022, at 08:02 , Bob Sneidar via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: +1 if the source is a dabs, sort during query. Bob S ___ use-livecode mailing list use-l

Re: Sorting [was: Polygrid sorting]

2022-08-25 Thread Bob Sneidar via use-livecode
+1 if the source is a dabs, sort during query. Bob S On Aug 25, 2022, at 07:21 , Mike Kerner via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: it will probably be faster and more flexible to have your database do your soriting for you, though. On Mon, Aug 15, 2022 at 7:47 PM Paul

Re: Sorting [was: Polygrid sorting]

2022-08-25 Thread Mike Kerner via use-livecode
it will probably be faster and more flexible to have your database do your soriting for you, though. On Mon, Aug 15, 2022 at 7:47 PM Paul Dupuis via use-livecode < use-livecode@lists.runrev.com> wrote: > Perhaps some expansion of the column "pgContentTypeofColumn" property? > The current possible

Re: Sorting [was: Polygrid sorting]

2022-08-15 Thread Paul Dupuis via use-livecode
Perhaps some expansion of the column "pgContentTypeofColumn" property? The current possible values are: text|svg-lcname|imagedata|imagefile|color|boolean|autoincrement Allowing the addition of 'numeric' and 'datetime' would at least allow a mapping to sorts although sort support 'international'

Re: Sorting [was: Polygrid sorting]

2022-08-15 Thread Bob Sneidar via use-livecode
Datagrids have this feature, so yes, I would expect there to be some way to specify what kind of sort you want to do. But it would have to be on a per column basis. But if you are sorting the text yourself, you can use the syntax: sort lines of tText by item n of each. I don't think any assum

Re: sorting datagrids

2022-07-01 Thread Hershel F via use-livecode
this is more what i’m concerned. i’ll give it a shot and let you know. thanks. > On Jun 30, 2022, at 7:26 PM, Bob Sneidar via use-livecode > wrote: > > > put the dgText of group "myDataGrid" into tText > set the itemDelimiter to tab > > repeat with i = 1 to the number of lines of tText > p

Re: sorting datagrids

2022-06-30 Thread Bob Sneidar via use-livecode
Or are you talking about sorting the DATA of a datagrid? put the dgText of group "myDataGrid" into tText set the itemDelimiter to tab repeat with i = 1 to the number of lines of tText put item i of tText into tLine sort items of tLine ascending put tLine into line i of tText end repeat

Re: sorting datagrids

2022-06-30 Thread Bob Sneidar via use-livecode
Sure there is! put the dgProp ["columns"] of group myDatagrid into tGridColumns sort tGridColumns ascending set the dgProp ["columns"] of group myDataGrid to tGridColumns I would store the original sort order first though so you can recover. Bob S > On Jun 30, 2022, at 15:59 , Hershel F via

Re: Sorting cards problem solved

2022-01-06 Thread David V Glasgow via use-livecode
Hope I didn’t come over as sarcastic! Not at all. It all took me back to HC days and my astonishment at how powerful and fast searching and marking cards was… I was eagerly following the thread to learn more. > On 4 Jan 2022, at 6:55 pm, J. Landman Gay via use-livecode > wrote: > > On 1/

Re: Sorting cards problem solved

2022-01-04 Thread J. Landman Gay via use-livecode
On 1/3/22 2:53 PM, David V Glasgow via use-livecode wrote: Please let me not be the only one who can’t stand the suspense... I know this topic has taken over the list, and it's probably run its course now so you can breathe easy. The last puzzle remains unsolved, though I got a couple of tips

Re: Sorting cards problem solved

2022-01-03 Thread David V Glasgow via use-livecode
Please let me not be the only one who can’t stand the suspense... > On 3 Jan 2022, at 7:18 pm, J. Landman Gay via use-livecode > wrote: > > On 1/3/22 12:13 PM, Mark Wieder via use-livecode wrote: >> On 1/3/22 9:30 AM, J. Landman Gay via use-livecode wrote: >>> Right, Zweibelwähe should be last,

Re: Sorting cards problem solved

2022-01-03 Thread J. Landman Gay via use-livecode
On 1/3/22 12:13 PM, Mark Wieder via use-livecode wrote: On 1/3/22 9:30 AM, J. Landman Gay via use-livecode wrote: Right, Zweibelwähe should be last, and other Parsley recipes are in the Ps inside the Vegetable category. Just not this one. If I sort by Category (after adding the two fields to t

Re: Sorting cards problem solved

2022-01-03 Thread J. Landman Gay via use-livecode
On 1/3/22 11:38 AM, Klaus major-k via use-livecode wrote: Is this -> "Zweibelwähe" supposed to be a german dish with/from onions? If yes, then it is called -> Zwiebelwähe (Zwiebel = onion in german) "Zweibelwähe" is not a german word. :-) Must have been the client's typo, it's that way in the

Re: Sorting cards problem solved

2022-01-03 Thread Mark Wieder via use-livecode
On 1/3/22 9:30 AM, J. Landman Gay via use-livecode wrote: Right, Zweibelwähe should be last, and other Parsley recipes are in the Ps inside the Vegetable category. Just not this one. If I sort by Category (after adding the two fields to the first two cards as Alex suggested) I see the followin

Re: Sorting cards problem solved

2022-01-03 Thread Klaus major-k via use-livecode
Hi Jaques, > Am 03.01.2022 um 18:30 schrieb J. Landman Gay via use-livecode > : > > Right, Zweibelwähe should be last, and other Parsley recipes are in the Ps > inside the Vegetable category. Just not this one. Is this -> "Zweibelwähe" supposed to be a german dish with/from onions? If yes, the

Re: Sorting cards problem solved

2022-01-03 Thread J. Landman Gay via use-livecode
Right, Zweibelwähe should be last, and other Parsley recipes are in the Ps inside the Vegetable category. Just not this one. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On January 3, 2022 10:38:14 AM Mark Wieder via use-livecode wrot

Re: Sorting cards problem solved

2022-01-03 Thread Mark Wieder via use-livecode
On 1/2/22 9:41 PM, J. Landman Gay via use-livecode wrote: And...the client is pleased but noticed it all sorts very nicely except for the last card, which is in the correct category but out of alphabetical order. Anyone care to figure out why?    - sort by title -- okay    - sort by categor

Re: Sorting cards problem solved

2022-01-02 Thread J. Landman Gay via use-livecode
There seems to be some interest in the recipe content, or maybe the puzzle, given the number of downloads. At any rate, if you downloaded already, please replace the Sort button with the revised script: on menupick pWhich put the last word of pWhich into tFld sort cards by the short id of t

Re: Sorting cards problem solved

2022-01-02 Thread J. Landman Gay via use-livecode
Well, it was an interesting puzzle. The "mark" property has come up before but I didn't think it through enough. This seems to work: put the last word of pWhich into tFld -- popup menu with fld names sort cards by the short id of this cd -- import order; keep first 13 cards at front mark

Re: Sorting cards problem, and a link

2022-01-02 Thread Rick Harrison via use-livecode
Ouch! That’s why I always charge an hourly rate, and never quote by the job. Here’s hoping you solve your problem soon! Rick > On Jan 2, 2022, at 1:17 AM, J. Landman Gay via use-livecode > wrote: > > On 1/1/22 11:30 PM, Rick Harrison via use-livecode wrote: >> I’ve been looking at the exchan

Re: Sorting cards problem, and a link

2022-01-01 Thread J. Landman Gay via use-livecode
On 1/1/22 5:45 PM, J. Landman Gay via use-livecode wrote: Hi Alex, thanks so much for volunteering. There's a Dropbox transfer here: And...that was supposed to be private but anyone else who wants to look, feel free. Maybe you'll find some interesting things to cook. -- Jacqueline Landman Ga

Re: Sorting cards problem, and a link

2022-01-01 Thread J. Landman Gay via use-livecode
On 1/1/22 7:25 PM, Alex Tweedly via use-livecode wrote: I suspect the "sort cards" is crapping out somehow / somewhere when it hits a "No such object" error on the missing field of  a card. I don't know if you can simply add an invisible, disabled field "title" on those extra cards (as I did f

Re: Sorting cards problem, and a link

2022-01-01 Thread J. Landman Gay via use-livecode
On 1/1/22 11:30 PM, Rick Harrison via use-livecode wrote: I’ve been looking at the exchange of messages here which had made me want to ask, why are you sorting cards at all? Wouldn’t it be easier just to use array pointers or an index for the cards. You can sort the pointers however you like and

Re: Sorting cards problem, and a link

2022-01-01 Thread Rick Harrison via use-livecode
Hi Jacque, I’ve been looking at the exchange of messages here which had made me want to ask, why are you sorting cards at all? Wouldn’t it be easier just to use array pointers or an index for the cards. You can sort the pointers however you like and the cards never have to move at all according t

Re: Sorting cards problem, and a link

2022-01-01 Thread Alex Tweedly via use-livecode
Not sure if I understand it properly, but cards 1 and 2 (i.e. the index and the current choice) do not have a field "title" If I do a **sort card by field "title" ** then the cards come out unsorted (or improperly sorted, not sure). I added a field "title" to each of the first 2 cards,

Re: Sorting cards

2022-01-01 Thread J. Landman Gay via use-livecode
Fantastic, thank you. The more eyes, the better. Look for an email. :) I hadn't thought to collect the IDs and titles (title sort seems to work, it's the categories that fail.) But I did look at the original export text file for anomalies and couldn't find anything. I can try your suggestion.

Re: Sorting cards

2022-01-01 Thread J. Landman Gay via use-livecode
On 1/1/22 4:40 PM, doc hawk via use-livecode wrote: paul pondered, I'm not sure about this, but do all the cards have the SAME background with the SAME fields (I think they were Category and Title?). If you have mixed backgrounds - I think there may be sort problems sorting on background fie

Re: Sorting cards

2022-01-01 Thread J. Landman Gay via use-livecode
Except for the first two cards, all the rest use the same background. I created a single card with a single background, and then imported a text file, creating new cards along the way, so I'm sure they're all the same. On 1/1/22 4:36 PM, Paul Dupuis via use-livecode wrote: I'm not sure about th

Re: Sorting cards

2022-01-01 Thread Alex Tweedly via use-livecode
I'd be happy to look - but my knowledge is entirely LC - never touched HC, so that may prevent me seeing something relevant. Suggestions (that you may have tried already :-) : 1. loop through the cards: put the short ID of this card & TAB & field "title" ... after myVariable then try sorting

Re: Sorting cards

2022-01-01 Thread doc hawk via use-livecode
Hmm, I better take that back. Here’s the original manual: https://vintageapple.org/macbooks/pdf/HyperCard_Users_Guide_1988.pdf I’ll plead 30 years . . . ___ use-livecode mailing

Re: Sorting cards

2022-01-01 Thread doc hawk via use-livecode
paul plead > I meant different backgrounds on different cards. For example, cards 1-20 > have background ID 1234 but cards 21-40 have background ID 6789. I think both > both could even have the same name, and have the same fields, but a sort by a > bg fld might only sort the cards with the cur

Re: Sorting cards

2022-01-01 Thread Paul Dupuis via use-livecode
On 1/1/2022 5:40 PM, doc hawk via use-livecode wrote: paul pondered, I'm not sure about this, but do all the cards have the SAME background with the SAME fields (I think they were Category and Title?). If you have mixed backgrounds - I think there may be sort problems sorting on background fi

Re: Sorting cards

2022-01-01 Thread J. Landman Gay via use-livecode
On 1/1/22 2:18 PM, doc hawk via use-livecode wrote: Something is trying to stir in a dusty corner of my mind, from long ago. Didn’t hypercard have some kind of property/tag that cause cards to be excluded from sorting? Or maybe it was something like foreground/background status? As I think ab

Re: Sorting cards

2022-01-01 Thread doc hawk via use-livecode
paul pondered, > I'm not sure about this, but do all the cards have the SAME background with > the SAME fields (I think they were Category and Title?). If you have mixed > backgrounds - I think there may be sort problems sorting on background > fields. Again, this is from memory and I could be

Re: Sorting cards

2022-01-01 Thread Paul Dupuis via use-livecode
I'm not sure about this, but do all the cards have the SAME background with the SAME fields (I think they were Category and Title?). If you have mixed backgrounds - I think there may be sort problems sorting on background fields. Again, this is from memory and I could be wrong. On 1/1/2022 3:

Re: Sorting cards

2022-01-01 Thread doc hawk via use-livecode
Something is trying to stir in a dusty corner of my mind, from long ago. Didn’t hypercard have some kind of property/tag that cause cards to be excluded from sorting? Or maybe it was something like foreground/background status? As I think about tit, there *must* have been something, as hypercar

Re: Sorting cards

2022-01-01 Thread J. Landman Gay via use-livecode
I'm still not having much luck with this. Everything works as expected except that the first 50 cards or so simply don't move. I can't find anything different about them that would explain it. Anyone out there have an inclination to take a look and find what I'm missing? There's nothing confide

Re: Sorting cards

2021-12-30 Thread J. Landman Gay via use-livecode
Thanks for all the ideas, guys. I seem to get the most consistent results if I sort by the short ID of each card and then follow that with the sort for category or title. Because the data was imported from a text file, the original order is the order of the card IDs. What threw me originally is

Re: Sorting cards

2021-12-30 Thread doc hawk via use-livecode
If you’re working on the original stack and not a duplicate, I suppose you could always kill -9 Livecode before it saves . . . ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your sub

Re: Sorting cards

2021-12-30 Thread William Prothero via use-livecode
Actually, I like Jackie’s idea better. Make an array for each of the parameters to be sorted on. Then sort each of the arrays. You can access each card in the sorted order by referring to the card ID in the sorted array. Or you could put each card identifier in a text line with commas between ea

Re: Sorting cards

2021-12-30 Thread William Prothero via use-livecode
It might be less work to just implement your own sorting code. I’ve found them pretty easy to implement. A bubble sort is very simple, but inefficient for a large number of items to sort. If you have a lot of cards, you would want to use a more efficient algorithm. Check out the link below if yo

Re: Sorting cards

2021-12-30 Thread Alex Tweedly via use-livecode
On 30/12/2021 19:38, J. Landman Gay via use-livecode wrote: Thanks for the reply. I understand how it works, my question is how to make it not work that way. :) Basically, I don't want the sub-sort. The 'sub-sort' will only have any effect if there are cards with identical values for the "ti

re: Sorting cards

2021-12-30 Thread Quentin Long via use-livecode
sez J. Landman Gay:> I am converting an old stack to LC and it needs to sort cards by one of two fields. LC does  > stable sorts, so if I sort by field 1 it works, and then if I sort later by >field 2 it retains  > the original sort and does a sub-sort. I don't want that. What's the best way >to

Re: Sorting cards

2021-12-30 Thread Jerry Jensen via use-livecode
Behold the new keyword undoSort > On Dec 30, 2021, at 12:19 PM, doc hawk via use-livecode > wrote: > > > jacqui jagged, > >> What's the best way to ignore the previous sort order? > > I think what you’re looking at here isn’t even livecode itself. > > Just about any computer sort doesn’t ch

Re: Sorting cards

2021-12-30 Thread doc hawk via use-livecode
jacqui jagged, >What's the best way to ignore the previous sort order? I think what you’re looking at here isn’t even livecode itself. Just about any computer sort doesn’t change the order of two objects that “tie” during a sort—whichever was first, remains first. I think you’re going to need

Re: Sorting cards

2021-12-30 Thread J. Landman Gay via use-livecode
Thanks for the reply. I understand how it works, my question is how to make it not work that way. :) Basically, I don't want the sub-sort. On the other hand, something may have gone wrong when sorting by the first field because the order didn't change at all -- it was like I never executed the

Re: Sorting cards

2021-12-30 Thread Alex Tweedly via use-livecode
You shouldn't need to ignore the previous sort. The second sort over-rides the first; it's only when looking at those cards which have the same value for the second field that the previous sorting applies. So if we have A2 B1 A1 C3 If we sort by char 2 of each, we would get    B1 A1 A2 C3 (nb

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-13 Thread Ben Rubinstein via use-livecode
Thanks Mark, now I get it! Ben On 12/09/2021 12:09, Mark Waddingham via use-livecode wrote: On 2021-09-10 19:10, Ben Rubinstein via use-livecode wrote: The other was The only caveat is that it might cause apps mutating lots of medium->large strings concurrently to take up more memory in gener

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-12 Thread Mark Waddingham via use-livecode
On 2021-09-10 19:10, Ben Rubinstein via use-livecode wrote: The other was The only caveat is that it might cause apps mutating lots of medium->large strings concurrently to take up more memory in general... > ... (and any issue arising from that could be resolved by moving to the 64-bit windo

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-11 Thread J. Landman Gay via use-livecode
Ah yes, the cheese thing. I so wish I had saved that thread, but I may have needed an extra backup drive to do it. So listen, and ye shall hear. Long, long ago in the olden days, before there was a forum, before 64-bit apps, back when the QCC reports numbered in the lower hundreds, someone on

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-11 Thread Lagi Pittas via use-livecode
I thought Mark was misremembering Emmental when he said Edam (they do start with an E) but I believe Venezuelan Beaver Cheeses is probably a better analogy as it has many holes caused by the beavers' sharp incisors. and is a bit of a mystery (very difficult to acquire) as is the workings of win

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-10 Thread scott--- via use-livecode
Yes, it did mention cheese... but it was entirely on topic and about LiveCode. (How could Mom not approve.) -- Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email sc...@elementarysoftware.com booth1-360-734-4701

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-10 Thread Bob Sneidar via use-livecode
I’m going to propound on the politics of holey cheese makers in a moment! Sent from my iPhone > On Sep 10, 2021, at 11:16, J. Landman Gay via use-livecode > wrote: > > You're talking about cheese. I'm telling Mom. Nyah. > > -- > Jacqueline Landman Gay | jac...@hyperactivesw.com > HyperActiv

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-10 Thread J. Landman Gay via use-livecode
You're talking about cheese. I'm telling Mom. Nyah. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On September 10, 2021 8:42:48 AM Trevor DeVore via use-livecode wrote: On Fri, Sep 10, 2021 at 8:15 AM Mark Waddingham via use-livecode

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-10 Thread Ben Rubinstein via use-livecode
Hi Mark, Thank you for this, very promising. Only two things puzzled me. One you've already addressed when you corrected the specified cheese. The other was The only caveat is that it might cause apps mutating lots of medium->large strings concurrently to take up more memory in general... >

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-10 Thread Jim Lambert via use-livecode
Cheddar, Edam and Swiss! Very daring references on this list. ___ 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/

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-10 Thread Trevor DeVore via use-livecode
On Fri, Sep 10, 2021 at 8:15 AM Mark Waddingham via use-livecode < use-livecode@lists.runrev.com> wrote: > On 2021-09-10 14:06, Mark Waddingham via use-livecode wrote: > > The windows heap is much more prudent than UNIXy counterparts it would > > seem - where UNIX heaps will happily leave plenty o

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-10 Thread Mark Waddingham via use-livecode
On 2021-09-10 14:06, Mark Waddingham via use-livecode wrote: The windows heap is much more prudent than UNIXy counterparts it would seem - where UNIX heaps will happily leave plenty of free space (which the heaps know about and thus can re-use), Windows appears to avoid that like the plague (whic

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-10 Thread Mark Waddingham via use-livecode
On 2021-09-02 18:38, Mark Waddingham via use-livecode wrote: We will endeavour to fix for 9.6.5-rc-1 (due 'real soon now'!). So I have been prodding the windows 'accumulating large strings' speed problem this week (in amongst other things). It is definitely memory allocation causing the prob

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-03 Thread Ben Rubinstein via use-livecode
I'm very much hoping that Mark W might magically fix this in 9.6.5. But in the meantime FWIW, the place where this was really hurting (in a script that took 8 minutes under LC6, was taking 8 hours under LC9, but I've gradually tamed it down to under an hour by buffering the large accumulations)

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-02 Thread Bob Sneidar via use-livecode
I am going to say no, because you still have to traverse the file once to get it into sqLite, then do the sort, then write out the file when done. I might be mistaken, the subsequent SQL sort may make up for lost time. Using a memory SQL really shines when you need to make multiple passes at the

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-02 Thread Bernard Devlin via use-livecode
Whilst waiting for a fix, would a temporary solution be to use sqlite to create an in-memory database and let sqlite do the sorting for you? Regards, Bernard. On Mon, Aug 30, 2021 at 8:23 PM Ben Rubinstein via use-livecode < use-livecode@lists.runrev.com> wrote: > Thanks to Mark Waddingham's adv

Re: Sorting text is *VERY* slow in LC9 on Windows (Re: Accumulating text is *VERY* slow in LC9 on Windows)

2021-09-02 Thread Mark Waddingham via use-livecode
On 2021-08-30 20:22, Ben Rubinstein via use-livecode wrote: Thanks to Mark Waddingham's advice about using a buffer var when accumulating a large text variabel in stages, I've now got a script that took 8 hours under LC9, and (8 minutes under LC6) down by stages to just under 1 hour under LC9. H

Re: sorting lines by date

2020-07-12 Thread David V Glasgow via use-livecode
Thanks everyone & Curry. I will play with this some more. Looking at the lists I am given, most of the date columns are declared to be UTC. I intended to try to detect other formats in due course, but thought I’d start with the common one. Reminds me of my favourite Jake Peralta line: “Stupi

Re: sorting lines by date

2020-07-11 Thread Curry Kenworthy via use-livecode
Like everything field and text related, this thread caught my eye! :) One of my favorite areas of LiveCode, and also one of the areas I have to actively keep an eye on since I rely on it a lot. Here's an observation that might help in one way or another David: > http://adomain/27/06

Re: sorting lines by date

2020-07-10 Thread JB via use-livecode
Another idea might be to save it as seconds and then convert it to a date when the user needs to see the date. That way you would save the time converting all the dates in each sort. JB > On Jul 10, 2020, at 9:02 PM, Tom Glod via use-livecode > wrote: > > Yeah it will add some overhead, but

Re: sorting lines by date

2020-07-10 Thread Tom Glod via use-livecode
Yeah it will add some overhead, but it will work to do what you need. I'm sorry I'm not fluent in the syntax of sort . but I knew you can specify a date I never needed to use it I always store the seconds or milliseconds. Yup.Might as well convert to seconds and then sort numeric asce

Re: sorting lines by date

2020-07-10 Thread JB via use-livecode
If you are having problems with the date itself not being sorted properly you might be able to accomplish it by first converting the date to seconds and then sort the data. It will take more time but might work. JB > On Jul 10, 2020, at 3:06 PM, David V Glasgow via use-livecode > wrote: > >

Re: sorting lines by date

2020-07-10 Thread David V Glasgow via use-livecode
Hi Tom, That’s what I thought I was doing. From the dictionary… The dateTime keyword recognizes all LiveCode's date and time formats and sorts them in time order, rather than alphabetical or numeric order. Cheers, David G > On 10 Jul 2020, at 11:24 pm, Tom Glod via use-livecode > wrote: >

Re: sorting lines by date

2020-07-10 Thread Tom Glod via use-livecode
Hi David, you should be able to do this by specifying the sort-type. look up 'sort container' in the dictionary. On Fri, Jul 10, 2020 at 6:07 PM David V Glasgow via use-livecode < use-livecode@lists.runrev.com> wrote: > Livecodeistas, > > I am working with text files consisting of many thousands

Re: Sorting strangeness

2019-09-18 Thread Paul Dupuis via use-livecode
Good to know. Thank you. On 9/18/2019 11:03 AM, Mark Waddingham via use-livecode wrote: On 2019-09-18 15:43, Paul Dupuis via use-livecode wrote: Again, thank you Mark - this helped immensely. In making a commercial text analytics application, we do a lot of sorting of user entered textual data

Re: Sorting strangeness

2019-09-18 Thread Mark Waddingham via use-livecode
On 2019-09-18 15:43, Paul Dupuis via use-livecode wrote: Again, thank you Mark - this helped immensely. In making a commercial text analytics application, we do a lot of sorting of user entered textual data. With the move from LC6.7.11 to LC9.0.5rc1 we discovered the sort text issue bug, but the

Re: Sorting strangeness

2019-09-18 Thread Paul Dupuis via use-livecode
Again, thank you Mark - this helped immensely. In making a commercial text analytics application, we do a lot of sorting of user entered textual data. With the move from LC6.7.11 to LC9.0.5rc1 we discovered the sort text issue bug, but them we many dozens of sort statements through out our cod

Re: Sorting strangeness

2019-09-17 Thread Mark Waddingham via use-livecode
On 2019-09-16 21:54, Paul Dupuis via use-livecode wrote: IF sort lines of ascending text was working correctly for lines of mixed ASCII and Unicode, for someone sorting lines of text that can be Native text, Unicode text (both RTL and LTR), or mixtures of both, is it better to use SORT ... TEXT

Re: Sorting strangeness

2019-09-16 Thread Paul Dupuis via use-livecode
Mark, Thank you, as always, for your incredible depth of knowledge of the engine! Bug filed: https://quality.livecode.com/show_bug.cgi?id=22378 with sample stack and your comments. If I can impose on you, I have one more question related to this topic: IF sort lines of ascending text was wo

Re: Sorting strangeness

2019-09-16 Thread Mark Waddingham via use-livecode
On 2019-09-16 19:01, Paul Dupuis via use-livecode wrote: Thanks Bob for being one of the folks on the list who always tries to offer a solutions for people. That said, I have solutions a plenty. My real question is for LIVECODE, LTD or perhaps someone like Mark Waddingham who could actually tell

Re: Sorting strangeness

2019-09-16 Thread Dar Scott Consulting via use-livecode
I love puzzles. The dictionary says the "text" sort is a codePoint, which I understand as raw. I did a codePoint dump on the original text and got this (decimal): 67 104 105 110 101 115 101 32 20013 25991 10 71 101 111 114 103 105 97 110 32 4325 4304 4320 4311 4323 4314 4312 10

Re: Sorting strangeness

2019-09-16 Thread Paul Dupuis via use-livecode
Thanks Bob for being one of the folks on the list who always tries to offer a solutions for people. That said, I have solutions a plenty. My real question is for LIVECODE, LTD or perhaps someone like Mark Waddingham who could actually tell whether this is the expected behavior (not a BUG, but

  1   2   3   >