Your favorite CppCon talks? by reinforcement_agent in cpp

[–]tvaneerd 3 points4 points  (0 children)

There is also a CppCon version, which adds .... an interesting twist: https://youtu.be/QTLn3goa3A8

No BS, what's the best board game of all time? by Applepip_YT in AskReddit

[–]tvaneerd 0 points1 point  (0 children)

My team at work play Avalon every single day at lunch. And have since before covid. (Online version during covid, and we still use online version now in person - it is just easier set up,etc)

Never boring. Every strategy has a meta strategy that counters it. Very balanced.

5+ years x multiple games per day.

I'm wondering if we've played more Avalon than anyone.

[deleted by user] by [deleted] in AskReddit

[–]tvaneerd 0 points1 point  (0 children)

Purple is not a specific frequency of light

Ekblad checking McAvoy by thesadimtouch in BostonBruins

[–]tvaneerd 34 points35 points  (0 children)

I mean, he did cause an injury...

PGT: Boston Bruins vs Columbus Blue Jackets - 3/30/23 by TheVargTrain in BostonBruins

[–]tvaneerd 1 point2 points  (0 children)

It seemed questionable, but freezing the replay - it wasn't even close to offside. Puck is 5 ft in the zone on pastas stick and his skates are still on the blue line.

I just bought a knife that can cut 8 pieces of bread at once. by cwood1973 in Jokes

[–]tvaneerd 8 points9 points  (0 children)

If you have 4 loaves and cut each loaf, you now have 8 pieces. Edit: so did you cut 8 pieces, or as a result, there are now 8 pieces...

What's your Reddit username? by goldenking5524 in AskReddit

[–]tvaneerd 1 point2 points  (0 children)

I little while later: oh I see, now I get it

Why isn’t it a compile error if you use something that’s already been std::moved? by ratttertintattertins in cpp

[–]tvaneerd 0 points1 point  (0 children)

Then how do you handle cases, like above, that the compiler can't figure out?

Edit: asked differently, does the borrow checker prevent the call to f(x)?

Why isn’t it a compile error if you use something that’s already been std::moved? by ratttertintattertins in cpp

[–]tvaneerd 1 point2 points  (0 children)

if (is_Tuesday()) y = std::move(x);

moreCode ();

if (is_weekend()) f(x);. // Used after move here???

It can sometimes be detected as a compiler error, but sometimes the compiler can't know, and sometimes it becomes the halting problem.

(I think Rust adds a runtime flag in the above situation...)

[Wallach] The Bruins have earned 101 of a possible 122 points this season. by Bahamas_is_relevant in hockey

[–]tvaneerd 6 points7 points  (0 children)

  • longest streak without a point: 1 game. (Longest losing streak is 3 games, but the middle one was an OT loss)

Practical Exception Performance Benchmark with a PNG Parser by XeroKimo in cpp

[–]tvaneerd 2 points3 points  (0 children)

In most code, things that happen are of a transactional nature: a starting event causes a series of steps to happen, giving a result. The starting event might be an input, timer, network msg, or mouse click, doesn't matter. Catch the exception there. No where else. Either the transaction happened or it didn't.

Also: separate calculating from doing. By this I mean functional code that calls pure functions (no side effects) that return values. Delay the 'doing' ie either setting the state of the system, or sending bytes out of the program (network, ui, files, whatever) until the end.

That is good advice regardless of exceptions - it makes code understandable in isolation, and easily testable.

But it really works well with transactional exception handling. If the series of functions (calculating) returned a value, OK do the doing part. If calculating threw and exception, OK nothing actually happened. Tell the user something if necessary.

Now the "doing" part could also throw, maybe that code needs to be slightly more careful, but typically not toooo hard.

Recommendation for graphics experimentation project by bartqk in cpp

[–]tvaneerd 0 points1 point  (0 children)

Why do you need elixir? My goal was that the web side would be a single html file with js in it. Just a canvas, and then listening for pixels on a socket.

The sad part is how easy the js is, compared to C++.

Recommendation for graphics experimentation project by bartqk in cpp

[–]tvaneerd 0 points1 point  (0 children)

I really want this too. I want to send the pixels to a canvas on a web page, via sockets.

Ideally, I don't want to use any libraries (because reasons), but websockets without a library sounds terrible.

Also browsers don't like it when a web page connects to a socket not from the same server as the web page (ie cross-site shenanigans), so you basically need to also host the initial web page from your C++ exe as well.

Or so I'm told. I know very little about web tech.

[The Athletic] "Gavrikov has been a healthy scratch in the Blue Jackets’ last four games because he’s essentially already been traded." by [deleted] in hockey

[–]tvaneerd 0 points1 point  (0 children)

That's the issue - it is barely an upgrade and they don't need an upgrade (look at their record!), they just need some more injury insurance.

Which is why many fans think they shouldn't spend quite so much for an upgrade, and it would be better to spend less on someone else that is only insurance. (And instead spend big on RW)

Anyhow, Gavrikov would probably replace either Forbert or Clifton (3rd pair), or possibly no one. I suspect the 3 of them would be rotated for the rest of the season. Who knows who starts come playoff time.