Announcement

Collapse
No announcement yet.

The Latest Progress On Rust For The Linux Kernel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Originally posted by mdedetrich View Post

    To be honest, you have zero clue what you are talking about and its evident in your responses.

    RefCel has nothing to do with the borrow checker, its an abstraction that allows reference counting (bla-bla-bla)
    Says the clueless Rust fanboy. RefCell doesn't do reference counting at all. Rc does, hence Rc<RefCell> or RefCell<RC>. So eat shit again.


    Comment


    • Originally posted by cl333r View Post
      Utterly and terminally ignorant and wrong. The borrow checker is Rust's mechanism of dealing with borrowing rules.
      Saying it doesn't make it so. The borrow checker is what the Rust developers say it is, what the compiler source code says it is and what the Rust community says it is. You could decide to call the libc the "C preprocessor" or you could decide to call New York "Paris", it wouldn't be the case. But at least you have successfully recognised the word "borrow" and jumped to a wrong conclusion, congratulations. That's still more intelligence than you've otherwise shown in this discussion.

      Comment


      • Originally posted by jacob View Post
        .. which brings us back to concurrency - obviously a callback is by nature not deterministic.
        What do you mean by this? If I have a single process, single threaded program then I can't see why a callback would not be deterministic? It's just like any other function call within your program and it's not executed at an arbitrarily point in time. In fact it's executed exactly at the same point in time every time assuming the program has the same inputs and does not rely on any external event. So by itself, I can't see why a "callback function" would not be "deterministic"?

        Comment


        • Originally posted by cl333r View Post
          Says the clueless Rust fanboy. RefCell doesn't do reference counting at all. Rc does, hence Rc<RefCell> or RefCell<RC>. So eat shit again.

          Just drop it. You have proven to be a clueless moron who knows nothing about Rust, concurrency or software safety and you are full of shit on each of these topics. mdedetrich was mistaken about RefCell but s/he is not hell bent on crass ignorance combined with unwarranted condescension. Unlike you.

          Comment


          • Originally posted by tomas View Post

            What do you mean by this? If I have a single process, single threaded program then I can't see why a callback would not be deterministic? It's just like any other function call within your program and it's not executed at an arbitrarily point in time. In fact it's executed exactly at the same point in time every time assuming the program has the same inputs and does not rely on any external event. So by itself, I can't see why a "callback function" would not be "deterministic"?
            I was referring specifically to GTK callbacks which are driven by external events.

            Comment


            • Originally posted by jacob View Post

              Actually you are incorrect, RefCell doesn't do reference counting, that's Rc and Arc. The "Ref" in RefCell simply means that you can borrow() a reference to the object (as opposed to a plain Cell which will give you a copy of the object). It only has a borrowed/not borrowed flag, not a reference counter.
              https://www.reddit.com/r/rust/commen...l_and_refcell/ and https://www.reddit.com/r/rust/commen...eb2x&context=3

              It actually does but of course its not the exact same as a normal reference counter. RefCel creates a struct that contains a counter for the number of times its borrowed or a special value if its a mutable reference (the struct also contains the actual value).

              Using methods such as borrow increases that counter, which is basically the same way how reference counter works (i.e. counting how many references an object has).

              Maybe the implementation details has changed since then ¯\_(ツ)_/¯
              Last edited by mdedetrich; 13 September 2021, 02:38 AM.

              Comment


              • Originally posted by tomas View Post

                What do you mean by this? If I have a single process, single threaded program then I can't see why a callback would not be deterministic? It's just like any other function call within your program and it's not executed at an arbitrarily point in time. In fact it's executed exactly at the same point in time every time assuming the program has the same inputs and does not rely on any external event. So by itself, I can't see why a "callback function" would not be "deterministic"?
                Async programing , you can have multiple tasks running on a single thread with tokio with can make you program not deterministic because it relies on external events to be done and can jump around the program in different execution points.

                Comment


                • Originally posted by mdedetrich View Post

                  https://www.reddit.com/r/rust/commen...l_and_refcell/

                  It actually does but of course its not the exact same as a normal reference counter. RefCel creates a struct that contains a counter for the number of times its borrow or a special value if its a mutable reference (the struct also contains the actual value).

                  Using methods such as borrow increases that counter, which is basically the same way how reference counter works (i.e. counting how many references an object has).
                  That's actually true for the non-mutable borrows but it's not reference counting for memory management.

                  Comment


                  • Originally posted by dragonn View Post
                    Async programing , you can have multiple tasks running on a single thread with tokio with can make you program not deterministic because it relies on external events to be done and can jump around the program in different execution points.
                    Yeah with async we open a whole new can of wotms

                    Comment


                    • Originally posted by jacob View Post

                      That's actually true for the non-mutable borrows but it's not reference counting for memory management.
                      Agreed, hence its not the exact same as a normal reference counter which I also made clear. I was actually trying to point out how RefCel is not really just the "borrow checker at runtime" (this part is in quotes because the borrow checker by definition doesn't run at runtime).

                      Comment

                      Working...
                      X