Rust Multi-Threading

Поділитися
Вставка
  • Опубліковано 3 лис 2024

КОМЕНТАРІ • 40

  • @merthyr1831
    @merthyr1831 Рік тому +39

    I've seen your complaints about rust a few times, but also seen you write it and it's pretty expressive as long as you avoid using super esoteric language features.
    Honestly reads a lot better than C++, especially when using classes and function pointers which are pretty common in front-end and functional/declarative programming paradigms. And the cargo system is really nice compared to Make!

  • @decqyd
    @decqyd Рік тому +93

    whens this guy gonna make an operating system smh

    • @strongleongch
      @strongleongch Рік тому +10

      In porth

    • @Tigregalis
      @Tigregalis Рік тому +2

      ​@@j4n1x19 how long ago?

    • @abdoraqi1362
      @abdoraqi1362 Рік тому

      @@j4n1x19 could you please refer the link 😊. I couldn't find it 😅

    • @LuisDa20
      @LuisDa20 Рік тому +1

      Hi did, it's called templeOS

    • @lokthar6314
      @lokthar6314 Рік тому +12

      @@LuisDa20 Terry Davis, the greatest programmer of all times, created it.. This time I forgive you

  • @ndrmqaxn
    @ndrmqaxn Рік тому +21

    You're so talented! I'm a non-native English speaker and searching documents to get useful things is somewhat difficult for me. I'm trying to overcome it.

    • @merthyr1831
      @merthyr1831 Рік тому +6

      If you mean searching software documentation, that's difficult for native speakers too - don't worry! You're doing great by the way 👍

    • @ndrmqaxn
      @ndrmqaxn Рік тому +6

      @@merthyr1831 Thank you for your warm encouragement!

  • @diegorocha2186
    @diegorocha2186 Рік тому +7

    This was the first time I saw someone using the touch command properly lol Nice code session btw!!!!

  • @Mozartenhimer
    @Mozartenhimer Рік тому +1

    Getting fast on the UA-cam uploads. Love it!

  • @hypnogri5457
    @hypnogri5457 Рік тому +3

    finally I was waiting for this Pog

  • @ac130kz
    @ac130kz Рік тому +5

    rayon is a really nice library for iterator parellization

  • @kibels894
    @kibels894 Рік тому +5

    If it compiles it works :)

  • @----__---
    @----__--- Рік тому +10

    from what i can see add_folder_to_model signature is very weird and it has too many indirections. model doesnt need to be a dyn trait object. it can just be a "impl Model" and monomorphized by the compiler.
    and for parallelizing the indexing process, you probably want to have a look at std::thread::scope

    • @ole4707
      @ole4707 Рік тому +4

      It also doesn't need to take the mutex behind an Arc, and can just take a reference to the mutex. It doesn't require the ownership.

  • @Dygear
    @Dygear Рік тому +2

    Lol at the i3 status bar for this video. Great sense of humor.

  • @movization
    @movization Рік тому +1

    Just in time!

  • @DuskyDaily
    @DuskyDaily Рік тому +2

    Amazing!

  • @williamanthony7224
    @williamanthony7224 Рік тому +6

    I managed to get my version, on glDocs, to build a directory tree, then spawn threads to parse each xhtml file and return its hashmap through a mpsc channel. Got my M1 Mac to go from 2.6 seconds to 0.6 for indexing. I’m looking forward to watching and see how you do it

    • @williamanthony7224
      @williamanthony7224 Рік тому +3

      Also, serde has a function for doing pretty json to files that’s good for testing

  • @evildougthevillainousassistant

    thanks for the tips

  • @rodelias9378
    @rodelias9378 Рік тому

    That was great

  • @hsthast7183
    @hsthast7183 Рік тому +1

    Pls do add this video to your rust search engine UA-cam playlist.

  • @antronixful
    @antronixful Рік тому +12

    Every time i watch you program in rust, i imagine the two soyjacks vs the two chads saying:
    soy1: "nooooo you can't do that in rust, that's not secure, you are not a rustacean"
    soy2: "rust is supposed to be inclusive "
    chad1: "rust sucks and i love it"
    chad2: "yes."

    • @----__---
      @----__--- Рік тому +5

      rust has different shortscomings in many ways but none of them are stuff like struct fields being private by default, which is the most sensible default, like he complains in the video.

    • @antronixful
      @antronixful Рік тому +2

      @@----__--- i know rust is very passive aggressive, that's why i commented that ane why i don't like it that much

    • @angelcaru
      @angelcaru 6 місяців тому

      @@----__--- That's the most sensible default???? Explain how

    • @----__---
      @----__--- 6 місяців тому +1

      @@angelcaru its the most sensible for most people to assume that the state of the object is invariant to that object unless specificed otherwise. and its the most sensible to prefer making fields public to forgetting to specify priv and causing breaking changes in the api. but ultimately it doesnt matter, its literally just field visibility. and like i said in my comment a year ago, thats not a shortcoming of rust, nobody cares.

  • @yjk_ch
    @yjk_ch Рік тому

    Haven't watched fully yet, but it makes me a bit sad when you are doing Arc::clone when you could just modify the function to accept &Arc

  • @aryabp
    @aryabp Рік тому +1

    Cool❤

  • @WhoIsMrKemp
    @WhoIsMrKemp Рік тому

    I want to know what he thinks of kataos...or using Rust on KataOs

  • @simonfarre4907
    @simonfarre4907 Рік тому

    Of course it will be cross platform- your index json files won't though since you serialize the SystemTime object. But why the hell would you want the serialized data itself cross platform? If it is serialised on Windows it will be in Windows format.

    • @maxsilvester1327
      @maxsilvester1327 Рік тому

      i think it could be made cross platform by converting the SystemTime to Duration since epoch.

  • @pgjbz
    @pgjbz Рік тому

    R.I.P Porth

  • @xxaqploboxx
    @xxaqploboxx 11 місяців тому

    i hate ur font but i love u xd

  • @x1expert1x
    @x1expert1x Рік тому +1

    I love your videos bro slava ukraini

  • @epicpasta8100
    @epicpasta8100 Рік тому +2

    First!

  • @GRATHRRAM
    @GRATHRRAM Рік тому

    второй!