A Byte of Coding Issue 400

A Byte of Coding Issue 400

A Byte of Coding

Hi hi hi,

Wowza, issue #400. That’s a lotta issues.

Anyway, here’s dat issue.

Made possible through generous sponsorship by:

Published: 11 December 2023

Tags: javascript

Charles Lowell explores the concept of the 'await event horizon' in JavaScript, likening it to a point of no return for asynchronous operations, highlighting the challenges this poses for error handling and resource management in async functions.

Some highlights:

  • Discusses the limitations of current async programming patterns where functions can get indefinitely stuck waiting for promises to resolve.

  • Introduces the idea of structured concurrency as a potential solution to mitigate these issues by allowing better control over asynchronous operations.

  • Explores the use of generator functions as a more robust alternative to traditional async functions, providing a way to manage and abort asynchronous operations more effectively.

Published: 1 July 2021

Tags: concurrency, memory

Michael Reitzenstein introduces the concept of temporal fuzzing in memory models, explaining its application in analyzing shared memory concurrency and the unexpected outcomes that can arise from different processor memory models.

Some highlights:

  • Temporal fuzzing is used to explore and expose concurrency issues by simulating different memory models and observing the outcomes.

  • The article provides a detailed pseudocode scenario illustrating how simultaneous operations can lead to various results depending on execution timing.

  • Demonstrates how temporal fuzzing can aid in understanding complex systems and predicting their behavior under different conditions.

Published: 28 June 2021

Tags: sponsored, auth, web

WorkOS has published an extensive guide on how one-time passwords work, their benefits, and implementation details.

Some highlights:

  • “OTPs come in three different forms, and each form works differently: time-synchronized OTPs, lockstep synchronized OTPs, or transmission-based OTPs”

  • OTPs are more secure than static passwords, but can create a frustrating user experience due to potential delays

  • Pros and cons for OTPs

Published: 9 May 2024

Tags: haskell, functional

Srijan explains defunctionalization for flattening out higher order functions in compiler passes.

Some highlights:

  • Based on a paper that demonstrates it in OCaml.

  • “Defunctionalization is a transform – a way to re-write the original program without using higher order functions such that it can be trivially compiled to a flat IR in subsequent compiler passes.”

  • “Defunctionalization can transform first class functions with immutable variable captures”.

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.A Byte of Coding Issue 399