Rust Multi-Threading

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

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

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

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

  • @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 RUclips uploads. Love it!

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

    rayon is a really nice library for iterator parellization

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

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

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

    If it compiles it works :)

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

    finally I was waiting for this Pog

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

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

    Just in time!

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

    Amazing!

  • @antronixful
    @antronixful Год назад +11

    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 4 месяца назад

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

    • @----__---
      @----__--- 4 месяца назад +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.

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

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

    Pls do add this video to your rust search engine RUclips playlist.

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

    That was great

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

    Cool❤

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

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

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

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

    R.I.P Porth

  • @xxaqploboxx
    @xxaqploboxx 9 месяцев назад

    i hate ur font but i love u xd

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

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

    First!

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

    I love your videos bro slava ukraini

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

    второй!