Live data from Hacker News

Viewing profile — Dr_Emann

Dr_Emann

HN member
Joined
Mon, Jul 24, 2017, 1:18 PM UTC
HN karma
108
Public activity
28 items

About Dr_Emann

[ my public key: https://keybase.io/dr_emann; my proof: https://keybase.io/dr_emann/sigs/RVRspf4dNbPKM-bFDVrx0GzZHZLkP79O7Toa9538riU ]

Recent public activity

  1. comment
    Comment #49227225

    It's a little unclear, but it's a live updating number, if you follow the directions, you'll see the second number decrease.

  2. story
  3. comment
    Comment #48735884

    I don't think so, "while vacant" is an infinite amount of time, if you look infinitely far into the future.

  4. comment
    Comment #48143219

    "Participants got behind the wheel of a driving simulator equipped with everything you’d find in a real car – from the steering wheel to the pedals and dashboard. A large touchscre…

  5. comment
    Comment #47944768

    To be even fair-er, it wasn't actually memory unsafety, it was "just" unsoundness, there was a type, that IF you gave it an io reader implementation that was weird, that implementa…

  6. comment
    Comment #45605267

    Thats kinda the problem, there are concepts in rust that don't have equivalents in other common languages. In this case, rust's type system models data-race-safety: it prevents dat…

  7. comment
    Comment #45445577

    Rust has access control. Fields are private by default.

  8. comment
    Comment #43382639

    Wow the comments are.. Bad. Not all single instruction operations are the same.

  9. comment
    Comment #42972351

    "The common ground is that I have absolutely no interest in helping to spread a multi-language code base. I absolutely support using Rust in new codebase, but I do not at all in Li…

  10. story
    Show HN: One Million Sliders

    Inspired by onemillioncheckboxes.com, I made my own version, where everyone shares 1 million sliders, setting one to a value sets it for everyone.

  11. comment
    Comment #39384567

    Hi, I think even the remaining benchmark isn't showing what you're trying to show: https://rust.godbolt.org/z/r9rP6xohb Rust realizes the vector is never used, and so never does an…

  12. comment
    Comment #39359519

    Rust optimizes factorial to be iterative, not using recursion (tail or otherwise) at all, and it turns `factorial(15, 1)` into `1307674368000`: https://rust.godbolt.org/z/bGrWfYKrP…

  13. comment
    Comment #32764307

    Honestly feels like a very, very different use case from utf8-ish strings, at a quick read?

  14. comment
    Comment #27164503

    For simple cases, I'll do that, but for longer commands, I've taken to doing rc=0 long command || rc = $? if (( rc == 0 ))...

  15. comment
    Comment #26819807

    Literally every file operation HAS to go through the kernel. This is implementing "what does it mean to read/write this special device file"

  16. comment
    Comment #26410585

    I believe they're asking for "this function returns a function of the same type (Fn/FnMut/FnOnce) as its first argument, but with different arguments. A generic way to write someth…

  17. comment
    Comment #26238078

    Yes it does exactly that. It returns an iterator over the removed items, but when that iterator is dropped, it modifies the collection. See https://play.rust-lang.org/?version=stab…

  18. comment
  19. comment
    Comment #26225998

    And for move to front, why not `a[..i+1].rotate_right(1);`, rather than moving to the back and then shifting everything?

  20. comment
    Comment #26225767

    Expand does actually exist in the standard library, but it's a bit of a strange incantation... vec.splice(i..i, std::iter::repeat(0).take(length)); This replaces the values in rang…

  21. comment
    Comment #25452225

    _Implementing_ a variadic function in rust requires nightly. I'm guessing that's what they meant. Calling one has been available for forever.

  22. comment
    Comment #25430236

    I would absolutely support something to replace ( ( ( ( a).b).c).d).e with a->b->c->d->e, regardless of how much code had been written without that feature. Do you not like the arr…

  23. comment
    Comment #25426729

    Of course. There should never be more than one way to do something in c, even if it makes things easier or less error prone. This is why the -> operator would never be included in …

  24. comment
    Comment #25423354

    Because there is no UB in the original program. It constructs a pointer to the "one past the end" element, but that is fine, and the original program never dereferences that pointe…

  25. comment
    Comment #25423174

    Your block of code can be (and absolutely is) optimized to output zero directly (in c, because the assembly is easier to read): https://c.godbolt.org/z/qe3f4K `*(&i+1)` dereference…