Live data from Hacker News

Viewing profile — safercplusplus

safercplusplus

HN member
Joined
Tue, Apr 16, 2019, 7:02 AM UTC
HN karma
97
Public activity
47 items

About safercplusplus

No profile information was provided.

Recent public activity

  1. comment
    Comment #49157338

    Hmm, I'm not sure if you're concerned about the "norad"-style run-time checked references I'm imagining or raw references. In either case, the property we (and `Pin `) are concerne…

  2. comment
    Comment #49154882

    Ok, I guess somebody has to provide the youngsters/uninitiated with some context. What is going on here can be viewed as part of a process of Rust (potentially) incrementally adopt…

  3. comment
    Comment #49054848

    Well, there is another safe option for flexible pointers if you can compile as C++ [1]. In C++ you can have non-owning "smart" pointers with run-time-checked lifetimes [2][3]. Impo…

  4. comment
    Comment #48868108

    If the concern is memory safety, I'd invite comparison with migration to the scpptool-enforced memory-safe subset of C++ [1]. If your C++ code is "idiomatic modern" C++, then the c…

  5. comment
    Comment #48859293

    But are we necessarily limited to native integer types? At least with C++, the type system is powerful enough to support integer replacement types (eg. [0][1]) that don't inherit t…

  6. comment
    Comment #48374914

    If the source language is C++, another option might be to use AI agents to port to a memory-safe subset of C++ [1]. For the most part, this involves surgical changes and glorified …

  7. comment
    Comment #48265016

    You might be interested in the scpptool feature to help convert C code to a subset of C that will also compile as C++ (under clang++ at least) [1]. While many of the necessary modi…

  8. comment
    Comment #47986106

    > It's in many cases as simple as renaming a file from .c to .cpp. That is rather optimistic, but, for example, scpptool has a feature [1] that auto-converts from C to a subset of …

  9. comment
    Comment #47958668

    I think the concern is that the writing may be on the wall for (the current memory-unsafe version of) Coreutils. Despite the bugs and incompatibilities, Canonical seems to have dec…

  10. comment
    Comment #47947632

    I don't know if you're aware, but there is a demonstration of wget (a fellow "gnu utility", right?) being auto-translated to a memory-safe subset of C++ [1]. Because the translatio…

  11. comment
    Comment #47221378

    Interestingly, I recently auto-translated wget from C to a memory-safe subset of C++ [1], which involves the intermediate step of auto-converting from C to the subset of C that wil…

  12. comment
    Comment #47123657

    And I might suggest that there's the possibility that the C++ code could end up being more cleanly ported to a memory-safe subset of C++. plug: https://github.com/duneroadrunner/sc…

  13. comment
    Comment #47077173

    Plug: In theory you could auto-convert to a memory-safe subset of C++ as a build step. Auto-converted code would have some run-time overhead, but you can mark any performance-sensi…

  14. comment
    Comment #45445447

    As long as we're plugging our projects, I'll mention the scpptool-enforced memory-safe subset of C++. Fil-C would be generally more practical, more compatible and more expedient, b…

  15. comment
    Comment #45235611

    > Profiles cannot achieve the same level of safety as Rust So the claim is that the scpptool approach[1] can, while remaining closer to traditional C++, and not requiring the intro…

  16. comment
    Comment #45228342

    > From what I'm aware of, Rust has poor ergonomics for programs that have non-hierarchical ownership model (ie. not representable by trees) Yeah, non-hierarchical references don't …

  17. comment
    Comment #44884467

    Yeah, but C++ now supports "user-defined" annotations which effectively allow you to add the equivalent of any keyword you need, right? (Even if it's not the prettiest syntax.) For…

  18. comment
    Comment #44874989

    Right. And of course there are still less-performance-sensitive C/C++ applications (curl, postfix, git, etc.) that could have memory-safe release versions. But the point is also to…

  19. comment
    Comment #44874034

    A couple of solutions in development (but already usable) that more effectively address UB: i) "Fil-C is a fanatically compatible memory-safe implementation of C and C++. Lots of s…

  20. comment
    Comment #44623171

    Might I suggest that the scpptool-enforced safe subset of C++ has a better solution for such data structures with cyclic or complex reference graphs, which is run-time checked non-…

  21. comment
    Comment #44418074

    Makes sense. But maybe the fact that that post is 4 years old serves to bolster the argument for Fil-C's value proposition. However much people may want to move away from their C c…

  22. comment
    Comment #44410737

    Preach it brother! :) Hmm, I take it that the situation is that there are a number of vendors/providers/distros/repos who could be distributing your memory-safe builds, but are cur…

  23. comment
    Comment #43856254

    This particular memory vulnerability, as I understand it, was a result of a `ReadonlySpan ` targeting a resizable vector. A simple technique used by the scpptool-enforced safe subs…

  24. comment
  25. comment
    Comment #42484570

    Thanks for clarifying. The issue is what code would be rejected for auto-translation, not the correctness of an "accepted" translation (as my comment may have implied). The point o…