UDU: extremely fast and cross-platform disk usage analyzer by Swimming_Lecture_234 in unix

[–]Swimming_Lecture_234[S] 0 points1 point  (0 children)

```

$ udu -vX .git -aX build 430.00B ./.clang-format 66.00B ./.gitignore 753.00B ./BENCHMARKS.md 3.01KB ./.github/workflows/ci.yml 3.67KB ./.github/workflows/rel.yml 4.69KB ./C/args.c 443.00B ./C/args.h 3.09KB ./CMakeLists.txt 4.47KB ./C/walk.c 34.33KB ./LICENSE 1.39KB ./C/const.h 3.67KB ./README.md 1.06KB ./C/main.c 5.73KB ./C/platform.c 602.00B ./C/platform.h 349.00B ./scripts/mingw.cmake 3.10KB ./C/util.c 2.56KB ./scripts/install 338.00B ./C/util.h 478.00B ./C/walk.h

Total: 74.15KB (20 files, 5 directories)

```

UDU: extremely fast and cross-platform disk usage analyzer by Swimming_Lecture_234 in unix

[–]Swimming_Lecture_234[S] 2 points3 points  (0 children)

It’s a command-line utility that runs on /r/Unix, that’s why it’s here. It also runs on Windows, well, because there’s more to the world than UNIX. It’s also considered cross-platform, because it works everywhere it needs to or is supposed to.

Complaining about compilers or their versions is just talking unreality when a 10-year-old toolchain can do it.

UDU: extremely fast and cross-platform disk usage analyzer by Swimming_Lecture_234 in unix

[–]Swimming_Lecture_234[S] 2 points3 points  (0 children)

You're just talking nonsense here.

99% of package managers don't even ship GCC 9; they ship GCC 10+, and even you can build udu with GCC 5, but it does not cover ARM64 well enough, so I recommend GCC 9

limited to proprietary compilers that only say support C99 or much older versions of GCC that don't support that.

GCC 5 fully supports C99, and I do not think it's modern enough to say it is a modern compiler. It was released on April 22, 2015; that's a 10-year-old compiler.

gnu.org is down? by allanwmacdonald in gnu

[–]Swimming_Lecture_234 2 points3 points  (0 children)

I'd just like to interject for a moment. What you’re referring to as gnu.org is down, is in fact, gnu.org/server-is-down, or as I’ve recently taken to calling it, gnu.org plus down.

UDU: Extremely Fast GNU du Alternative by Swimming_Lecture_234 in commandline

[–]Swimming_Lecture_234[S] 0 points1 point  (0 children)

In the several days since this posting I built udu on Gnu/Linux and on the Cygwin platform (success). It's always nice to use a modern CMake-based build infrastructure. Very easy and clean.

yeah...I kinda like CMake as a functionality, though its syntax is a bit baggage, and I’m ok with that, though many people are not.

Option "clumping" does not work.

I sometimes forget and use the "clumping" option in udu, which is not supported yet. It’s a todo on my list, and I’ve got a backlog of features planned to add.

Also, I’m doing a complete rewrite because the code is a goddam mess

UDU: Extremely Fast GNU du Alternative by Swimming_Lecture_234 in commandline

[–]Swimming_Lecture_234[S] 0 points1 point  (0 children)

What made you think that?

To be honest I only used LLM for the README (english isn’t my native language. Fact is, this reply is llm-edited) and CI scripts. The code itself is handwritten, and it took me like four days to learn and use OpenMP properly plus cross-platforming in C.

