btdu - a sampling disk usage profiler for btrfs (written in D)
user1234
user1234 at 12.de
Mon Nov 9 12:21:55 UTC 2020
On Sunday, 8 November 2020 at 17:23:32 UTC, Vladimir Panteleev
wrote:
> https://blog.cy.md/2020/11/08/btdu-sampling-disk-usage-profiler-for-btrfs/
>
> https://github.com/CyberShadow/btdu
>
> D-related thoughts:
>
> - D programs that build fine on one Linux machine may still
> fail to build with mysterious linking errors on another, even
> when using Dub which takes care of dependency management. I saw
> two counts of this, caused by differences in DMD/LDC and
> Arch/Debian (one being that, for whatever reason, libz is not
> pulled in on LDC/Debian despite being a Phobos dependency).
> Also, LDC is the D compiler that's installed by default when
> the system wants a D compiler (e.g. if you try do install Dub
> by itself).
>
> - The garbage collector is still a major hindrance for system
> programming. In this case it was due to the ioctls used being
> slow, and when the GC tries to stop the world to do its thing,
> it just hangs the entire program until ALL ioctls in all
> threads complete. This means it wasn't possible to have a
> stutter-free interactive UI, so I had to move processing to
> subprocesses.
>
> - One user wondered why the program needed so many threads. The
> answer was that half of them were owned by the GC (it never
> stops its worker threads, they just sit idle).
>
> - I used the Deimos ncurses bindings package. I'm thankful that
> it already existed, though I had to push some fixes to fix
> static linking. The most annoying part was waiting overnight
> for code.dlang.org to pick up the new tags, because there is no
> way to get it to update a package unless you're the owner, and
> no way to otherwise specify a dependency unless using a branch
> (which is deprecated and prints a big warning when your users
> build your program).
>
> - Nice D features that came in useful: reflection to generate a
> lightweight serializer/deserializer for subprocess
> communication; strings as slices to allow processing them
> without copying them out of the network buffer; and template
> mixins to add common behavior to types without runtime
> polymorphism.
I like the report about how D was efficienet to develop this
tool, otherwise
what do you use it for ? What is the typical usage of such tools ?
More information about the Digitalmars-d
mailing list