Quantcast
Channel: n8henrie.com
Browsing index pages (168 articles)

Nix: Debugging MacOS / Darwin Sandbox Issues

Bottom Line: Filtering the macos logs for sandbox violations can help flesh out the root cause of sandbox-related crashes when building with nix. I recently started getting some unexpected build...

View Article


How to Set a Conditional Breakpoint When Debugging Rust with LLDB

Bottom Line: A little Python can help LLDB break on String contents in Rust.A few months ago I was trying to debug some Rust code that was misbehaving. The bug was in a function that was run hundreds...

View Article


Nix: Why Does My System Depend on $PKG?

Bottom Line:nix why-depends --derivation /run/current-system and nix derivation show --recursive /run/current-system are handy. NixOS and nix-darwin users – especially those following unstable – will...

View Article

Compiling Rust for the ESP32 with Nix

Bottom Line: Nix’s tooling for Rust compilation can target the ESP32. PrefaceThis is a fairly long, meandering post about using nix to compile a no_std Rust project for the ESP32C3. I was able to get...

View Article

Cross-Compile Rust for x86 Linux from M1 Mac with Nix

Bottom Line: Nix makes cross-compiling Rust fairly straightforward. I have been tinkering with using nix to build Rust projects over the last couple of weeks and decided to try my hand at...

View Article


Hacking on nixpkgs with nix develop

Bottom Line: Failing to add MPS support to nixpkgs.python310Packages.torch. I’ve been using nix / nixpkgs / NixOS on and off for a year or two now. I’ve been genuinely impressed at how open and welcome...

View Article

Write a Firefox Extension in Python

Bottom Line: One can write a Firefox extension in (mostly) Python via Pyodide. Disclaimer: I’m not a huge fan of JavaScript, and I don’t use it much, so I am likely not following best practices. I’ve...

View Article

Persistent VMs on pfSense with vm-bhyve

Bottom Line: Configure your VMs to start and run automatically on pfSense with vm-bhyve. If you’re trying to get a Linux VM running under bhyve on pfSense, I strongly recommend that you start with my...

View Article


Running NixOS and Ubuntu VMs on pfSense via bhyve

Bottom Line: With some effort, I got VMs running on my pfSense router/firewall. PrefaceBeing a hobbyist without much experience in networking, this project took me a fair amount of effort over a period...

View Article


Quickly add FreeBSD Packages to pfSense

Bottom Line: I wrote a bash function to add packages directly from FreeBSD to pfSense. Disclaimer: Modifying your firewall is a security risk. Please don’t use the information on this page unless you...

View Article

Find Files by Metadata on MacOS with mdfind

Bottom Line: The mdfind tool on MacOS lets you run CLI queries for files based on metadata. After years of using MacOS, I can’t believe didn’t know about the mdfind (metadatafind) command. It...

View Article

Cross-compiling Rust from aarch64-darwin to x86_64-freebsd

Bottom Line: To build Rust for x86_64-freebsd from M1 Macs, try cross-rs. I started using pfSense as my home router / firewall a few months ago and have been generally pretty happy. Last week I decided...

View Article

Guix System (GuixSD) VM on an M1 Mac

Bottom Line: I got an aarch64 Guix System VM running on my M1 Mac. While learning about nix I’ve also been curious about Guix. It shares the declarative approach and goals of reproducibility in a...

View Article


Linux VMs on my M1 Mac

Bottom Line: Aarch64 Linux VMs are not difficult to get running on an M1 Mac. I ran across an article a few weeks ago which has some detailed instructions for creating an aarch64 Ubuntu virtual machine...

View Article

Easily create (almost) standalone Python executables with the built-in zipapp...

Bottom Line: In many cases Python’s built-in zipapp module can create executables that rely only on a Python interpreter. I had heard a few months ago that youtube-dl provided a single binary...

View Article


Image may be NSFW.
Clik here to view.

Debugging launchd to fix nix permissions on MacOS

Bottom Line: Fix MacOS / launchd permissions issues to auto-run nix scriptsI’ve been delving a little more into nix lately, though to be honest I’m not entirely sure why. It promises confident...

View Article

Image may be NSFW.
Clik here to view.

OpenSCAD in Neovim

Bottom Line: Basic configuration to use Neovim for OpenSCAD development.I recent made my first not-entirely-trivial OpenSCAD model:https://www.thingiverse.com/thing:5382521. It’s an adapter for the...

View Article


Image may be NSFW.
Clik here to view.

The Simplest Rust C++ FFI Example

Bottom Line: Practicing FFI and bindgen since I know so little about C++.One of the many things to love about Rust is that it can integrate with existing codebases and has reasonably good tooling to...

View Article

Image may be NSFW.
Clik here to view.

Decorator to Memoize Sync or Async Functions in Python

Bottom Line: I wrote a simple decorator that can memoize a sync or async python function.Many pythonistas will be familiar with the idea of the memoize decorator; it’s essentially a decorator that...

View Article

Image may be NSFW.
Clik here to view.

Fixing SSH Access on MacOS Monterey (12.0)

Bottom Line: Here’s how I fixed Connection reset by peer on MacOS Monterey.After updating to MacOS Monterey (12.0) a couple of days ago, I found that my SSH access was no longer working.My SSH access...

View Article
Browsing index pages (168 articles)


Latest Images