std::exchange Patterns: Fast, Safe, Expressive, and Probably Underused

Slack Tracking in V8

The Fresh Smell of ransomed coffee

Issue #11

9/25/2020

A Byte of Coding Issue #11
TGIF!
Don't know why I still get excited about Fridays. I can make my own work schedule, so the weekend isn't really the weekend, but I guess it's just been ingrained in my mind from school. Anyways here's the issue.
Donate Here

std::exchange Patterns: Fast, Safe, Expressive, and Probably Underused

Published: 25 September 2020
Tags: cpp


 If you're unfamiliar with std::exchange, it basically just takes an object value, replaces it with a new value, and then returns the old object value. Does that sound familiar? Well if it doesn't, Ben Deane's article does an excellent job of giving some good example use cases for exchange, including iterators and passing variables in a multi-thread environment. Ben also compares it to swap and move.

Read Full Article

Slack Tracking in V8

Published: 24 September 2020
Tags: v8, javascript


"Slack tracking is a way to give new objects an initial size that is larger than what they may actually use, so they can have new properties added quickly. And then, after some period of time, to magically return that unused space to the system". This is useful for JavaScript because it doesn't have static classes. Michael Stanton has written an extensive article that dives into how this feature is implemented in the V8 engine, accompanied by lots of code and diagrams.

Read Full Article

The Fresh Smell of ransomed coffee

Published: 25 September 2020
Tags: hacking


The popularity of IoT devices, like smart lights, smart homes, or smart coffee makers, has been growing substantially in recent years. These devices can be fun to use (or frustrating), and convenient, but when they're not very well secured. In this instructional article, Martin Hron presents how he hacked his way into a popular smart coffee maker be reverse engineering and modifying its firmware. Martin covers all the important, and subtle points, making this a very well fleshed out article packed full of information.

Read Full Article
Thanks for your Support! 

This newsletter is provided to you for free, but if you'd like to show your support and help out, you can donate on the Patreon page. It's not necessary, but it lets me know that I'm doing a good job and that you're finding value in the content.
Donate Here

Stats (updated daily)

Sent: 660

Opens: 613

Clicks: 188

Link Clicks Clicks % Unique Clicks Unique Clicks %
Read Full Article 97 51.60% 78 52.70
Read Full Article 66 35.11% 48 32.43
Read Full Article 20 10.64% 17 11.49
Donate Here 5 2.66% 5 3.38

Previous

Back to Issues

Next