RSS Amplifier

Blog

mcmah309 Blog

Tech talk and ongoing open source projects

yourusername.github.ioRSS feed ↗10 posts

Latest posts

Bun Has Bun Shell But So Does Deno

One reason I considered picking bun over deno was bun shell. Bun shell allows one to write cross-platform JavaScript & TypeScript scripts with bash-like interop. Bun shell has a growing set of built in commands: cd, ls, rm, echo, pwd, bun, cat, touch, mkdir, which, mv, exit, true, false, yes, seq, dirname, basename. When these are encountered in a statement like $`echo hi` a cross-platform…

Patterns for Modeling Overlapping Variant Data in Rust

When building complex systems in Rust, one of the fundamental challenges developers face is how to organize their data structures to maintain type safety, avoid code duplication, keep their API clean, and remain flexible to changes. This article explores six different approaches to data modeling using a search engine as our example, examining the trade-offs between each approach where fields…

Solving Rust Data Modeling with View-Types: A Macro-Driven Approach

In the previous article, Patterns for Modeling Overlapping Variant Data in Rust, six different approaches to modeling overlapping data structures were explored, each with their own trade-offs between type safety, code duplication, and API flexibility. Today, I want to introduce a solution that addresses many of these challenges: the view-types macro.

Should You Really Ever Use ArrayVec or SmallVec or TinyVec As Your Go To Vec?

Definitions

The `Result` Type In Dart

Every modern programming language has error handling. Like Python, Dart chose the unchecked try-catch catch pattern, Java went with checked try-catch pattern, Zig went with Error Unions, and Rust went the Result type.

Package Highlight - `dart_mappable`

https://pub.dev/packages/dart_mappable

Introducing `indices`

Github: https://github.com/mcmah309/indices

Introducing `error_set`: A Zig-Inspired Approach to Error Handling in Rust

Github: https://github.com/mcmah309/error_set

`rust_core` 0.4 Release and Project Update

github: https://github.com/mcmah309/rust_core pub: https://pub.dev/packages/rust_core

Announcing `activate`: A sane way to manage environment configuration

Recently I got sick of the way I had different imperative ways of managing environments across language domains and having to re-configure things locally to replicate QA bugs, plus the hassle of working in a monorepo. I am also a big fan of tools like direnv and that inspired me to create activate.