Live data from Hacker News

Viewing profile — bstamour

bstamour

HN member
Joined
Fri, Jul 19, 2013, 1:24 AM UTC
HN karma
303
Public activity
145 items

About bstamour

No profile information was provided.

Recent public activity

  1. comment
  2. comment
    Comment #32943950

    ... I think the perl code actually compiles (err, runs) though. :-)

  3. comment
    Comment #32485252

    I used arch around 2008 or so, then distro-hopped to Slackware, when I remain to this day. Some of us escape.

  4. comment
    Comment #31726702

    They actually ship three different cans - one for each firewall in the base install.

  5. comment
    Comment #29542291

    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 c…

  6. comment
    Comment #29539857

    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 o…

  7. comment
    Comment #28202393

    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.

  8. comment
    Comment #23135027

    Slackware. I use the Plasma5 packages maintained by Eric Hameleers, and it's a wonderful experience.

  9. comment
    Comment #22330098

    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 a…

  10. comment
    Comment #22184819

    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.

  11. comment
    Comment #21947677

    You can add a literal operator: auto operator "" _r(char const* str, unsigned long) { return std::regex{str}; } To avoid all the backslashes, you can use a raw string literal: int …

  12. comment
    Comment #20760783

    Concrete example: 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); }

  13. comment
    Comment #20745851

    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…

  14. comment
    Comment #20743252

    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 va…

  15. comment
    Comment #20743081

    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…

  16. comment
    Comment #20743051

    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. const int* const ins…

  17. comment
    Comment #19601039

    Lufia 2 is one of my absolute favourite SNES-era RPG's. I try to replay it every few years.

  18. comment
    Comment #19328094

    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 h…

  19. comment
    Comment #19321094

    Why have functions and control structures when we can just jmp?

  20. comment
    Comment #19118986

    Very cool. There should be an arrow from Simula to C++ though, as that's where C++ got its object oriented features from.

  21. comment
    Comment #19118977

    The dialect of object orientation that Delphi compiles is different than object pascal. It's pretty safe to call Delphi a language.

  22. comment
    Comment #18506381

    Boost came about from a few members of the ISO C++ committee as a way to iterate on library features. It would be a shame if none of that work made it's way back into the standard.…

  23. comment
    Comment #18243731

    I love the Graham scan algorithm for computing convex hulls of sets of points. That and the fast exponentiation algorithm, which can be used to compute linear recurrences (e.g. fib…

  24. comment
    Comment #18243550

    Knuth defines effectiveness as: "... all of the operations to be performed in the algorithm must be sufficiently basic that they can in principle be done exactly and in a finite le…

  25. comment
    Comment #18243446

    a % b is a way to do it in fewer iterations than a - b.