- A Byte of Coding
- Posts
- A Byte of Coding Issue 347
A Byte of Coding Issue 347
A Byte of Coding Issue 347
Howdy,
I recently rented a dedicated server and set up caprover (open-source platform as a service) on it. Super satisfied with it. I’ve been exploring some of the “one click apps” you can deploy and found a replacement for the feed aggregator I was using. It does mean I have to adjust the dashboard I made for myself to curate this newsletter to now pull articles from the new feed aggregator, which is slightly annoying. It also looks like I’ll have to finally get a good understanding of how docker works, because that’s how you have to deploy your own projects. Still, it’s super satisfying being able to spin up a DB or app in a couple of minutes and not have to deal with all of the server and nginx configs.
Anyway, here’s the issue.
Unblocked provides helpful and accurate answers to questions about your codebase. It generates insights by complementing your source code with relevant discussions from GitHub, Slack, Notion, JIRA and more. Spend less time hunting for information and more time doing what you love: writing great code.
Published: 6 February 2024
Tags: rust, garbage collector
Nick Fitzgerald introduces a garbage collection library he implemented in Rust and dives into some of its internal workings, including how it tackles classic garbage collection footguns.
Some highlights:
“safe-gc crate: a garbage collection library for Rust with zero unsafe code”
doesn’t need an unsafe finalizer trait, or even any additional finalizer trait: it can just use Drop
implemented using mark-and-sweep rather than a copying collector
Published: 5 February 2024
Tags: javascript, optimization
Olivier Flückiger concisely explains how and where core JavaScript objects are stored in the V8 JS engine.
Some highlights:
these objects are called immovable immutable roots and they live in their own heap – the read-only heap
they’re created and stored at compile time by V8
quick comparison is done via memory address comparison of the objects
Published: 2 February 2024
Tags: sponsored, cicd, infrastructure
Unblocked discusses their experience switching their deployment pipeline from Github hosted runners to self-hosted ephemeral runners on AWS EC2 using Spot or On-Demand instances.
Some highlights:
“GitHub’s hosted runners became a bottleneck for both cost and performance”
“Up to 90% savings when using Spot instances, and 30-70% savings when using On-Demand”
Includes example configuration for the custom Github Action, as well as a link to the repo
Published: 31 January 2024
Tags: http, networking
Phil Sturgeon has written a detailed rundown on the X-Forwarded-For HTTP header, including what it is, what it’s used for, its limitations, and alternatives.
Some highlights:
works as a mechanism for conveying the original source IP addresses of clients, and not just across one hop, but through chains of multiple intermediaries
used for user authentication, load balancing, data localization, geographic content delivery, access control and security, web application firewalls, fraud prevention, api rating limiting, localized advertising, and logging and analytics
should be replaced by the Forwarded header, but still commonly used
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.