<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: bstamour</title><link>https://news.ycombinator.com/user?id=bstamour</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Fri, 19 Jun 2026 21:06:47 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=bstamour" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by bstamour in "C++ by Example"]]></title><description><![CDATA[
<p>... I think the perl code actually compiles (err, runs) though. :-)</p>
]]></description><pubDate>Thu, 22 Sep 2022 20:05:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=32943950</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=32943950</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32943950</guid></item><item><title><![CDATA[New comment by bstamour in "Using the same Arch Linux installation for a decade"]]></title><description><![CDATA[
<p>I used arch around 2008 or so, then distro-hopped to Slackware, when I remain to this day. Some of us escape.</p>
]]></description><pubDate>Tue, 16 Aug 2022 16:38:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=32485252</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=32485252</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32485252</guid></item><item><title><![CDATA[New comment by bstamour in "If operating systems were beers (1995)"]]></title><description><![CDATA[
<p>They actually ship three different cans - one for each firewall in the base install.</p>
]]></description><pubDate>Mon, 13 Jun 2022 15:12:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=31726702</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=31726702</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31726702</guid></item><item><title><![CDATA[New comment by bstamour in "The Evolutions of Lambdas in C++14, C++17 and C++20"]]></title><description><![CDATA[
<p>You're right. Lambdas in C++ are syntactic sugar over something the core language has allowed you to do since before C++98. Since you control which variables you capture into the closure, and how, when writing the lambda, all of the information regarding how to make it (e.g. it's size, data members, etc) is static, and so it does not require the use of the heap at all. A concrete example. The following C++ examples do the same thing, and neither touch the heap:<p><pre><code>    // A. Using a struct. The old manual way.
    struct my_lambda {
        my_lambda(int c) : c_(c) {}
        int operator() (int x) const {
            return x == c_;
        }
        int c_;
    };
    
    auto f(vector<int> numbers) {
        my_lambda lam(2);
        // remove all the matching elements
        erase_if(numbers, lam);
        return numbers;
    }

    // B. Using a lambda
    auto g(vector<int> numbers) {
        int c = 2;
        erase_if(numbers, [c](int x) { return x == c; });
        return numbers;
    }</code></pre></p>
]]></description><pubDate>Mon, 13 Dec 2021 18:03:21 +0000</pubDate><link>https://news.ycombinator.com/item?id=29542291</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=29542291</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29542291</guid></item><item><title><![CDATA[New comment by bstamour in "The Evolutions of Lambdas in C++14, C++17 and C++20"]]></title><description><![CDATA[
<p>Internally, lambdas are structs with the "function call" operator overload. Context is done via members of the struct: capture by-value, and the struct copies them and stores its own, capture by reference, and the struct member is a reference. There should be zero heap allocation in any case.</p>
]]></description><pubDate>Mon, 13 Dec 2021 14:28:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=29539857</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=29539857</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29539857</guid></item><item><title><![CDATA[New comment by bstamour in "Slackware 15.0 release candidate one"]]></title><description><![CDATA[
<p>I still use it on my primary desktop computer at home. It's a great, stable system that just keeps on running and doing what it needs to do.</p>
]]></description><pubDate>Mon, 16 Aug 2021 20:17:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=28202393</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=28202393</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=28202393</guid></item><item><title><![CDATA[New comment by bstamour in "Progress on Plasma"]]></title><description><![CDATA[
<p>Slackware. I use the Plasma5 packages maintained by Eric Hameleers, and it's a wonderful experience.</p>
]]></description><pubDate>Sun, 10 May 2020 18:52:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=23135027</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=23135027</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=23135027</guid></item><item><title><![CDATA[New comment by bstamour in "Delphi's 25th Birthday"]]></title><description><![CDATA[
<p>We use Delphi for some of our older applications (everything new is migrating to either C++17 or Go). I remember upgrading the IDE (forget which version, but it was about 3 years ago) and after loading my project, I hit F1 to bring up the help menu. The whole IDE crashed... Between little surprises like that and the insane licensing price, I'm glad we're moving off of it. I don't have any objections to the language itself, but the tooling just isn't where it needs to be.</p>
]]></description><pubDate>Fri, 14 Feb 2020 20:31:17 +0000</pubDate><link>https://news.ycombinator.com/item?id=22330098</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=22330098</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=22330098</guid></item><item><title><![CDATA[New comment by bstamour in "C++20 Reference Card"]]></title><description><![CDATA[
<p>Lock guard has no default constructor, so the line will in fact materialize a temporary lock guard around the mutex m, then throw it away at the semi-colon, thus locking nothing.</p>
]]></description><pubDate>Wed, 29 Jan 2020 19:31:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=22184819</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=22184819</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=22184819</guid></item><item><title><![CDATA[New comment by bstamour in "C++ Pattern Matching Proposal [pdf]"]]></title><description><![CDATA[
<p>You can add a literal operator:<p><pre><code>    auto operator "" _r(char const* str, unsigned long) {
      return std::regex{str};
    }
</code></pre>
To avoid all the backslashes, you can use a raw string literal:<p><pre><code>    int main() {
      auto myre = R"(^hello\w*)"_r;
    }</code></pre></p>
]]></description><pubDate>Fri, 03 Jan 2020 16:55:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=21947677</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=21947677</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=21947677</guid></item><item><title><![CDATA[New comment by bstamour in "Why Const Doesn't Make C Code Faster"]]></title><description><![CDATA[
<p>Concrete example:<p><pre><code>  void foo(const int* const p1, int* const p2) {
    int a = *p1;
    *p2 += 42;
    int b = *p1;
    return a == b; // b = a + 42
  }
  int main() {
    int x = 0;
    return foo(&x, &x);
  }</code></pre></p>
]]></description><pubDate>Wed, 21 Aug 2019 19:35:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=20760783</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=20760783</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=20760783</guid></item><item><title><![CDATA[New comment by bstamour in "Why Const Doesn't Make C Code Faster"]]></title><description><![CDATA[
<p>You're right, but what I meant about it was that just because the variable is const, doesn't mean it can't change from somewhere else between reads. Even if you use synchronization to avoid data races, if you read the pointer to const twice in the function, it could change between the reads.</p>
]]></description><pubDate>Tue, 20 Aug 2019 11:55:39 +0000</pubDate><link>https://news.ycombinator.com/item?id=20745851</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=20745851</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=20745851</guid></item><item><title><![CDATA[New comment by bstamour in "Why Const Doesn't Make C Code Faster"]]></title><description><![CDATA[
<p>If the initial object itself isn't const, then merely declaring the function parameter as a pointer to const won't guarantee that some other thread of execution won't change the value under your nose. Or if you have multiple pointer parameters, they can alias each other.<p>Indirection in C and C++ is a mess, but at least C has the "restrict" keyword. Best to program with value types whenever you can, and use pointers and references when you must.</p>
]]></description><pubDate>Tue, 20 Aug 2019 01:57:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=20743252</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=20743252</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=20743252</guid></item><item><title><![CDATA[New comment by bstamour in "Why Const Doesn't Make C Code Faster"]]></title><description><![CDATA[
<p>readonly was the original proposed name, if I remember my D&E [0] correctly. Bjarne outlined in that book why he went with const instead, but I forget why off the top of my head. I guess it's tine for a re-read!<p>[0] The Design and Evolution of C++</p>
]]></description><pubDate>Tue, 20 Aug 2019 01:17:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=20743081</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=20743081</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=20743081</guid></item><item><title><![CDATA[New comment by bstamour in "Why Const Doesn't Make C Code Faster"]]></title><description><![CDATA[
<p>The examples in the articles are non-constant pointers to constant data. If you want to declare the pointer itself const, you need to do it after the asterisk.<p><pre><code>    const int* const 
</code></pre>
instead of<p><pre><code>    const int*</code></pre></p>
]]></description><pubDate>Tue, 20 Aug 2019 01:08:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=20743051</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=20743051</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=20743051</guid></item><item><title><![CDATA[New comment by bstamour in "The Archetypal Resonance of Classic JRPGs"]]></title><description><![CDATA[
<p>Lufia 2 is one of my absolute favourite SNES-era RPG's. I try to replay it every few years.</p>
]]></description><pubDate>Mon, 08 Apr 2019 00:49:16 +0000</pubDate><link>https://news.ycombinator.com/item?id=19601039</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=19601039</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=19601039</guid></item><item><title><![CDATA[New comment by bstamour in "Grim C++ Tales from the Crypt: The Visitor Pattern (2017)"]]></title><description><![CDATA[
<p>But in languages that support multiple dispatch at the language level, they're just another way of writing polymorphic functions. They're not just a niche feature. When you don't have to write all of the ceremony of the visitor pattern, it's easier to use visitors everywhere without thinking about them.</p>
]]></description><pubDate>Thu, 07 Mar 2019 14:11:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=19328094</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=19328094</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=19328094</guid></item><item><title><![CDATA[New comment by bstamour in "Grim C++ Tales from the Crypt: The Visitor Pattern (2017)"]]></title><description><![CDATA[
<p>Why have functions and control structures when we can just jmp?</p>
]]></description><pubDate>Wed, 06 Mar 2019 18:11:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=19321094</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=19321094</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=19321094</guid></item><item><title><![CDATA[New comment by bstamour in "Family spaghetti of programming languages"]]></title><description><![CDATA[
<p>Very cool. There should be an arrow from Simula to C++ though, as that's where C++ got its object oriented features from.</p>
]]></description><pubDate>Fri, 08 Feb 2019 21:45:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=19118986</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=19118986</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=19118986</guid></item><item><title><![CDATA[New comment by bstamour in "Family spaghetti of programming languages"]]></title><description><![CDATA[
<p>The dialect of object orientation that Delphi compiles is different than object pascal. It's pretty safe to call Delphi a language.</p>
]]></description><pubDate>Fri, 08 Feb 2019 21:44:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=19118977</link><dc:creator>bstamour</dc:creator><comments>https://news.ycombinator.com/item?id=19118977</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=19118977</guid></item></channel></rss>