SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

A collection of especially useful xplorer² topics and ideas. New users may find it helpful to look here before searching the other forums for information. >>>>>> Please post new material in the relevant forum. (New stuff posted here will be removed.) Thanks. -fg-

Moderators: fgagnon, nikos

Kilmatead
Platinum Member
Platinum Member
Posts: 4814
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

Yeah, I never had Turbo Pascal on a PC, largely because I didn't have a PC at the time. I had an aging Commodore 64 (with a floppy begged from the local shop on permanent "loan") which ran a variant of Pascal - and I used that to write a C emulator in anticipation of actually getting not only a PC but also a proper C compiler.

I remember ripping my (over-priced) copy of Kernighan & Ritchie apart to put it in a ring-binder (for easier flat-table reference), and using Pascal to interpret the examples in the book until I got the results it said I should get. Didn't really understand what I was doing at the time (I didn't know anyone who knew C who could explain it to me), so I guessed a lot; emulating pointers is... fun?

Anyway, I'm thinking that accounts for my misremembering of the C timeline.

Hmm... Pascal 64 for C64 was published in '84 so that sounds about right. I like how it mentions having a "monitor" as being a minimum hardware requirement. Simpler times. :D
User avatar
nikos
Site Admin
Site Admin
Posts: 16310
Joined: 2002 Feb 07, 15:57
Location: UK

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by nikos »

Image
Kilmatead
Platinum Member
Platinum Member
Posts: 4814
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

Isn't there some kind of immutable law that says developers are not allowed to be nostalgic 2 days after officially dropping their own support for older platform versions? I think there is. :wink:
Tuxman
Platinum Member
Platinum Member
Posts: 1691
Joined: 2009 Aug 19, 07:49

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Tuxman »

Ah, the OpenBSD team had removed support for their original platforms, SPARC non-64 (where Theo de Raadt started) and the VAX (where much of today’s UNIX started), a surprisingly short while ago, but it would be foolish to assume that there is no bit of nostalgia left when talking about those platforms.

Coincidentally, Pascal was one of the first programming languages which I knew sufficiently enough, and I jumped back into the cold waters of modern Pascal just a few years ago (having started my most recent serious-ish GUI project in 2022); it is still a fine tool if your brain does not let you design GUIs from a text file, and multi-platform near-native GUI applications are exactly the amount of easy I need with Lazarus. That said, programming language nostalgia is a good thing, and Wirth’s other good invention - leaving his other (roughly) twelve billion own languages and programming concepts aside for now, nobody uses a Modula anyway - is Wirth’s Law: Software is getting slower more rapidly than hardware is becoming faster.

One way to fight the bloat of new batteries-included programming languages is to use what was there before everyone had 72 TiB of RAM. :)
Tux. ; tuxproject.de
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012
Kilmatead
Platinum Member
Platinum Member
Posts: 4814
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

Unbeknownst to him, Tuxman has written his first x2 plugin! :bigsmile: Congratulations!

Well, ok, in an act of unscrupulous thieving, skullduggery, and employing the basic five-finger discount, I have incorporated without any permission whatsoever (though in full obeisance to the WTFPL v2 License), his FileWeight project (courtesy of tuxproject.de).

In short, SizeES now includes an extra column "Weight.ES" which will "estimate a medium weight (in grams) for the file or folder, based on a value of (62.5+1)/2 = 31.75 million iron atoms per bit." (See this article for the original inspiration.)

Image

Obviously for those browsing SSD's you'll just have to imagine this number as a reference to the physical weight the file or folder would have if it were on an old "spinning-rust" mechanical drive.

Q. Why would you want this information?
A. No reason at all.

Q. Is it useful in any way?
A. God I hope not.

The plugin version is now 0.0.0.3 (download link in the first post in this thread has been updated). The only other thing added of note is that the BytesOnly setting now displays sizes segmented into thousands for "easier" reading (uses LOCALE_STHOUSAND splitter for our foreign and/or possibly comma-phobic friends).

