Live data from Hacker News

Viewing profile — likeliv

likeliv

HN member
Joined
Sat, Oct 12, 2019, 8:09 PM UTC
HN karma
25
Public activity
24 items

About likeliv

No profile information was provided.

Recent public activity

  1. comment
    Comment #22143139

    That's right. C being more limited, it has a more simplistic ABI. But the parent comment was replying the "need for a stable, standard ABI, which C provide". Which is misleading as…

  2. comment
    Comment #22062317

    unique_ptr does not have any memory overhead. (unless you use a custom deleter, but even then you could use one which does not use memory)

  3. comment
    Comment #21920617

    You seem to misunderstand what moc does. This page should help you: https://woboq.com/blog/moc-myths.html Moc just adds some more generated code next to you valid C++ code, general…

  4. comment
    Comment #21919524

    No need to use Qt creator. Most C++ build systems support moc out of the box, or with minor adjustments.

  5. comment
    Comment #21780336

    C is already an anti pattern for a library. It is soon 2020, there is no reasons to use C in new code. Because of security and also convenience. Maybe it is a nice mental exercise …

  6. comment
    Comment #21562222

    Since the sun isn't turning around the earth, I believe the sun is still where you point at.

  7. comment
    Comment #21497257

    > There are plenty of programs that exploit the programmer's knowledge of a particular compiler's actual, unspecified behavior as an optimization. There are plenty of programs that…

  8. comment
    Comment #21417056

    There is an example of indexed vecteur in the rustc source code https://github.com/rust-lang/rust/blob/master/src/librustc_i...

  9. comment
    Comment #21371515

    > most of those languages (1) have a GC that makes boxing a much cheaper operation than in Rust Why is that? I would intuitively think it is the other way. (Is a malloc/free pair n…

  10. comment
    Comment #21369858

    I disagree that the user of the macro needs to understand its output. The output of a macro is an implementation detail, and the documentation of the macro should be enough to use …

  11. comment
    Comment #21369827

    Right. Is it really accidental complexity? This is the implementation detail that the users of the language doesn't really need to know as they would just write 'async fn' (and #[a…

  12. comment
    Comment #21252827

    I know rust is not C or C++, but we are not programming in x86 assembly, but for the language "abstract machine". And if the compiler infer that this memory location is not used by…

  13. comment
    Comment #21251778

    Is that not an undefined behaviour? Can't you get some values "out of thin air" (partial updates of some bits.) Or some intermediate values? (For example, can the compiler decide t…

  14. comment
    Comment #21250458

    I don't know if nuclear waste is actually worse than the waste from a chemical factory. Any industry has its risks for the environment.

  15. comment
    Comment #21241222

    That was just an example. But maybe 'x' is a BigInt type that use a memory allocation to store its contents. The ownership would be transferred to the return value

  16. comment
    Comment #21241182

    That was pre-c++11. Now using C++11, it is much simpler (using 'auto'). And the C++17 version is even simpler https://code.woboq.org/qt5/qtbase/src/corelib/global/qglobal...

  17. comment
    Comment #21241078

    ... and this is why I will never touch C++ and stay with simple C. (Ah no..., wrong thread. This is actually about C. /s)

  18. comment
    Comment #21238950

    Point is that when you want to do a change in the "API" (or call it "protocol"), you need to touch the different repositories and coordinate to use the right versions together. Abo…

  19. comment
    Comment #21238911

    One of the philosophies behind Go is to keep the language extra simple. See "less is exponentially more". The same way some electric bikes are restricted to a given speed to keep t…

  20. comment
    Comment #21238871

    Would be nice if types could annotate their Drop trait with #[early_drop] if the drop has no visible side effect, do rust could free the memory earlier.

  21. comment
    Comment #21238786

    It is perfect fine to take by value something that is not Copy to transfer its ownership. It is a compiler error to use the value after it was moved. And the compiler error is quit…

  22. comment
    Comment #21236519

    Why boot many VM instead of saving the state and restoring from there?

  23. comment
    Comment #21235968

    There is another tool called git-subtree that should solve these problems, I think. But I've never seen it in use

  24. comment
    Comment #21235879

    Calling eachother at network level is still a dependency. (And even a build dependency if you use something like protobuff or other protocol description files)