[GH-ISSUE #333] Where can I ask questions? #150

Closed
opened 2026-06-08 11:25:53 +03:00 by zhus · 1 comment
Owner

Originally created by @johntheocs on GitHub (Jul 13, 2023).
Original GitHub issue: https://github.com/bootandy/dust/issues/333

First I want to thank you for this wonderful tools. I like it and enjoy reading the code. But I have problems understanding some of the code, filter.rs.

There is get_biggest function, I guess it is to get biggest directories or sub-directories. I tried to print all items in heap before calling fill_remaining_lines function, and the heap includes every file or directory in the target directory. So it seems the secret should be in fill_remaining_lines function, but I don't see anywhere comparing the sizes or sorting in the related functions.

Can anyone explain it to me? I don't know if this is the right place to ask questions. If not, where?

Thanks again for this wonderful project.

Originally created by @johntheocs on GitHub (Jul 13, 2023). Original GitHub issue: https://github.com/bootandy/dust/issues/333 First I want to thank you for this wonderful tools. I like it and enjoy reading the code. But I have problems understanding some of the code, ```filter.rs```. There is ```get_biggest``` function, I guess it is to get biggest directories or sub-directories. I tried to print all items in ```heap``` before calling ```fill_remaining_lines``` function, and the heap includes every file or directory in the target directory. So it seems the secret should be in ```fill_remaining_lines``` function, but I don't see anywhere comparing the sizes or sorting in the related functions. Can anyone explain it to me? I don't know if this is the right place to ask questions. If not, where? Thanks again for this wonderful project.
zhus closed this issue 2026-06-08 11:25:53 +03:00
Author
Owner

@johntheocs commented on GitHub (Jul 13, 2023):

Claude.ai helped me understand the secret is BinaryHeap, which I knew nothing about before.

<!-- gh-comment-id:1634713859 --> @johntheocs commented on GitHub (Jul 13, 2023): [Claude.ai](claude.ai/) helped me understand the secret is BinaryHeap, which I knew nothing about before.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#150