The JBM Streams

I haven’t been either streaming or coding serious C++ in a while, so to get myself back on track, I’ll be streaming easy puzzles in C++17 this evening. Say 4 to 5 hours from now.

Maybe even clashing, who knows.

Thanks for attending!

It was a slow start indeed, but I had a lot of fun rediscovering stuff and trying new ways of doing stuff. I’ll YouTube and summarize tomorrow, if you’ll allow.

See you next time!

Permalink on YouTube, edited.

A rather slow start with Van Eck’s sequence, that was mostly a bad experience for me, and not really a good learning opportunity. Then came TicTacToe to exercise std::array, destructuring binds and initializer lists.

Rock Paper Scissors Lizard Spock didn’t bring anything particular to the table and went fine. 1D Spreadsheet presents a mostly functional approach at first, and gradually transforms to objects, exercising tagged unions, extracting properties out of an unbound struct, and a refresher on the rule of three.

The Descent didn’t take too long, but does feature a satisfying use of <algorithm> and <iterator>. A Child’s play took a bit more time. It uses <complex> though its final form could really do away with it. 1D Bush Fire didn’t take too long either.

Create the longest sequence of 1s features a nice progression for the initial solution to the simplified O(1) space one, using <algorithm>, <iterator> and lambdas. Graffiti on the fence is definitely a puzzle I’d recommend for algorithms, but from a C++ standpoint it didn’t bring much more.

The links here are CG solution links: you can only access them if you’ve already solved the same puzzle in the same language. Direct links within the videos are in its description on YouTube. They’re also available at Twitch’s as highlights.


A few more easy puzzles in C++ (edited)

  • Smooth! Great puzzle, but nothing very interesting C++-wise. :innocent:
  • Unit Fractions is a fine reminder to myself that I’m not very good at feeling confident about doing math after dinner, with no paper. And that any wrong step in the IDE can get me to forget I had changed the int width for a good reason. :unamused:
  • Rectangle Partition is always a good puzzle, though it didn’t present an opportunity for much C++ goodness at first. Factoring it was a good exercise, and could be useful to others. It closes on an open question, and I still welcome any answer to it: is there a (reasonable) way to bend the STL to perform that merge-like operation for me? :thinking:
  • Hello, World! You can hear the cringe from the other end of twitch when I realize it’s next on the list. Part 1 has me struggling against my inner NOPE to (re-)discover all the unpleasant surprises of additional statement hurdles. But it passes. If you listen closely, you’ll feel me LOL at my forgetting to convert the angles to radians one additional time. :upside_down_face:
    Part 2 may be more advanced: eliminating all sources of repetition and temporary variables I could. And getting to parse with a combination of copy_n and a bespoke STL-compatible iterator. :face_with_monocle:

The same disclaimers apply about CG-internal solution links.
It was fun, thanks for attending and see you next time!

Here we go again.

I’ll be streaming my early hours of the PAC Spring Challenge tomorrow at 16:00 CEST, on the usual twitchy place. I most likely will not have the time to come back to it during the event, so expect this to be my final standing. Unless something extreme happens to me in the meantime, the stream will be in Haskell. I mean, English.

Peace and func!

Wood-2 to mid-Bronze (~900/2300 at time of writing) raw on Twitch. I don’t think I’ll have the time to trim and YouTube until tomorrow.

If there’s specific interest (mention it here or :+1: a post that does), I could do a special on that sortBy (liftA2 (<>) (comparing (Down . charToValue . snd)) (comparing (dist pacPos . fst))) that sparked so much discussion. With comparison to C++.

Let’s start PACking! Wood-2 to mid-Bronze in Haskell, edited for YouTube.

I’m bored. But it’s too hot to hack on TVC, so I’ll be streaming some puzzle solving instead. Either Pikaptcha or Brainfuck, depending on my mood.

Next Friday evening (CEST)

What the Brainfuck won. Thanks to all the armchair code reviewers who joined and see you next time!

Writeup and YouTube for those who want to catch up on my BF and/or CG rants.

Likely going to stream a new puzzle’s creation tonight. Same time, 2100CEST (±40min., you know me). That’s about four hours from now.

Twitch channel

I’ll resume the CGLambda (yeah, it’s got a name now) stream this evening, same time (about four hours from now).

Postponed to tomorrow.
Sorry, too many adversarial events to properly do it tonight :-/

A window of opportunity is opening. I’ll take a look at the current contest in 30 minutes or so. Haskell to Bronze if I stay awake long enough; most likely in French because I actually haven’t tried that yet.

Edit: done.
From zilch to upper Bronze in Haskell and French: raw twitch / trimmed & edited YouTube

1 Like