Enjoy.

Postscriptum: To show that I am not a completely unfeeling pilferer and plunderer, I will happily pass on Tuxman's share of the profits from this plugin to him at the standard German VAT rate of 19%, which will amount to a generous monthly cheque of approximately €0.00. Umsatzsteuer, indeed. :wink:
Tuxman
Platinum Member
Platinum Member
Posts: 1691
Joined: 2009 Aug 19, 07:49

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Tuxman »

Coincidentally, that was also my first own C project. I wish I could say that I have learned something since then, but I didn’t. :)

Then again, most projects on that website were started because I wanted to do something with the language. I’m actually glad that you chose this one. At least I still understand what its code does!
Tux. ; tuxproject.de
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012
User avatar
nikos
Site Admin
Site Admin
Posts: 16310
Joined: 2002 Feb 07, 15:57
Location: UK

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by nikos »

next challenge: incorporate cutting edge recent developments in bit porkness
https://cmte.ieee.org/futuredirections/ ... it-weight/
User avatar
johngalt
Gold Member
Gold Member
Posts: 652
Joined: 2008 Feb 10, 19:41
Location: 3rd Rock

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by johngalt »

Hi minor grammar mistakes aside, it's funny how people were going off on trying to quantitatively assign mass to something that is, for all intents and purposes, energy.

While my 'bitness' has definitely 'porkified' over the years, I take supreme solace in the fact that the storage media associated with said porkification has, in fact, been reduced tremendously - all my drives on my current rig are NVMe drives, no monstrous spinner platforms for me!

:roll: :lol: :wink:
Image
Kilmatead
Platinum Member
Platinum Member
Posts: 4814
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

johngalt wrote: 2024 May 30, 18:24all my drives on my current rig are NVMe drives, no monstrous spinner platforms for me!
I have no doubt that the child-labour in the Congolese cobalt mines fully appreciates our Western innocence and non-monstrous morality-free beliefs that our tech doesn't weigh very much.

Image
User avatar
johngalt
Gold Member
Gold Member
Posts: 652
Joined: 2008 Feb 10, 19:41
Location: 3rd Rock

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by johngalt »

Naturally, I was referring to the end product, versus the effect the technology has upon the plight of man in general.

Because if that were truly a factor, then I suspect that I would not even be posting here, nor would many, many others of us here.
Image
Kilmatead
Platinum Member
Platinum Member
Posts: 4814
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

Yeah, I know that, I was just thinking that given your nomenclature-familiarity with Ayn Rand that it was... what's the basketball idiom? A Slam Dunk? I'm dark that way. :wink:
johngalt wrote:...nor would many, many others of us here.
Never underestimate the capacity for garden-variety psychopathy to find a safe perch in every honest aviary.
User avatar
johngalt
Gold Member
Gold Member
Posts: 652
Joined: 2008 Feb 10, 19:41
Location: 3rd Rock

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by johngalt »

Gods, I've missed you being here.

Thanks for yet another chuckle here in these threads!
Image
Kilmatead
Platinum Member
Platinum Member
Posts: 4814
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

A substantial update (to v2.0.0.1) for the plugin to coincide with the release of x2 v6.0.0.1. The download in the first post of this thread has been updated. The explanations of how it works are going to be a work in progress as I decide how to rewrite the original post, but all the salient points are there now.

In a rare case of Nikosian-Glasnost, this plugin now has full integration with x2!

Yes kids, really! :D

Code: Select all

Changelog for 2.0.0.1

Added: Automatic integration with the Size [S] column in x2 v6.0.0.1 or above
	- No column selection is necessary, just use the native x2 'Size' column
	- The legacy Size.ES column has been replaced with Status.ES which reports this plugin's functional integration with x2 on a folder-by-folder basis
	- The legacy Weight.ES column has been deprecated (Still available in the v0.0.0.3 download), replaced with Reserved.ES (same as Status.ES for now)
	- There is now a third column uint64_t.ES which provides the raw byte-count for Size [S] - there is no need to activate this column
	- If an INI from a prior installation is found, it will be overwritten to enforce the new changes

