Thanks for checking out the video! Little mistake at 1:27, this is actually the interval for the disk caching. I should really stop editing these at 2am 😅
I started learning rust 3 days ago and after seeing that function i thought im so dumb to understand what's going on just from the name, but yaaay im not dumb, i lack confidence
When you say time and effort, are you talking about raw redux? Or redux toolkit. In my experience, redux toolkit solves the biggest headaches about redux but I've not really looked into other state management solutions
Something that someone may or may not have mentioned is that, for any filesystem (on Windows at least), you cannot delete folders directly just like that. Have you ever noticed that programs delete the subfolders and all files first before deleting the actual folder?. Thats why. Its a filesystem level limitation to my knowledge, since alot of stuff needs to happen to delete a folder before it can be deleted (checking permissions, checking if any files are not in use, etc.). So that's the reason why you are cant delete folders directly. As for why you are getting Access Denied when you are deleting a folder, idk why, its the error code Windows uses when you do that.
@@manishsigdel824 i think that based on the context of the message, it is safe to assume that they were talking about write counts because of the fact that they mentioned "caching all files every 30 seconds", which would mean writing to disk every 30 seconds. Unless i misunderstood what the OP meant.
@@juh9870_projects yep, but that doesnt justify any program doing such a thing. I think its more of a testament to how badly designed chrome is and what a piece of sh*t software it is.
Its a hassle to create cache, store it in memory, update it in the background... Handling all of that without any errors and no significant performance overhead is extremely difficult. You can (and will) get memory errors, out-of-sync problems, concurrency issues, low performance, etc. I dont even need to mention that choosing to use cache and building everything around it so that it works correctly and doesn't get out of sync translates into thousands of extra lines of code, and the more lines of code you have, the more bugs that will be introduced and the more expensive mantaining that codebase is gonna get. You will also have less money / time / motivation to invest in other parts of your project that are equally important like user experience, documentation, security and stability, etc. TLDR: If I were you, I'd drop the cache for the sake of code simplicity and less headaches. PD: Im at 1:43, still havent watched the whole video tho. Let me know if I predicted anything lol
it's kinda a tradeoff, having a cache really improves file searching (because it's literally walking through all the files) even though it's pain in the ass when you were there to add a new feature (or fix an existing bug)
use b-trees they are used for actual databases to keep memory usage and performance reasonable I recommend that you take a look at a book called "database internals" the second , the third and the forth chapter will help you a lot in understanding b-trees and how to store data on disk efficiently its not a long read don't worry EDIT: consider fetching sibling nodes to access similar filenames to what you searched for
I think instead of saving cache to disk every 30 seconds it would make more sense to save when you exit and maybe also after the program reaches a certain memory threshold
@@lythd my main concern is the disk writes. I think there's a balance between getting accurate results and not destroying things like your disk and your memory. Thats why I think it's easier to simply calculate what's changed since you last left in the background and write that and from there just scan in the background for changes and add those into memory. Though to be fair I am not a programmer so idk how reasonable this is
ok but where is the button to easilly open a terminal window in that same folder? that would be a neat addition ( i could write it my self but i don't know any rust lol )
@faeancestor normally, with the docs and stackoverflow. Its still kinda helpful to get more info on errors you dont understand with chatgpt though. Just dont expect up to date code and library use.
Thanks for checking out the video! Little mistake at 1:27, this is actually the interval for the disk caching.
I should really stop editing these at 2am 😅
I started learning rust 3 days ago and after seeing that function i thought im so dumb to understand what's going on just from the name, but yaaay im not dumb, i lack confidence
"I'm making a fast file explorer..." *Takes 3min to delete a .txt file* Lmao
Well... he's not make a fast file delete app. Its for exploring. 🙃
I mean he could just also delete it from the cache as soon as he deletes it, itll look nicer
Floky!!! i have been subbed for a long time! less then 500 i think
Gives you time to reconsider, kinda like GMail waiting 5 secs before actually sending that message you might regret.
For state manager, I usually use a simple state manager like React Recoil instead of full blown one like Redux. It saves a lot of time and effort
When you say time and effort, are you talking about raw redux? Or redux toolkit. In my experience, redux toolkit solves the biggest headaches about redux but I've not really looked into other state management solutions
Zustand, jotai, valtio, nano store are all good options that seems better than redux or recoil in that occasion
@@anarchoyeasty3908 if you delve into its source code, you'll know the reason why people are looking for alternative like jotai and react-recoil
I like Zustand since imo it's rather simple to set up and work with. Also provides devtools support
Yeah, I should definitely check those out. Redux is a pain 😂
A React based file explorer. May god have mercy on us
I'd argue that the GUI is not the main point here
@@tacomies I’d argue that I was making a joke
@@tompov227 Can't really tell over text since hating on react is quite common
Look at this guy. It's always fun to see every new programmer step into this Open Source software found + maintainer rabbit hole🤣
I'm crying
Something that someone may or may not have mentioned is that, for any filesystem (on Windows at least), you cannot delete folders directly just like that. Have you ever noticed that programs delete the subfolders and all files first before deleting the actual folder?. Thats why. Its a filesystem level limitation to my knowledge, since alot of stuff needs to happen to delete a folder before it can be deleted (checking permissions, checking if any files are not in use, etc.). So that's the reason why you are cant delete folders directly. As for why you are getting Access Denied when you are deleting a folder, idk why, its the error code Windows uses when you do that.
Did you say you were caching all files every 30 seconds? Isn’t that going to eat through a disk or ssd’s read counts?
Ssds have read counts? I've almost only ever heard of storage deteriorating on writes only
@@manishsigdel824 i think that based on the context of the message, it is safe to assume that they were talking about write counts because of the fact that they mentioned "caching all files every 30 seconds", which would mean writing to disk every 30 seconds. Unless i misunderstood what the OP meant.
Just having chrome open will write more than 1 file per 30 seconds
@@juh9870_projects yep, but that doesnt justify any program doing such a thing. I think its more of a testament to how badly designed chrome is and what a piece of sh*t software it is.
@@AlFredo-sx2yy Except that A LOT of apps do it. 1 file per 30 seconds is not too much in a modern software world
Its a hassle to create cache, store it in memory, update it in the background... Handling all of that without any errors and no significant performance overhead is extremely difficult.
You can (and will) get memory errors, out-of-sync problems, concurrency issues, low performance, etc.
I dont even need to mention that choosing to use cache and building everything around it so that it works correctly and doesn't get out of sync translates into thousands of extra lines of code, and the more lines of code you have, the more bugs that will be introduced and the more expensive mantaining that codebase is gonna get.
You will also have less money / time / motivation to invest in other parts of your project that are equally important like user experience, documentation, security and stability, etc.
TLDR: If I were you, I'd drop the cache for the sake of code simplicity and less headaches.
PD: Im at 1:43, still havent watched the whole video tho. Let me know if I predicted anything lol
it's kinda a tradeoff, having a cache really improves file searching (because it's literally walking through all the files) even though it's pain in the ass when you were there to add a new feature (or fix an existing bug)
use b-trees they are used for actual databases to keep memory usage and performance reasonable
I recommend that you take a look at a book called "database internals" the second , the third and the forth chapter will help you a lot in understanding b-trees and how to store data on disk efficiently
its not a long read don't worry
EDIT:
consider fetching sibling nodes to access similar filenames to what you searched for
he went the manager route: delegating it
1:58 Come-on lets go to france bro I'm with you 🤝
4:05 It's even more fine to hate chatGPT... because that's where you got your code from.
bro tried to compare two objects and blamed Javascript 💀
It's a canon event. All JS devs have to go through this
I think instead of saving cache to disk every 30 seconds it would make more sense to save when you exit and maybe also after the program reaches a certain memory threshold
i guess just the worry of crashing, so probably exit and every 30 seconds?
@@lythd my main concern is the disk writes. I think there's a balance between getting accurate results and not destroying things like your disk and your memory. Thats why I think it's easier to simply calculate what's changed since you last left in the background and write that and from there just scan in the background for changes and add those into memory. Though to be fair I am not a programmer so idk how reasonable this is
@@hostgrady that just sounds like redoing the cache, that would take too long.
@@lythd counter point: his caching system sucks
@@hostgrady possibly i wouldnt know i havent seen it. i just think rn itll be fine once he adds the save before exit.
3:54 "Oh for fuck's sake." 😂 The way he said it just made it funnier.
ok but where is the button to easilly open a terminal window in that same folder? that would be a neat addition ( i could write it my self but i don't know any rust lol )
Is HashCashMap some kind of asian dish or something?
Sounds more like a drug tbh XD
4:00, is there no operator overloading?
Do you do this on live or twitch?
pretty cool, i like rust its cool! nice project i downloaded it, UI sucks tbh but pretty fast
Every single programmer in the entire world be like 1:28 💀
I knew that I was watching a worthy channel as soon as I saw an A320 checklist and Little Navmap.
Keep going for the love of all things holy
Could cache save the modification timestamp of the file/folder so it bacomes easy to validate and update cache during search?
Interesting idea but there could be a lot of flaws, running a service in the background is probs the easiest solution to avoid cache issues.
@@DaddyFrosty Wich kind of flaw could exist?
Ah rust a fast safe language where the safe code isn't fast and the fast code isn't safe.
I wonder if you can make it even faster xd
When You Try Something For First Time 😂
Gosh
Your projects are amazing
Who's teaching you to code or what resources are you using to learn?
Keep up the good work mate!
I see some flightsim enyojer here (a320 checkilst and little navmap)
I saw you were using tauri for the app framework. Was there an issue with using surreal as the cache?
Whats the song at the very end?
th-cam.com/video/-ct3BNCty_g/w-d-xo.html
+1 interested too
Here's a link: www.epidemicsound.com/track/504P66ZgB8/
@@conaticus Thanks!
I dont recommend chatgpt for rust (sadly), what chatgpt knows is too outdated
how should I code in rust then
@faeancestor normally, with the docs and stackoverflow.
Its still kinda helpful to get more info on errors you dont understand with chatgpt though. Just dont expect up to date code and library use.
Are you parsing the MFT or scanning the file system directly?
"Coding better file explorer than Windows" ok then. Aim high.
what
at least mine doesn't have ads in it 😂
I got to be in the video nice!
A search in file would be nice too
We love objects!
how to run?
Can you make a tutorial where you explain how to create a file explorer?
My advice with any task. Do it the super dumb way until you need to add complexity.
Try storing the cache in an sqlite database. Before you store it though, compress it. Storing that much in a json file is just a terrible idea🤣
When next video about this
Suggestion: add tabs
I was gonna say all the mistakes in this video but youtube said the comment was too long
ggs
noti gang
When part 3?
Use voidtool everything
crab🦀
successfully ruining a program my favorite
gaming
-This guy is officially a chad-
nah bruh what you done now 💀
It is going to use more RAM than Chrome
average experience of programming
Now do it in C!
the mistake here is using web code for local ui
We have a better file explorer, it's called ls
Great video!
I made it in python and its instant
Can you make it open source?
uhhh
and during all this, "voidtools everything" is just out there searching terabytes as-you-type
plz stop T-T