<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: BruceIV</title><link>https://news.ycombinator.com/user?id=BruceIV</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Fri, 10 Apr 2026 12:47:35 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=BruceIV" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by BruceIV in "The Firefox Dilemma"]]></title><description><![CDATA[
<p>You can do this sort of search in Firefox as well. Right click on pretty much any search box, then click "Add a Keyword for this Search..." You'll get an add-bookmark dialog that you can put a keyword into (e.g. "w" for Wikipedia) -- I like to save the resulting bookmark in "Unsorted Bookmarks" so that it doesn't clutter up my menus. After that just typing "w Firefox<enter>" in your address bar will bring up the Wikipedia page for Firefox.</p>
]]></description><pubDate>Tue, 11 Dec 2018 16:30:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=18656431</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=18656431</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=18656431</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>The initial implementation was finished in '03, and we revived the project somewhere around '15, so your guess about a research project that was recently taken back up is correct.<p>We intend to write a "proper compiler" at some point (probably either a Clang fork or a Cforall front-end on LLVM), but it hasn't been a priority for our limited engineering staff yet. I think we are getting a summer student to work on our debugging story (at least in GDB -- setting it up so it knows how to talk to our threading runtime and demangle our names), and improving our debugging capabilities has been a major focus of our pre-beta-release push.</p>
]]></description><pubDate>Mon, 26 Mar 2018 15:46:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=16679721</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16679721</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16679721</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>[on the Cforall team] we actually take advantage of this same VLA idiom for temporary storage for polymorphic variables.<p>Fun fact from when we switched our implementation to use VLAs: if you call alloca() for stack memory instead, it doesn't work properly inside a loop, because it never releases the memory until the stack frame is exited.</p>
]]></description><pubDate>Sat, 24 Mar 2018 14:54:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=16666869</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16666869</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16666869</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>A polymorphic function is one that can operate on different types[1]. You would maybe be familiar with them as template functions in C++, though where C++ compiles different versions of the template functions based on the parameters, we pass extra implicit parameters. The example above translates to something like the following in pure C:<p><pre><code>    void* malloc_T(size_t sizeof_T, size_t alignof_T) {
        return malloc(sizeof_T);
    }

    int* i = (int*)malloc_T(sizeof(int), alignof(int));
