Live data from Hacker News

Viewing profile — Tamschi

Tamschi

HN member
Joined
Wed, Apr 19, 2017, 4:32 PM UTC
HN karma
7
Public activity
11 items

About Tamschi

No profile information was provided.

Recent public activity

  1. comment
    Comment #34753226

    Hmm… I'd say for IO-bound tasks/loading in a DBMS yes, async/await coroutines are the correct abstraction, since you're waiting to reschedule on external notice and normally don't …

  2. comment
    Comment #34739229

    It's "Tokio". Coroutines in Rust are a native language feature and their API is part of `std`, but the executors indeed come from community libraries. Tokio is one option, but as l…

  3. comment
    Comment #34738888

    Ah, you're right, I missed it because it's callee-controlled in C++. (See Heap Allocation and Promise on https://en.cppreference.com/w/cpp/language/coroutines , for those curious.)…

  4. comment
    Comment #34738613

    They aren't strictly comparable. While the heap allocation may be optimised out, there is no way to use native C++ coroutines as guaranteed zero-cost construct due to the automatic…

  5. comment
    Comment #29368458

    I should. I'm not too familiar with the process so far, but I'll find some time for it. These functions are indeed generally sound (also for `Rc`), as any value that cares would be…

  6. comment
    Comment #29368344

    There's actually a direct mention of that in my post already, but it's all the way near the bottom in the "Weakening non-moveability" section. It probably goes a bit too far to lin…

  7. comment
    Comment #29368250

    That's understandable, I originally come from about the same position too, with a bit less functional programming background. I updated the intro to also cover that angle: https://…

  8. comment
    Comment #29364578

    Something else that I didn't mention in the post is that `Pin >` is `From >` (so it can be cast directly, and here without reallocation or such), and this could also be implemented…

  9. comment
    Comment #29364339

    There's a hole or oversight in `Arc`'s API in this regard, annoyingly. The function you're looking for would be something like pub fn get_mut_pinned(this: &mut Pin >) -> Option > ,…

  10. comment
    Comment #29364144

    This is why I insist on never calling it "pinned pointer" in the post, even if not explicitly. I'm aware the term is used in the standard library docs (for context: `Pin`'s tagline…

  11. comment
    Comment #29363978

    "Trivially movable" means anyone can take an instance (that they own) and copy its data (just the plain memory cells) to a new location with a new address, then continue to use tha…