HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Snarwin

no profile record

comments

Snarwin
·7 mesi fa·discuss
The oldest defer-like feature I can find reference to is the ON_BLOCK_EXIT macro from this article in the December 2000 issue of the C/C++ Users Journal:

https://jacobfilipp.com/DrDobbs/articles/CUJ/2000/cexp1812/a...

A similar macro later (2006) made its way into Boost as BOOST_SCOPE_EXIT:

https://www.boost.org/doc/libs/latest/libs/scope_exit/doc/ht...

I can't say for sure whether Go's creators took inspiration from these, but it wouldn't be surprising if they did.
Snarwin
·7 mesi fa·discuss
I thought the "free" in "free web" was supposed to mean "free as in freedom," not "free as in beer." Have we really reached the point where the CEO of Mozilla no longer understands or cares about that distinction?
Snarwin
·8 mesi fa·discuss
There's plenty of application-level C and C++ code out there that isn't performance-critical, and would benefit from the safety a garbage collector provides.
Snarwin
·11 mesi fa·discuss
Several things:

1) Em-dashes

2) "It's not X, it's Y" sentence structure

3) Comma-separated list that's exactly 3 items long
Snarwin
·11 mesi fa·discuss
It's possible that without the medication, you wouldn't have gotten burned out like this. But it's also possible that you'd have missed out on all of the benefits of being medicated and still gotten burned out anyway.
Snarwin
·11 mesi fa·discuss


  import std.meta: AliasSeq;

  enum E { a, b, c }

  void handle(E e)
  {
      // Need label to break out of 'static foreach'
      Lswitch: final switch (e)
      {
          static foreach (ab; AliasSeq!(E.a, E.b))
          {
              case ab:
                  handleAB();
                  // No comptime switch in D
                  static if (ab == E.a)
                      handleA();
                  else static if (ab == E.b)
                      handleB();
                  else
                      static assert(false, "unreachable");
                  break Lswitch;
          }
          case E.c:
              handleC();
              break;
      }
  }
Snarwin
·12 mesi fa·discuss
> ChatGPT is succeeding because they created a better search experience

Or perhaps because Google created a worse search experience.
Snarwin
·12 mesi fa·discuss
It's not actually that much to remember. There are 3 shapes that cover most of the major chords, and 3 special cases (F♯, B♭, and B).
Snarwin
·anno scorso·discuss
You can still write the extension in C++ and expose an extern "C" interface.
Snarwin
·5 anni fa·discuss
The median Google search user probably never learned to use any of these "advanced" features in the first place. For them, having Google ignore the precise wording of their query and show results for more common related terms is almost certainly an improvement.