</code></pre>
In this case, since the compiler verifies that int is actually a type with known size (fulfilling `sized(T)`), it can generate all the casts and size parameters above, knowing they're correct.<p>[1] To anyone inclined to bash my definition of polymorphism, I'm mostly talking about parametric polymorphism here, though Cforall also supports ad-hoc polymorphism (name-overloading). The phrasing I used accounts for both, and I simplified it for pedagogical reasons.</p>
]]></description><pubDate>Sat, 24 Mar 2018 14:48:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=16666828</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16666828</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16666828</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>[on the Cforall team] FWIW, the Go docs are somewhat ambivalent on the OO nature of Go[1]. Along similar lines, our main objections to object-orientation are that, in "traditional" implementations like C++ or Java, it tightly couples a number of features that we believe would be better served by a more orthogonal design.<p>More specifically, C++-style OO couples (1) in-memory layout of types, (2) behaviour of objects, (3) encapsulation boundaries, and (4) the hierarchical "is-a" relationship. In Cforall, (1) and (3) are handled by the usual C mechanisms of struct types and translation-unit boundaries [we go to great effort to maintain C-style separate compilation, though we will likely build a better namespace/module system at some point], (2) by traits, and (4) by a yet-to-be-implemented system of RTTI for specific "inherited" types [likely when the undergrad RA who started our exceptions implementation comes back as a Master's student this fall].<p>As you mention, many use-cases (including widgets in GUIs, but also abstract syntax trees in compilers) require some sort of heterogeneous collection type to work properly, and for this OO is the right model. We just don't want to force the entirety of that model on every use case, so we can just take traits when we want to write a polymorphic function over related types or an ADT like "Set" which requires its keys be sortable, or just take RTTI for exception handling, when the set of exception types we're handling is known statically, but we need to determine if the thrown exception inherits from one of the caught types.<p>[1] <a href="https://golang.org/doc/faq#Is_Go_an_object-oriented_language" rel="nofollow">https://golang.org/doc/faq#Is_Go_an_object-oriented_language</a></p>
]]></description><pubDate>Sat, 24 Mar 2018 14:33:24 +0000</pubDate><link>https://news.ycombinator.com/item?id=16666761</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16666761</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16666761</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>[on the team] It helps if you use the official ASCII spelling, Cforall -- a DuckDuckGo search for "Cforall" in private browsing mode pulled up our homepage first result. (I have no idea who the OP for this thread is, they're no one associated with the team.)</p>
]]></description><pubDate>Sat, 24 Mar 2018 14:09:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=16666648</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16666648</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16666648</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>It's maybe not quite what you're looking for, but Cforall's polymorphic functions can eliminate nearly-all the unsafety of void-pointer-based polymorphism at little-to-no extra runtime cost (in fact, microbenchmarks in our as-yet-unpublished paper show speedup over void-pointer-based C in most cases due to more efficient generic type layout). As an example:<p><pre><code>    forall(dtype T | sized(T))
    T* malloc() {  // in our stdlib
        return (T*)malloc(sizeof(T)); // calls libc malloc
    }

    int* i = malloc(); // infers T from return type</code></pre></p>
]]></description><pubDate>Sat, 24 Mar 2018 13:55:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=16666589</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16666589</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16666589</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>Transpiles-to-(GNU-)C -- it was first written before LLVM, if we were starting the project today it would likely be a Clang fork.</p>
]]></description><pubDate>Sat, 24 Mar 2018 02:00:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=16664328</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16664328</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16664328</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>[On the Cforall team] For what it's worth, one of the features Cforall adds to C is RAII.<p>The exception implementation isn't done yet, but it's waiting on (limited) run-time type information, it already respects RAII.</p>
]]></description><pubDate>Fri, 23 Mar 2018 21:48:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=16662873</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16662873</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16662873</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>[also a CS 343 TA] I personally agree with you -- if it were up to me I'd refactor CS 343 into a pair of courses, maybe focusing on high-level concurrency constructs with a follow-up course on building that sort of runtime system.</p>
]]></description><pubDate>Fri, 23 Mar 2018 19:40:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=16661900</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16661900</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16661900</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>[on the Cforall team -- also a CS 343 TA] We've incorporated the main uC++ feature set into Cforall, but are still using uC++ for 343; maybe in another couple years when Cforall is stabilized a bit we'll give it to the students.</p>
]]></description><pubDate>Fri, 23 Mar 2018 19:37:27 +0000</pubDate><link>https://news.ycombinator.com/item?id=16661874</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16661874</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16661874</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>[on the Cforall team] One of our Master's students has incorporated the majority of the uC++ features into Cforall as well, with some neat extensions for multi-monitor locking in a way that doesn't introduce synchronization deadlocks not present in user code.</p>
]]></description><pubDate>Fri, 23 Mar 2018 19:28:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=16661785</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16661785</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16661785</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>[on the Cforall team] It broadly matches our other operator-overloading syntax, where the ?'s show where the arguments go, e.g. ?+? for binary addition, ?++ for postincrement and ++? for preincrement. For something as common as constructors and destructors, a concise syntax is a desirable feature.</p>
]]></description><pubDate>Fri, 23 Mar 2018 19:22:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=16661719</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16661719</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16661719</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>IIRC [not the team lead] they approached us when they were looking for modernization options for their existing C codebases. From there it went through the usual university-corporate research partnership process.<p>Zig looks neat, BTW.</p>
]]></description><pubDate>Fri, 23 Mar 2018 18:20:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=16661089</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16661089</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16661089</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>Most programming languages do an initial period of internal development before a public release.<p>When I started on the project ~3 years ago, it took me about 2 weeks to work around the (then current) set of compiler bugs to make a 100-line benchmark program -- naturally a public release at that point would not have been fruitful. Today our compiler generally works, and we're looking forward to making a public release once we get a couple more features stabilized.</p>
]]></description><pubDate>Fri, 23 Mar 2018 16:28:05 +0000</pubDate><link>https://news.ycombinator.com/item?id=16659746</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16659746</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16659746</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>[actually on the Cforall team] This is basically our pitch -- the last 30 years of language design features applied to a language that is not only source-compatible with C (like C++), but actually maintains the procedural paradigm of C (unlike C++) -- idiomatic C code should require minimal to no change to make it idiomatic Cforall code, and skilled C programmers should be able to learn the extension features orthogonally, rather than needing to figure out complex interactions between, say, templates and class inheritance. We are working in the same space as C++, and do draw inspiration from C++ where useful, but with the benefit of decades of watching C++ try things to see where the important features are.<p>There's also some really neat language-level concurrency support; work is ongoing on new features and a shorter summary, but you can see one of our Master's student theses for details: <a href="https://uwspace.uwaterloo.ca/handle/10012/12888" rel="nofollow">https://uwspace.uwaterloo.ca/handle/10012/12888</a></p>
]]></description><pubDate>Fri, 23 Mar 2018 16:12:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=16659554</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16659554</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16659554</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>[actually on the Cforall team] Huawei has funded the project for the past couple years, the web server is just our university research group's web host, which we didn't expect to get this much traffic on (it wasn't one of us who put this page on HN). We've been running fairly low-profile for the moment, but should make a beta release later this summer.</p>
]]></description><pubDate>Fri, 23 Mar 2018 15:59:55 +0000</pubDate><link>https://news.ycombinator.com/item?id=16659406</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16659406</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16659406</guid></item><item><title><![CDATA[New comment by BruceIV in "C for All"]]></title><description><![CDATA[
<p>I'm actually on the Cforall team -- we've been running fairly low-profile for the moment (it wasn't one of us that posted the homepage to HN), but plan on making a beta release of the compiler and stdlib sometime this summer.<p>If you're interested in working on the project though, more hands are always welcome; I'd suggest contacting our team lead, Peter Buhr, his email is pabuhr AT the university domain Cforall is hosted on.</p>
]]></description><pubDate>Fri, 23 Mar 2018 15:56:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=16659362</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=16659362</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=16659362</guid></item><item><title><![CDATA[New comment by BruceIV in "Why ML/OCaml are good for writing compilers (1998)"]]></title><description><![CDATA[
<p>A thousand times this; I've been working on compiler-y things in C++ for the past couple years, and I am firmly convinced that the visitor pattern is a truly inadequate way to attempt to compensate for the lack of a proper destructuring pattern-matching construct in a language.</p>
]]></description><pubDate>Mon, 14 Dec 2015 05:53:22 +0000</pubDate><link>https://news.ycombinator.com/item?id=10729615</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=10729615</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=10729615</guid></item><item><title><![CDATA[New comment by BruceIV in "Fantasy must shake off the tyranny of the mega-novel"]]></title><description><![CDATA[
<p>There's some really good YA genre fiction out there, but I think one of the defining aspects of the genre is it's written about teenage protagonists with a number of very teenage problems, which I find increasingly tedious the further I get into my twenties.<p>That said, Marissa Meyer's Lunar Chronicles (to pick a somewhat less known example) are pretty excellent sci-fi, if you can get past the annoying teenage romances of the protagonists.</p>
]]></description><pubDate>Sat, 23 May 2015 02:36:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=9591802</link><dc:creator>BruceIV</dc:creator><comments>https://news.ycombinator.com/item?id=9591802</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=9591802</guid></item></channel></rss>