HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
duneroadrunner
misc
C++2018–2019
duneroadrunner / misc

misc

Discover this repository through its Hacker News conversations.

2Distinct people
4Mentions
0Explicit recommenders
3GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A public description has not been verified.

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week4 dated mentions

Observed mentions: 2018-09-21 19:25:37 UTC to 2019-04-04 04:39:44 UTC. Weeks start Monday, UTC.

012018-09-17 00:00:00 UTC to 2018-09-24 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsSep 172018-09-24 00:00:00 UTC to 2018-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-01 00:00:00 UTC to 2018-10-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-08 00:00:00 UTC to 2018-10-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-15 00:00:00 UTC to 2018-10-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-22 00:00:00 UTC to 2018-10-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-29 00:00:00 UTC to 2018-11-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-11-05 00:00:00 UTC to 2018-11-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-11-12 00:00:00 UTC to 2018-11-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-11-19 00:00:00 UTC to 2018-11-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-11-26 00:00:00 UTC to 2018-12-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-12-03 00:00:00 UTC to 2018-12-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-12-10 00:00:00 UTC to 2018-12-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-12-17 00:00:00 UTC to 2018-12-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-12-24 00:00:00 UTC to 2018-12-31 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsDec 242018-12-31 00:00:00 UTC to 2019-01-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 00:00:00 UTC to 2019-01-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-14 00:00:00 UTC to 2019-01-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-21 00:00:00 UTC to 2019-01-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-28 00:00:00 UTC to 2019-02-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-02-04 00:00:00 UTC to 2019-02-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-02-11 00:00:00 UTC to 2019-02-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-02-18 00:00:00 UTC to 2019-02-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-02-25 00:00:00 UTC to 2019-03-04 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2019-03-04 00:00:00 UTC to 2019-03-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-03-11 00:00:00 UTC to 2019-03-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-03-18 00:00:00 UTC to 2019-03-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-03-25 00:00:00 UTC to 2019-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-01 00:00:00 UTC to 2019-04-08 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsApr 1

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Sep 172018-09-17 00:00:00 UTC2018-09-24 00:00:00 UTC101
Sep 242018-09-24 00:00:00 UTC2018-10-01 00:00:00 UTC000
Oct 12018-10-01 00:00:00 UTC2018-10-08 00:00:00 UTC000
Oct 82018-10-08 00:00:00 UTC2018-10-15 00:00:00 UTC000
Oct 152018-10-15 00:00:00 UTC2018-10-22 00:00:00 UTC000
Oct 222018-10-22 00:00:00 UTC2018-10-29 00:00:00 UTC000
Oct 292018-10-29 00:00:00 UTC2018-11-05 00:00:00 UTC000
Nov 52018-11-05 00:00:00 UTC2018-11-12 00:00:00 UTC000
Nov 122018-11-12 00:00:00 UTC2018-11-19 00:00:00 UTC000
Nov 192018-11-19 00:00:00 UTC2018-11-26 00:00:00 UTC000
Nov 262018-11-26 00:00:00 UTC2018-12-03 00:00:00 UTC000
Dec 32018-12-03 00:00:00 UTC2018-12-10 00:00:00 UTC000
Dec 102018-12-10 00:00:00 UTC2018-12-17 00:00:00 UTC000
Dec 172018-12-17 00:00:00 UTC2018-12-24 00:00:00 UTC000
Dec 242018-12-24 00:00:00 UTC2018-12-31 00:00:00 UTC101
Dec 312018-12-31 00:00:00 UTC2019-01-07 00:00:00 UTC000
Jan 72019-01-07 00:00:00 UTC2019-01-14 00:00:00 UTC000
Jan 142019-01-14 00:00:00 UTC2019-01-21 00:00:00 UTC000
Jan 212019-01-21 00:00:00 UTC2019-01-28 00:00:00 UTC000
Jan 282019-01-28 00:00:00 UTC2019-02-04 00:00:00 UTC000
Feb 42019-02-04 00:00:00 UTC2019-02-11 00:00:00 UTC000
Feb 112019-02-11 00:00:00 UTC2019-02-18 00:00:00 UTC000
Feb 182019-02-18 00:00:00 UTC2019-02-25 00:00:00 UTC000
Feb 252019-02-25 00:00:00 UTC2019-03-04 00:00:00 UTC110
Mar 42019-03-04 00:00:00 UTC2019-03-11 00:00:00 UTC000
Mar 112019-03-11 00:00:00 UTC2019-03-18 00:00:00 UTC000
Mar 182019-03-18 00:00:00 UTC2019-03-25 00:00:00 UTC000
Mar 252019-03-25 00:00:00 UTC2019-04-01 00:00:00 UTC000
Apr 12019-04-01 00:00:00 UTC2019-04-08 00:00:00 UTC101

