How I RUINED My Rust Project

Ойын-сауық

Leo's Portfolio: delta.is-a.dev/
Lemon Foxmere's Github: github.com/LemonFoxmere
Project Repository: github.com/conaticus/fileexpl...
Original Video: • I Made a FAST File Exp...
Join this channel to get access to perks:
/ @conaticus
Discord: / discord
Github: github.com/conaticus
Twitter: / conaticus
0:00 Intro
0:15 Cache Invalidation
1:40 Saving Cache to Disk
2:25 File Opening
2:58 Binary Serialization
3:17 Context Menu
3:36 Create & Delete Files
How I RUINED My File Explorer (in Rust)

Пікірлер: 113

  • @conaticus
    @conaticus11 ай бұрын

    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 😅

  • @and_rotate69

    @and_rotate69

    11 ай бұрын

    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

  • @Floky
    @Floky11 ай бұрын

    "I'm making a fast file explorer..." *Takes 3min to delete a .txt file* Lmao

  • @DBZM1k3

    @DBZM1k3

    11 ай бұрын

    Well... he's not make a fast file delete app. Its for exploring. 🙃

  • @FriedMonkey362

    @FriedMonkey362

    11 ай бұрын

    I mean he could just also delete it from the cache as soon as he deletes it, itll look nicer

  • @samllea1

    @samllea1

    11 ай бұрын

    Floky!!! i have been subbed for a long time! less then 500 i think

  • @fogbank

    @fogbank

    10 ай бұрын

    Gives you time to reconsider, kinda like GMail waiting 5 secs before actually sending that message you might regret.

  • @KangJangkrik
    @KangJangkrik11 ай бұрын

    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

  • @anarchoyeasty3908

    @anarchoyeasty3908

    11 ай бұрын

    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

  • @johnc0de

    @johnc0de

    11 ай бұрын

    Zustand, jotai, valtio, nano store are all good options that seems better than redux or recoil in that occasion

  • @KangJangkrik

    @KangJangkrik

    11 ай бұрын

    @@anarchoyeasty3908 if you delve into its source code, you'll know the reason why people are looking for alternative like jotai and react-recoil

  • @arivanhouten6343

    @arivanhouten6343

    11 ай бұрын

    I like Zustand since imo it's rather simple to set up and work with. Also provides devtools support

  • @conaticus

    @conaticus

    11 ай бұрын

    Yeah, I should definitely check those out. Redux is a pain 😂

  • @tompov227
    @tompov22711 ай бұрын

    A React based file explorer. May god have mercy on us

  • @tacomies

    @tacomies

    10 ай бұрын

    I'd argue that the GUI is not the main point here

  • @tompov227

    @tompov227

    10 ай бұрын

    @@tacomies I’d argue that I was making a joke

  • @tacomies

    @tacomies

    10 ай бұрын

    @@tompov227 Can't really tell over text since hating on react is quite common

  • @krtirtho
    @krtirtho11 ай бұрын

    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

  • @Infinitay
    @Infinitay11 ай бұрын

    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?

  • @manishsigdel824

    @manishsigdel824

    11 ай бұрын

    Ssds have read counts? I've almost only ever heard of storage deteriorating on writes only

  • @AlFredo-sx2yy

    @AlFredo-sx2yy

    11 ай бұрын

    @@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

    @juh9870_projects

    11 ай бұрын

    Just having chrome open will write more than 1 file per 30 seconds

  • @AlFredo-sx2yy

    @AlFredo-sx2yy

    11 ай бұрын

    @@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.

  • @juh9870_projects

    @juh9870_projects

    11 ай бұрын

    @@AlFredo-sx2yy Except that A LOT of apps do it. 1 file per 30 seconds is not too much in a modern software world

  • @omega_no_commentary
    @omega_no_commentary11 ай бұрын

    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

  • @Afif87123

    @Afif87123

    11 ай бұрын

    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)

  • @thatnerd527
    @thatnerd52711 ай бұрын

    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.

  • @x_techno_pro
    @x_techno_pro10 ай бұрын

    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

  • @kuhluhOG

    @kuhluhOG

    10 ай бұрын

    he went the manager route: delegating it

  • @ExediceWhyNot
    @ExediceWhyNot11 ай бұрын

    Is HashCashMap some kind of asian dish or something?

  • @Floky

    @Floky

    11 ай бұрын

    Sounds more like a drug tbh XD

  • @thunfischeis246
    @thunfischeis24611 ай бұрын

    Keep up the good work mate!

  • @justine_chang39
    @justine_chang3911 ай бұрын

    bro tried to compare two objects and blamed Javascript 💀

  • @cfuendev

    @cfuendev

    11 ай бұрын

    It's a canon event. All JS devs have to go through this

  • @hostgrady
    @hostgrady11 ай бұрын

    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

    @lythd

    11 ай бұрын

    i guess just the worry of crashing, so probably exit and every 30 seconds?

  • @hostgrady

    @hostgrady

    11 ай бұрын

    @@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

  • @lythd

    @lythd

    11 ай бұрын

    @@hostgrady that just sounds like redoing the cache, that would take too long.

  • @hostgrady

    @hostgrady

    11 ай бұрын

    @@lythd counter point: his caching system sucks

  • @lythd

    @lythd

    11 ай бұрын

    @@hostgrady possibly i wouldnt know i havent seen it. i just think rn itll be fine once he adds the save before exit.

  • @sebastianwhiffen9594
    @sebastianwhiffen959411 ай бұрын

    Keep going for the love of all things holy

  • @sylviotv
    @sylviotv11 ай бұрын

    Do you do this on live or twitch?

  • @lolcat69
    @lolcat6911 ай бұрын

    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 )

  • @graffhyrum
    @graffhyrum11 ай бұрын

    I saw you were using tauri for the app framework. Was there an issue with using surreal as the cache?

  • @hyperskys
    @hyperskys11 ай бұрын

    pretty cool, i like rust its cool! nice project i downloaded it, UI sucks tbh but pretty fast

  • @MrAbrazildo
    @MrAbrazildo5 ай бұрын

    4:00, is there no operator overloading?

  • @dominiksramko
    @dominiksramko8 ай бұрын

    Are you parsing the MFT or scanning the file system directly?

  • @imsuck12
    @imsuck1211 ай бұрын

    I think you can abuse the Master File Table?

  • @user-pw5do6tu7i
    @user-pw5do6tu7i11 ай бұрын

    A search in file would be nice too

  • @sousoulefou
    @sousoulefou11 ай бұрын

    I wonder if you can make it even faster xd

  • @Pollot
    @Pollot10 ай бұрын

    I knew that I was watching a worthy channel as soon as I saw an A320 checklist and Little Navmap.

  • @PoProstuLatanie
    @PoProstuLatanie10 ай бұрын

    I see some flightsim enyojer here (a320 checkilst and little navmap)

  • @edwolt
    @edwolt10 ай бұрын

    Could cache save the modification timestamp of the file/folder so it bacomes easy to validate and update cache during search?

  • @DaddyFrosty

    @DaddyFrosty

    10 ай бұрын

    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.

  • @edwolt

    @edwolt

    10 ай бұрын

    @@DaddyFrosty Wich kind of flaw could exist?

  • @s_m1010
    @s_m101011 ай бұрын

    When You Try Something For First Time 😂

  • @marble_wraith
    @marble_wraith11 ай бұрын

    4:05 It's even more fine to hate chatGPT... because that's where you got your code from.

  • @FormalSnake
    @FormalSnake11 ай бұрын

    I got to be in the video nice!

  • @user-kn6uu8cc6l
    @user-kn6uu8cc6l11 ай бұрын

    try to replace js with wasm rust, for example, yew (is very similar to react)

  • @jacobbutler5436
    @jacobbutler543611 ай бұрын

    noti gang

  • @zaper2904
    @zaper290411 ай бұрын

    Ah rust a fast safe language where the safe code isn't fast and the fast code isn't safe.

  • @Firstnemonek
    @Firstnemonek11 ай бұрын

    Can you make a tutorial where you explain how to create a file explorer?

  • @lemonfoxmere
    @lemonfoxmere11 ай бұрын

    We love objects!

  • @pitachok4789
    @pitachok478911 ай бұрын

    ggs

  • @ItsObviousDude
    @ItsObviousDude11 ай бұрын

    Every single programmer in the entire world be like 1:28 💀

  • @Energy_on_yt
    @Energy_on_yt7 ай бұрын

    how to run?

  • @Omikronik
    @Omikronik11 ай бұрын

    I dont recommend chatgpt for rust (sadly), what chatgpt knows is too outdated

  • @faeancestor

    @faeancestor

    11 ай бұрын

    how should I code in rust then

  • @Omikronik

    @Omikronik

    11 ай бұрын

    @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.

  • @peegee101
    @peegee10111 ай бұрын

    Whats the song at the very end?

  • @chris-xp9bc

    @chris-xp9bc

    11 ай бұрын

    kzread.info/dash/bejne/X5eolaSHc9ffj8o.html

  • @skorp5677

    @skorp5677

    11 ай бұрын

    +1 interested too

  • @conaticus

    @conaticus

    11 ай бұрын

    Here's a link: www.epidemicsound.com/track/504P66ZgB8/

  • @skorp5677

    @skorp5677

    11 ай бұрын

    @@conaticus Thanks!

  • @LiquidMark
    @LiquidMark11 ай бұрын

    gaming

  • @realtristan288
    @realtristan28811 ай бұрын

    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🤣

  • @skorp5677
    @skorp567711 ай бұрын

    When part 3?

  • @TheGamingMaik
    @TheGamingMaik11 ай бұрын

    Great video!

  • @m4rt_
    @m4rt_11 ай бұрын

    Suggestion: add tabs

  • @Perndoe
    @Perndoe10 ай бұрын

    Use voidtool everything

  • @dave7244
    @dave724411 ай бұрын

    My advice with any task. Do it the super dumb way until you need to add complexity.

  • @wattlefox
    @wattlefox11 ай бұрын

    crab🦀

  • @RobLang
    @RobLang11 ай бұрын

    "Coding better file explorer than Windows" ok then. Aim high.

  • @faeancestor

    @faeancestor

    11 ай бұрын

    what

  • @conaticus

    @conaticus

    11 ай бұрын

    at least mine doesn't have ads in it 😂

  • @tweney3452
    @tweney345211 ай бұрын

    When next video about this

  • @faultboy
    @faultboy11 ай бұрын

    Now do it in C!

  • @Dev-Siri
    @Dev-Siri11 ай бұрын

    -This guy is officially a chad-

  • @the_true_dreamberddev
    @the_true_dreamberddev11 ай бұрын

    nah bruh what you done now 💀

  • @batatanna
    @batatanna11 ай бұрын

    I was gonna say all the mistakes in this video but youtube said the comment was too long

  • @SirPigari
    @SirPigari2 күн бұрын

    I made it in python and its instant

  • @ZeFoxii
    @ZeFoxii11 ай бұрын

    Can you make it open source?

  • @luigidabro
    @luigidabro11 ай бұрын

    It is going to use more RAM than Chrome

  • @gamezuree6897
    @gamezuree689711 ай бұрын

    average experience of programming

  • @kenan2386
    @kenan238611 ай бұрын

    successfully ruining a program my favorite

  • @japlic
    @japlic11 ай бұрын

    lol

  • @redstonebear
    @redstonebear11 ай бұрын

    uhhh

  • @marcusrehn6915
    @marcusrehn691511 ай бұрын

    We have a better file explorer, it's called ls

  • @joaopauloalbq
    @joaopauloalbq11 ай бұрын

    plz stop T-T

  • @ntoes3378
    @ntoes337811 ай бұрын

    just use c++, not some fake languages like rust or ts

  • @laundmo
    @laundmo11 ай бұрын

    and during all this, "voidtools everything" is just out there searching terabytes as-you-type

Келесі