It is currently October 27th, 2024, 3:23 pm

Natural sorting please...

Get help with installing and using Rainmeter.
User avatar
sl23
Posts: 1839
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Natural sorting please...

Post by sl23 »

Is there currently a way to use natural sorting in the entire app?
I find it seriously annoying to find variables, adjust variants, fileview, and other stuff in the app in various locations from Context menus to About window. I really don't understand why you chose to use this method that is very unreadable and awkward for the majority who don't even use the current method of reading numbers the way they are currently portrayed. Hence the name Natural sorting. It's more easily read and understood, easier to find what you are looking for.
Sorry for the rant, no offence meant! :rosegift:

But please, can we have natural sorting added, even if just as a user preference in the settings?
Thank you very much :D :thumbup:
57686174 77696C6C 6265 77696C6C 6265
User avatar
jsmorley
Developer
Posts: 22891
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Natural sorting please...

Post by jsmorley »

In the About / Skins window, Measures are displayed in the order they are defined in the skin .ini file. Variables are sorted strictly alphabetically. In the Manage window, skin folders are sorted strictly alphabetically. This is not likely to change. Natural sorting is nice, but I'm not sure there are enough places in Rainmeter that we sort things to display them to make the effort worth it.

https://en.wikipedia.org/wiki/Natural_sort_order

The basic idea of Natural Sorting is:

Alphabetical sorting:
z11
z2

Natural sorting:
z2
z11

Multi-digit "numbers'" are treated as a single entity, so in this instance 2 would sort before 11 in Natural Sorting. I'm certainly not opposed to this, but I can't see it as a very high priority.
User avatar
sl23
Posts: 1839
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Natural sorting please...

Post by sl23 »

Oh ok, so my terminology was off... :oops:
But, in FileView it is not ok to have it how it currently is. About skins is a pita to find stuff using current method too.
Why exactly isn't it just used alphabetically instead? This, I never understand in any GUI meant for users. :confused:
57686174 77696C6C 6265 77696C6C 6265
User avatar
jsmorley
Developer
Posts: 22891
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Natural sorting please...

Post by jsmorley »

In About / Skins, the "measures" are not sorted, but are displayed in the order they are defined in the skin. This is very logical, as the order measures are defined in the skin can have a functional impact on how they are executed and their results. Variables on the other hand, are sorted alphabetically, since 1) there is no real importance to the order they are defined in the skin, and 2) there can be enough of them that it can make things easier to find if they are sorted alphabetically.

The list of configs in the Manage window is sorted alphabetically.

The FileView plugin has options to define how things are to be sorted, and all of the options are alphabetical or chronological in nature, ascending or descending.

Nothing in Rainmeter uses "natural sorting", and again, while I'm not opposed to it, I don't see it as a high priority.

We appreciate your feedback.
User avatar
sl23
Posts: 1839
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Natural sorting please...

Post by sl23 »

I know, but the Variables ARE. I don't mind the measures being that way as you say, it's logical and makes it easier in a way.
Variables are NOT sorted alphabetically, according to your description:
Alphabetical sorting:
z11
z2

They are sorted Naturally:
Natural sorting:
z2
z11
Natural sorting About.JPG
As I have over 100 Variables in this skin, which has three FileView Parents containing 25, 40, 20 children respectively, plus all other variables, this makes it a pita to find specific ones when trouble shooting. It slows you down quite a bit trying to verify if you have the correct one, instead of just seeing it and moving on to your next step. You know what I mean?

And in the FileView!!! Well, that shouldn't even be a thing imo!
Here's a screenshot of FileView Natural sorting:
Natural sorting.JPG
Just to clarify, in case you missed it. My point is that I would like Alphabetical NOT Natural sorting as the thread title stated. That was my misunderstanding of the terminology. :)
You do not have the required permissions to view the files attached to this post.
57686174 77696C6C 6265 77696C6C 6265
User avatar
jsmorley
Developer
Posts: 22891
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Natural sorting please...

Post by jsmorley »

No, they are certainly sorted alphabetically in the list you posted.

For instance, you have m20Name sorted before M2Name, this is perfectly logical by strict alphabetical order, as "0" sorts before "N".

Please point out anything in that list that is not sorted alphabetically. Remember that the entirety of the string is considered when sorting, not just any embedded numbers.

As for FileView, the sorting is entirely up to you. https://docs.rainmeter.net/manual/plugins/fileview/#SortType. Again, if you sort alphabetically by Name, it will in fact sort alphabetically by Name.
User avatar
jsmorley
Developer
Posts: 22891
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Natural sorting please...

Post by jsmorley »

If you want a more readable list of for instance variables, I might suggest that you name them in a way that facilitates a more pleasing visual sorting.

m002Name
m022Name
m222Name

So the "length" of the embedded numbers forces a better sorting than:

m2Name
m22Name
m222Name

Which would "sort" as:

m222Name
m22Name
m2Name

Same thing with the folder names in your example of FileView.
User avatar
Yincognito
Rainmeter Sage
Posts: 8576
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Natural sorting please...

Post by Yincognito »

Well, jsmorley wrote precisely what I wanted to mention too, regarding the periodic order of execution and interdependence between measures, so I'll only add one thing: if you want a10 to come after a9, even though they are in lexicographic aka machine alphabetic order, just zero pad the numbers.

EDIT: jsmorley beat me to it... again. :lol:

Mind you, zero padding will make plain mathematical referencing sections slightly harder (e.g. when iterating in bangs), since you'd also need to use a zero padded string value to do it.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
sl23
Posts: 1839
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Natural sorting please...

Post by sl23 »

Either you're contradicting yourself or I don't understand what the hell you're talking about, and now I'm confused which is which! :rofl:

You stated that ALPHABETICAL SORTING means this:
m2Name
m22Name
m222Name

And this:
z11
z2

ie, counts from 1 - 100 as any human would do. To me, that is NATURAL SORTING, ie, it is how we naturally count. No-one on earth counts the other way around, do they?! That's rhetorical btw.

So my interpretation of NATURAL SORTING is how I just described, and is how I want it to appear in Rainmeter. I do not wish to add leading zeros, that just makes it as awkward to read imo. So is there a way to do it naturally, ie in a human readable naturally counting way? :D

Sorry if that came across the wrong way, just trying my best to explain, and I'm pretty crap at that sometimes! :oops:
57686174 77696C6C 6265 77696C6C 6265
User avatar
sl23
Posts: 1839
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Natural sorting please...

Post by sl23 »

Yincognito wrote: September 22nd, 2024, 2:39 pm Well, jsmorley wrote precisely what I wanted to mention too, regarding the periodic order of execution and interdependence between measures, so I'll only add one thing: if you want a10 to come after a9, even though they are in lexicographic aka machine alphabetic order, just zero pad the numbers.

EDIT: jsmorley beat me to it... again. :lol:

Mind you, zero padding will make plain mathematical referencing sections slightly harder (e.g. when iterating in bangs), since you'd also need to use a zero padded string value to do it.
Thanks, but I do not want to zero pad things, I dislike it, it's not natural, and I really do not understand why NATURAL ordering isn't the norm. :confused:
57686174 77696C6C 6265 77696C6C 6265