What Hacker News says

4 sources
> Cone actually does support Rust-like, lifetime-constrained borrowed references Ah, so kind of a super-set of Rust functionality. Presumably these would require a "borrow checker" or equivalent? Is that already implemented? So how do you address the safety of, say, taking a reference to an element in a (resizable) vector? Rust's "exclusivity of mutable references" restriction intrinsically makes the vector immutable while the borrowed reference exists, but do I understand that Cone doesn't have that restriction? The "C++ lifetime profile checker", on the other hand, makes the vector non-resizable (but leaves the data mutable). > A key requirement I have placed on references (vs. pointers) is that you can always de-reference them and get a valid value SaferCPlusPlus provides both a pointer that throws an exception if you attempt an invali
Read the rest
d memory access (though it could just as easily return an optional<>, and you can always query if the target is valid), and one that terminates the program if its target is ever deallocated prematurely (and thus (technically) satisfies your criteria). (The latter has less/minimal overhead.) > A Cone programmer would need to use raw pointers to throw off the shackles of lifetime constraints Or reference counting pointers or GC, right? The features needed to implement the pointers I mentioned is either support for calling a destructor on move operations or the ability to make an object non-movable, and, support for copy constructors or the ability to make an object uncopyable. Does/could your language support some combination of those features? I explain the reason the pointers are important in an article called "Implications of the Core Guidelines lifetime checker restrictions" [1]. Specifically, I give an example of reasonable C++ code [2] that historically had no corresponding efficient implementation in Safe Rust. (I think it's still the case, but I haven't fully investigated the implications of Rust's new "pinning" feature.) It can, however, be implemented in a memory safe way using the SaferCPlusPlus pointers in question [3]. Basically the example just temporarily inserts a reference to a (stack allocated) local variable into a list (or whatever dynamic container), given that the local variable does not outlive the container. > especially given that borrowed references and raw pointers are both able to point inside an allocated object SaferCPlusPlus has the equivalent of "borrowed references"[4] (though even more restricted until C++'s "borrow checker" (the aforementioned "lifetime profile checker") is completed), and they can safely point "inside" (allocated) objects. Note that the second safe pointer type (the one that potentially terminates the program), is a "strong" pointer, and there is a simple mechanism for obtaining a "borrowed reference" from a strong pointer [5]. And from there, a simple mechanism for obtaining a reference to an (interior?) member [6]. The other pointer (the one that potentially throws an exception) would be considered a "weak" pointer, and you cannot obtain a "borrowed reference" directly from a weak pointer. But often, the weak pointer is used to target an object that can yield a borrowed reference (like a strong pointer, for example), or a borrowed reference directly. > all the best with getting others to learn about and adopt your language. You too :) I can see the appeal of this sort of clean, flexible language. But in the case of SaferCPlusPlus the goal is not necessarily (just) for programmers to adopt it. In part it's maybe a demonstration (to language designers such as yourself :) of a set of language elements that use run-time safety enforcement mechanisms but are a little more flexible than (and might be a good / (unintuitively) needed complement to) their counterparts that rely on strictly compile-time safety enforcement. Oh and if you do get around to checking out SaferCPlusPlus in more depth, apologies for the inadequate documentation in advance. Feel free to post any questions you might have. :) [1] https://github.com/duneroadrunner/misc/blob/master/201/8/Jul... [2] https://github.com/duneroadrunner/misc/blob/master/201/8/Jul... [3] https://github.com/duneroadrunner/misc/blob/54204445bc099987... [4] https://github.com/duneroadrunner/SaferCPlusPlus#txscopeitem... [5] https://github.com/duneroadrunner/SaferCPlusPlus#make_xscope... [6] https://github.com/duneroadrunner/SaferCPlusPlus#make_pointe...
In Cone Programming Langauge
Well like I said, if you already have a driver written in C (or C++), translating it to the safe subset of C++ would be less work as most of the code would remain unchanged and the unsafe elements (like pointers, arrays, etc.) map to direct (safe) replacements. And your driver maintainers/authors may already be familiar with C++ (if not big fans of it :) . While the OP may demonstrate that other languages aren't always that bad in practice, I think the consensus is that Rust and C/C++ are the appropriate languages when maximum efficiency and minimum overhead are desired. While Rust is a good option, the (safe subset of the) language has an intrinsic shortcoming that doesn't seem to be generally acknowledged. The forthcoming C++ "lifetime checker" (static analyzer) has the same issue [1]. Essentially, if you have a list (or any dynamic con
Read the rest
tainer) of references to a given set of existing objects, you cannot (temporarily) insert a reference to a (newly created) object that may not outlive the container itself. In my view, this is a problem. The workarounds are intrusive, inconvenient and/or involve significant overhead. Which makes it tempting to just resort to unsafe Rust in those cases. (And of course this specific example is representative of a whole class of situations with a similar dilemma.) The safe C++ subset doesn't suffer the same issue. (Because in some sense, C++ is still a more "powerful" language.) [1] https://github.com/duneroadrunner/misc/blob/master/201/8/Jul...
In Safe and Secure Drivers in High-Level Languages [video]
> This proposal and Rust's guarantees are different. A little different, but only in the sense of being, for the moment, less ambitious (than Rust) about the completeness of the checker's implementation. But I think it substantially demonstrates a straightforward path to achieving the same level of memory safety in C++ as Rust. > For example: > > We do not attempt to address all aliasing cases It seems to me that a main principle behind the design of the Rust language was to eliminate the aliasing issue, by imposing the "mutable references are exclusive" restriction, as a prerequisite to addressing the memory safety issue. And there was an implication (and sometimes more than that) that as long as C++ can't address the aliasing issue it can't address the memory safety issue (like Rust can). I think the key thing that the lifetime checker
Read the rest
demonstrates is that this premise is not (quite) right. You don't need to completely eliminate the aliasing issue to achieve (efficient) memory safety, you just need to address it "enough". And that can be done for C++. Now, whether the complete elimination of the aliasing issue is, apart from the memory safety implications, a virtue that's worth the (flexibility) cost of the "mutable references are exclusive" restriction, is as far as I'm aware, still a matter of opinion. (Given the existence of the RefCell wrapper in Rust, and the ease (if not elegance) of implementing an "anti-RefCell" wrapper in C++, I'm guessing it's mostly a wash.) > > or make concurrency safety guarantees. Programmers are still responsible for eliminating race conditions. Data races are a separate issue, but relative to the (single-threaded) memory safety issue, I think there'd be less controversy that it can be addressed in C++ in vaguely similar fashion to Rust. [1] But both in the case of Rust and the C++ lifetime checker, I don't think that the cost of the imposed (compile-time) restrictions in terms of code/algorithmic flexibility is being adequately acknowledged. For example, say you have a list (or whatever container) of references to (pre-)existing objects. In both cases, the restrictions require that all the objects must (be known to) outlive the list container even if there is a reference to them in the list for only a short time [2]. Imo this is an impractical restriction. In C++, you could use run-time checked pointers[3][4] to alleviate the restriction without sacrificing memory safety [5]. It's not immediately obvious to me that Rust couldn't have such a run-time checked reference as well. But others would be more qualified to make that assessment. [1] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus#multithread... [2] https://github.com/duneroadrunner/misc/blob/master/201/8/Jul... [3] https://github.com/duneroadrunner/SaferCPlusPlus#registered-... [4] https://github.com/duneroadrunner/SaferCPlusPlus#norad-point... [5] https://github.com/duneroadrunner/misc/blob/master/201/8/Jul...
In C++ Lifetime profile v1.0 posted

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.