Live data from Hacker News

Viewing profile — dgrunwald

dgrunwald

HN member
Joined
Wed, Jul 26, 2017, 10:38 PM UTC
HN karma
285
Public activity
43 items

About dgrunwald

No profile information was provided.

Recent public activity

  1. comment
    Comment #48989331

    $ORIGIN was only supported when the loader was looking for other dependencies. The loader itself (field PT_INTERP) is loaded by the kernel. So prior to this change, every program m…

  2. comment
    Comment #48797476

    > Furthermore parsing JSON or YAML gives you the basic data types like lists and dictionaries. Parsing XML gives you an AST that requires a lot more effort to turn into data in you…

  3. comment
    Comment #48568194

    `rmdir /s /q` in a command prompt is significantly faster than Windows Explorer. Yes C: is slow due to filters and Dev Drive is faster; but this difference can only be felt when us…

  4. comment
    Comment #48277621

    In our compiler (in a code analysis tool), we have #pragma immutable_macro __attribute__ After this pragma, any attempt to #define/#undef the macro "__attribute__" will be silently…

  5. comment
    Comment #47529172

    It's a normal command called "View: Reopen Closed Editor".

  6. comment
    Comment #47386882

    Yes `int` acts as if it was a subtype of `float`: https://typing.python.org/en/latest/spec/special-types.html#...

  7. comment
    Comment #47386877

    But in Python the type checker does not complain about `x: float = 0`, because for the purpose of type checking (but not at runtime), `int` is considered a subtype of `float`: http…

  8. comment
    Comment #47356840

    In most languages, `x: float = 0` involves an implicit conversion from int to float. In Python, type annotations have no impact on runtime behavior, so even though the type checker…

  9. comment
    Comment #47200141

    Don't forget the compatibility issues: Fil-C isn't really usable if you mix C with other languages in the process. It's especially problematic to have multiple different garbage co…

  10. comment
    Comment #47101368

    When accessing individual elements, 0-based and 1-based indexing are basically equally usable (up to personal preference). But this changes for other operations! For example, consi…

  11. comment
    Comment #46736784

    > make sure not to sign into your Microsoft account or link it to Windows again That's not so easy. Microsoft tries really hard to get you to use a Microsoft account. For example, …

  12. comment
    Comment #46690859

    That loop isn't N²: if there are long sequences of dashes, every iteration will cut the lengths of those sequences in half. So the loop has at most lg(N) iterations, for a O(N*lg(N…

  13. comment
    Comment #45855805

    cygwin is a POSIX-emulating library intended for porting POSIX-only programs to Windows. That is: when compiling for cygwin, you'd use the cygwin POSIX APIs instead of the Windows …

  14. comment
    Comment #45855706

    If you need `0..=n`, you can't write `0..(n+1)` because that addition might overflow.

  15. comment
  16. comment
    Comment #44422453

    But the source character set remains implementation-defined, so compilers do not have to directly support unicode names, only the escape notation. Definitely a questionable choice …

  17. comment
    Comment #44134294

    The article is using the Python C API directly. pybind11 is a C++ wrapper that makes the Python API more friendly to use from C++ (e.g. smart pointers instead of manual reference c…

  18. comment
    Comment #43798071

    > But if i is indeed put immediately after, then the function should indeed return 5 for n=3. That's not how compilers work. The optimization changing `return i;` into `return 0;` …

  19. comment
    Comment #42797226

    The problem with `setenv` is that people expect one process to have one set of environment variables, which is shared across multiple languages running in that process. This implie…

  20. comment
    Comment #42797162

    How exactly would that help in this situation? If both Rust and C have independent standard libraries loaded into the same process, each would have an independent set of environmen…

  21. comment
    Comment #42758703

    Yes, that is typically the way to go. Collecting a call stack only requires unwinding information (which is usually already present for C++ exceptions / Rust panics), not full debu…

  22. comment
    Comment #41835024

    Caution with these functions: in most cases you need to check not only the error code, but also the `ptr` in the result. Otherwise you end up with `to_int("0x1234") == 0` instead o…

  23. comment
    Comment #41164561

    > All noexcept does is catch any exception and immediately std::terminate. While that's a possible implementation; the standard is a bit more relaxed: `noexcept` may also call `std…

  24. comment
    Comment #40977336

    The GC does matter. Most applications are completely fine with having a garbage collector, but they are not fine with having multiple garbage collectors! Mixing multiple garbage co…

  25. comment
    Comment #40917941

    There are some static analysis tools that can check this. Cert's SIG30 rule page has a list: https://wiki.sei.cmu.edu/confluence/display/c/SIG30-C.+Call+... Also there's https://cl…