Creating a 2D physics engine from scratch in Javascript

A Complete Guide to Lock Convoys

3 mistakes I’ve made at the beginning of an incident (and how not to make them)

Simple Refinement of Anonymous Sum Types in Pattern Matches

Issue #300

11/29/2022

{{PreviewText}} 

Howdy
I'm on a flight this morning, so I actually made this issue yesterday. Time travel! Today's the big 300th issue! I've got nothing special planned other than the same ol' styled issue.
Yesterday I tried to unsuccessfully get Hetzner to sponsor the newsletter and pay by letting me rent a bare metal server for free for all of my projects. Maybe if the tweet gets enough attention they'll reply. Or someone else will be the valiant knight *cough* *cough*.
Anyway, here's the issue.
PS. Thanks Matt for the kind words in the feedback form yesterday. I appreciate them!

====================================================================

Today's Sponsor: FireHydrant

Stuck in incident management deja vu? Stop simply putting out fires and start improving reliability with a full-cycle incident management platform.

====================================================================

Creating a 2D physics engine from scratch in Javascript

Published: 12 November 2022
Tags: graphics, javascript


Ailef discusses how to write a toy 2d physics engine that supports basic forces, collisions and constraints (joints) for circle-shaped objects, as well as a renderer to make it all visible.
Some highlights:

  • Verlet integration is a method to compute an approximation for the motion of an object at discrete intervals of time
  • Constraints tell the physics engine where an object shouldn't be located and collisions are just constraints that tell the engine two objects can't overlap
  • Handling different shapes with constraints is difficult


====================================================================

A Complete Guide to Lock Convoys

Published: 28 November 2022
Tags: algorithms, cpu, os


Dave Kilian presents lock convoys, which are a problem that causes throughput to collapse in high-performance multithreaded networked systems. The problem arises from the interplay between the designs of code, the CPU, the operating system kernel, and the way locks are implemented in software.
Some highlights:

  • "A convoy is a persistent chain reaction of waiting that can occur in any queuing system"
  • One small issue can lead to a huge time lag
  • If locks have a bunch of waiting threads queued up, a convoy is likely to happen if there's a timing issue


====================================================================

3 mistakes I’ve made at the beginning of an incident (and how not to make them)

Published: 29 June 2022
Tags: infosec, management, sponsored


FireHydrant highlights three mistakes you should avoid making at the start of a security incident.


====================================================================

Simple Refinement of Anonymous Sum Types in Pattern Matches

Published: 26 November 2022
Tags: type theory


Ayaz Hafiz "share[s] a simple method to achieve type refinement, a-la flow typing, in a language with anonymous sum types and pattern matching".
Some highlights:

  • Type refinement refers to the narrowing of a value's type based on the control flow of a program
  • The method is derived from OCaml's conversion bindings of polymorphic variants and supports compilation of anonymous sums to non-uniform memory layouts
  • There's a lot of academic jargon, but the principles are pretty simple



How did I do?

* Amazing
* Articles not relevant to me
* Articles were relevant, but badly written
* Summaries told me everything I wanted to know
* I like turtles

Want to help?

Thank you for reading! If you enjoy the newsletter, I would really appreciate you helping me spread the word by forwarding this to your friends and colleagues or sharing it on social media! Get cool stuff for your referrals using your link https://abyteofcoding.com.

Your referrals:


If you want to discuss or comment on this issue, head on over to this page at A Byte of Coding. You can also subscribe there if you're new!

Have comments or feedback? Just reply to this email or hit me up on Twitter @AByteOfCoding.

Email landed in your promotions tab? Please move it over to primary so you don't miss the latest issues in the future.
Thanks for your Support! 

Big thanks to all of the Patreon supports and company sponsors. If you want to support the newsletter you can checkout 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.


Stats (updated daily)

Sent: 2994

Opens: 1390

Clicks: 429

Link Clicks Clicks % Unique Clicks Unique Clicks %
Creating a 2D physics engine from scratch in Javascript 90 40.18% 94 40.34
A Complete Guide to Lock Convoys 76 33.93% 79 33.91
3 mistakes I’ve made at the beginning of an incident (and how not to make them) Awaiting Update Awaiting Update Awaiting Update Awaiting Update
Simple Refinement of Anonymous Sum Types in Pattern Matches 58 25.89% 60 25.75

Previous

Back to Issues

Next