A Byte of Coding Issue 406

A Byte of Coding Issue 406

A Byte of Coding

Howdy,

One of the more uncomfortable feelings is when you swallow a pill and it feels like it gets stuck sideways and doesn’t go fully down. Ugh.

You know what’s odd? Microsoft is investing billions of dollars into OpenAI, but the latter’s recent promos were all done on Apple products. And Apple is making a deal with OpenAI. Isn’t there a conflict of interest there?

Anyway, here’s the issue.

Made possible through generous sponsorship by:

Published: 19 May 2024

Tags: javascript, html

Frank Force introduces a 256-byte raycasting engine (in an HTML canvas element) that generates a cityscape, demonstrating efficient use of minimal code. The project showcases how to create complex visual outputs with compact JavaScript.

Some highlights:

  • The engine uses a combination of HTML and JavaScript to render the scene in a small space.

  • The code employs basic algebra and clever tricks to achieve the raycasting and rendering.

  • The project highlights the potential of tiny code for generating intricate graphics and structures.

Published: 19 May 2024

Tags: c++, algorithms

Alan Wolfe describes a low discrepancy shuffle iterator that supports random access and inversion, leveraging irrational numbers like the golden ratio for better sequence properties. This approach improves upon traditional shuffling methods in performance-critical applications.

Some highlights:

  • Utilizes irrational numbers to drive the shuffle sequence, ensuring low discrepancy.

  • Supports constant-time random access and inversion for efficient element retrieval.

  • Demonstrates significant improvements in reducing sequence duplicates and missing values.

Published: 25 March 2024

Tags: sponsored, auth

WorkOS published an extensive guide on building modern day user management, diving into various auth topics like SSO, MFA, and even user provisioning.

Some highlights:

  • Session management is a foundational piece of user management but is complex to build. Devs need to consider cookie-based vs. JWT-based auth and how to persist login state information for users that are part of multiple orgs.

  • At the 201 level, things like bot detection and org auth policies become more relevant.

  • 301 topics include invitation flows, email verification, and more.

Published: 20 May 2024

Tags: database, rust

Justin Jaffray begins a series on building an LSM-based database, focusing on a log-structured approach where the log itself functions as the database. This first installment emphasizes the fundamental operations of a key-value store.

Some highlights:

  • Introduction of an LSM-based storage engine with basic operations (put and get).

  • Explanation of using Rust for implementation, minimizing dependencies.

  • Discussion on writing data to a log and ensuring durability with fsync.

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.