Added: x86 build for users of 32-bit xplorer2
Added: INI option 'EnableIntegration[=1]' to enable/disable integrating this plugin with x2's Size [S] column
Added: INI option 'OnErrorDeferRootFolders[=0]' to protect against unnecessary x2 processing of roots if ES fails or is not configured properly
	- For example, instead of accidentally trying to calculate C:\Windows et al, it will simply return 0 bytes instead, indicating a misconfiguration fault
Added: INI option 'OnErrorDeferNonRootFolders[=1]' (as Above)
	- Disabling this shows all folder sizes as 0 bytes which makes an ES misconfiguration fault more obvious without needing the Status.ES column

Fixed: If the plugin was renamed (and would thus fail to work), Status.ES didn't report the correct cause of the dysfunction
Fixed: Status.ES didn't report error when run on x2 versions below 6.0.0.1
Fixed: Deference test for FolderIndexing optimised by only polling when zero, not every iteration
And yes, it really does work seamlessly. It may take a few extra steps to setup, but not many, and once done you'll forget it's there. And it even works with the portable version of Everything, so trying it is painless.

I've been testing/rewriting this v2 of the plugin for a while now, but any feedback about the more obscure things like network indexing which I can't really test will be most welcome. All of that sort of thing is handled in the extensive Everything options, but if it works there, it should work here. (Famous last words.) :wink:

It should also be pointed out that this version will only work with x2 v6.0.0.1 or above. The old plugin still has a download link and will continue to work with any x2 version which supports plugins.

One of the nice things about how the IPC (Inter-Process Communication) of ES works is that you won't need to restart x2 each time you change or experiment with a setting in ES related to indexing - in virtually all situations things will be picked up immediately in x2 with a simple refresh. x2 won't crash or hang or otherwise whine and complain when you modify ES's settings - you can even update ES while it's running (and vice versa), and you won't even notice anything happened, it'll all just keep working. :D
Tuxman
Platinum Member
Platinum Member
Posts: 1691
Joined: 2009 Aug 19, 07:49

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Tuxman »

- The legacy Weight.ES column has been deprecated (Still available in the v0.0.0.3 download), replaced with Reserved.ES (same as Status.ES for now)
This is where my five minutes of fame seep away. I have realised that computer technology achievements fade quickly, but the step from ‘new’ to ‘legacy’ seems to have been taken even faster than I am used to. I'm getting old, it seems. The world of Kilmatead has become too fast for me.
Tux. ; tuxproject.de
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012
Kilmatead
Platinum Member
Platinum Member
Posts: 4814
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: SizeES: A Plugin for Fast, Persistent FolderSizes in x2 via Everything Search

Post by Kilmatead »

I felt kind of sad about that, given the column's tender age, but there are plenty of creatures in the animal kingdom who eat their young, and technology certainly hasn't made us any more civilised. With the changes in the plugin it made more sense to separate it off rather than releasing a more awkward to maintain Kitchen-Sink-Casserole-Community-Block-of-Cheese Edition, though that has a better sounding name than mere 'Legacy'. :D

Besides, as one of the Status conditions regarding a memory fault says: "If this were to ever actually occur, I would spontaneously combust into toasted marshmallows", which I imagine might be painful, so I'm the poor bugger taking all risks here. Yours was ever a worthy curio - but hey, it does live on.

And, as with the history of the Aztecs, you do have a grander legacy to pursue:
This world flourished for a period until Quetzalcoatl became jealous of his brother Tezcatlipoca and knocked him out of the sky, plunging the world in darkness. Tezcatlipoca retaliated by having jaguars eat all the people of the world.
I've got marshmallows, you've got jaguars - I ask you, which of us has really won or lost at the end of the day? :wink: