How I RUINED My Rust Project

Поделиться
HTML-код
  • Опубликовано: 7 янв 2025

Комментарии •

  • @conaticus
    @conaticus  Год назад +76

    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 Год назад +2

      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
    @Floky Год назад +437

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

    • @DBZM1k3
      @DBZM1k3 Год назад +82

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

    • @FriedMonkey362
      @FriedMonkey362 Год назад +17

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

    • @samllea1
      @samllea1 Год назад

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

    • @fogbank
      @fogbank Год назад +1

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

  • @KangJangkrik
    @KangJangkrik Год назад +108

    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 Год назад +3

      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 Год назад +5

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

    • @KangJangkrik
      @KangJangkrik Год назад

      @@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 Год назад +2

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

    • @conaticus
      @conaticus  Год назад +7

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

  • @tompov227
    @tompov227 Год назад +43

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

    • @tacomies
      @tacomies Год назад

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

    • @tompov227
      @tompov227 Год назад +13

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

    • @tacomies
      @tacomies Год назад

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

  • @krtirtho
    @krtirtho Год назад +38

    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
    @Infinitay Год назад +85

    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 Год назад +1

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

    • @AlFredo-sx2yy
      @AlFredo-sx2yy Год назад +8

      @@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 Год назад +9

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

    • @AlFredo-sx2yy
      @AlFredo-sx2yy Год назад +7

      @@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 Год назад +1

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

  • @thatnerd527
    @thatnerd527 Год назад +5

    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.

  • @omega_no_commentary
    @omega_no_commentary Год назад +36

    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 Год назад +1

      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)

  • @x_techno_pro
    @x_techno_pro Год назад +8

    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 Год назад

      he went the manager route: delegating it

  • @marble_wraith
    @marble_wraith Год назад +2

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

  • @hostgrady
    @hostgrady Год назад +15

    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 Год назад

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

    • @hostgrady
      @hostgrady Год назад +4

      @@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 Год назад

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

    • @hostgrady
      @hostgrady Год назад +1

      @@lythd counter point: his caching system sucks

    • @lythd
      @lythd Год назад

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

  • @ExediceWhyNot
    @ExediceWhyNot Год назад +10

    Is HashCashMap some kind of asian dish or something?

    • @Floky
      @Floky Год назад +1

      Sounds more like a drug tbh XD

  • @lolcat69
    @lolcat69 Год назад +3

    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 )

  • @sylviotv
    @sylviotv Год назад +4

    Do you do this on live or twitch?

  • @justine_chang39
    @justine_chang39 Год назад +26

    bro tried to compare two objects and blamed Javascript 💀

    • @cfuendev
      @cfuendev Год назад +4

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

  • @MrAbrazildo
    @MrAbrazildo Год назад

    4:00, is there no operator overloading?

  • @siddhubhai2508
    @siddhubhai2508 Месяц назад +1

    1:58 Come-on lets go to france bro I'm with you 🤝

  • @sousoulefou
    @sousoulefou Год назад +3

    I wonder if you can make it even faster xd

  • @edwolt
    @edwolt Год назад

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

    • @DaddyFrosty
      @DaddyFrosty Год назад +1

      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 Год назад

      @@DaddyFrosty Wich kind of flaw could exist?

  • @thunfischeis246
    @thunfischeis246 Год назад

    Keep up the good work mate!

  • @sebastianwhiffen
    @sebastianwhiffen Год назад

    Keep going for the love of all things holy

  • @Pollot
    @Pollot Год назад

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

  • @TheBigBipper
    @TheBigBipper 5 месяцев назад

    Gosh
    Your projects are amazing
    Who's teaching you to code or what resources are you using to learn?

  • @hyperskys
    @hyperskys Год назад +5

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

  • @graffhyrum
    @graffhyrum Год назад

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

  • @dominiksramko
    @dominiksramko Год назад

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

  • @peegee101
    @peegee101 Год назад +1

    Whats the song at the very end?

    • @chris-xp9bc
      @chris-xp9bc Год назад

      ruclips.net/video/-ct3BNCty_g/видео.html

    • @skorp5677
      @skorp5677 Год назад

      +1 interested too

    • @conaticus
      @conaticus  Год назад +1

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

    • @skorp5677
      @skorp5677 Год назад

      @@conaticus Thanks!

  • @PoProstuLatanie
    @PoProstuLatanie Год назад +1

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

  • @Omikronik
    @Omikronik Год назад +2

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

    • @faeancestor
      @faeancestor Год назад

      how should I code in rust then

    • @Omikronik
      @Omikronik Год назад

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

  • @seanballais
    @seanballais Месяц назад

    3:54 "Oh for fuck's sake." 😂 The way he said it just made it funnier.

  • @ItsObviousDude
    @ItsObviousDude Год назад +1

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

  • @s_m1010
    @s_m1010 Год назад +5

    When You Try Something For First Time 😂

  • @AlbatrossCommando
    @AlbatrossCommando Год назад +10

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

  • @user-pw5do6tu7i
    @user-pw5do6tu7i Год назад

    A search in file would be nice too

  • @Energy_on_yt
    @Energy_on_yt Год назад +1

    how to run?

  • @RobLang
    @RobLang Год назад +1

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

  • @lemonfoxmere
    @lemonfoxmere Год назад +1

    We love objects!

  • @Firstnemonek
    @Firstnemonek Год назад

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

  • @dave7244
    @dave7244 Год назад

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

  • @FormalSnake
    @FormalSnake Год назад

    I got to be in the video nice!

  • @realtristan288
    @realtristan288 Год назад

    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🤣

  • @tweney3452
    @tweney3452 Год назад

    When next video about this

  • @the_true_dreamberddev
    @the_true_dreamberddev Год назад +2

    nah bruh what you done now 💀

  • @m4rt_
    @m4rt_ Год назад

    Suggestion: add tabs

  • @skorp5677
    @skorp5677 Год назад

    When part 3?

  • @kenan2386
    @kenan2386 Год назад +2

    successfully ruining a program my favorite

  • @Perndoe
    @Perndoe Год назад

    Use voidtool everything

  • @batatanna
    @batatanna Год назад

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

  • @Iuigi_t
    @Iuigi_t Год назад

    It is going to use more RAM than Chrome

  • @wattlefox
    @wattlefox Год назад

    crab🦀

  • @LiquidMark
    @LiquidMark Год назад

    gaming

  • @ZeFoxii
    @ZeFoxii Год назад

    Can you make it open source?

  • @faultboy
    @faultboy Год назад

    Now do it in C!

  • @gamezuree
    @gamezuree Год назад +1

    average experience of programming

  • @pitachok4789
    @pitachok4789 Год назад

    ggs

  • @marcusrehn6915
    @marcusrehn6915 Год назад +1

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

  • @Capiosus
    @Capiosus Месяц назад

    the mistake here is using web code for local ui

  • @Dev-Siri
    @Dev-Siri Год назад +1

    -This guy is officially a chad-

  • @jacobbutler5436
    @jacobbutler5436 Год назад

    noti gang

  • @SirPigari
    @SirPigari 6 месяцев назад

    I made it in python and its instant

  • @redstonebear
    @redstonebear Год назад

    uhhh

  • @TheGamingMaik
    @TheGamingMaik Год назад

    Great video!

  • @joaopauloalbq
    @joaopauloalbq Год назад +1

    plz stop T-T

  • @laundmo
    @laundmo Год назад

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