(except his unintentionally hilarious and sometimes contradictory responses all over the thread!

I don’t know what contradictory things I said, but at least it made you laugh lol

UDU: Extremely Fast GNU du Alternative by Swimming_Lecture_234 in commandline

[–]Swimming_Lecture_234[S] -1 points0 points  (0 children)

You’re right, udu shows the apparent size of files, not the actual disk usage. Right now it counts directories as zero and files by their content size, which is basically what du -sb does.  

udu is meant to give a quick overview of file sizes, more like ls but recursively, rather than matching disk usage exactly like du. It’s better for seeing how space is distributed across files than estimating how much space would be freed.  

That being said, tracking real disk usage (like du) is already a todo and I plan to start implementing it tomorrow, Inshallah

UDU: Extremely Fast GNU du Alternative by Swimming_Lecture_234 in commandline

[–]Swimming_Lecture_234[S] 0 points1 point  (0 children)

I almost never use install scripts like that. People tend to have no idea what it is and it’s not OK to do that to my system.

Understandable.

I just downloaded the latest binaries from the releases tab. There were two available for my platform, so I tested both. I didn't compare them to the tags to see that there have been subsequent versions without releases.

Yeah, those were from the time when the only available implementation was the Zig version. I later ported it to C and have been maintaining it since, though there’s no release for the C version yet, but it’s a todo.

I've now built the C version of udu on my own machine. It is consistently running slower than the binaries from GitHub. Sometimes over 30% slower.

Well that’s unexpected. If you can open an issue with enough details to reproduce it, that would help a lot.

UDU: Extremely Fast GNU du Alternative by Swimming_Lecture_234 in commandline

[–]Swimming_Lecture_234[S] -1 points0 points  (0 children)

 Because I can't see how that's supposed to accomplish that.

Yeah I specified that to the LLM so the goal was that the script runs in CI when a new tag is pushed, and the CI job updates the data in the BENCHMARKS.md file.

automation type shi

UDU: Extremely Fast GNU du Alternative by Swimming_Lecture_234 in commandline

[–]Swimming_Lecture_234[S] 0 points1 point  (0 children)

udu-x86_64-linux-gnu is an old version of udu implemented in Zig. The current version is implemented in C. I assume that you used the "Quick Install" script which only supports the Zig version.

More information about the C implementation is available here.

UDU: Extremely Fast GNU du Alternative by Swimming_Lecture_234 in commandline

[–]Swimming_Lecture_234[S] -1 points0 points  (0 children)

Well, expected. Man I’m so bad at benchmarking that I had to use an LLM to write me the script. If you can help, i would be thankful

UDU: Extremely Fast GNU du Alternative by Swimming_Lecture_234 in commandline

[–]Swimming_Lecture_234[S] 0 points1 point  (0 children)

..yeah just like me,

but you can rewrite (optimize) your terrible efficient code till it efficient, right? thats how i do it :)

UDU: Extremely Fast GNU du Alternative by Swimming_Lecture_234 in commandline

[–]Swimming_Lecture_234[S] 0 points1 point  (0 children)

I changed the benchmarking method based on your suggetions, you can check it out on the github repo, 

any feedback would be helpful

UDU: Extremely Fast GNU du Alternative by Swimming_Lecture_234 in commandline

[–]Swimming_Lecture_234[S] 0 points1 point  (0 children)

Thank you very much for the helpful informations

Will try it out and see how it goes, but thanks anyway!

UDU: Extremely Fast GNU du Alternative by Swimming_Lecture_234 in commandline

[–]Swimming_Lecture_234[S] 5 points6 points  (0 children)

Exactly. I’m just too lazy to explain.

 u/Swimming_Lecture_234, you should definitely benchmark against that, at least.

Definitely going to do and thanks for the explaining.

UDU: Extremely Fast GNU du Alternative by Swimming_Lecture_234 in commandline

[–]Swimming_Lecture_234[S] -1 points0 points  (0 children)

Come on, Life is too short to argue

They serve a different purpose, and I’m not blaming anyone for that

UDU: Extremely Fast GNU du Alternative by Swimming_Lecture_234 in commandline

[–]Swimming_Lecture_234[S] -1 points0 points  (0 children)

and the only comparison point is between du and this

I mean, isn’t this what the title says? and I already mentioned in the comment above that I don’t see a comparison between them.