Skip to content

Instantly share code, notes, and snippets.

View Kestrer's full-sized avatar
🐢
just chillin

Kestrer

🐢
just chillin
View GitHub Profile
@Kestrer
Kestrer / ChaiNNer with remote backend – Fly.io-powered.md
Created February 4, 2025 19:01
ChaiNNer with remote backend – Fly.io-powered

This document instructs how to set up a Fly.io instance for personal use that runs ChaiNNer. Fly.io has several advantages, namely that

  • it is pay for what you use, and thus very cheap, and if you spend <$5 in a month, totally free, and
  • if your account has GPUs enabled (which you have to email support for), you get access to very powerful GPUs such as the L40S, which we will be using here.
@Kestrer
Kestrer / how-to-write-hygienic-macros.md
Created October 17, 2020 05:35
A guide on how to write hygienic Rust macros

How to Write Hygienic Rust Macros

Macro hygiene is the concept of macros that work in all contexts; they don't affect and aren't affected by anything around them. Ideally all macros would be fully hygienic, but there are lots of pitfalls and traps that make it all too easy to accidentally write unhygienic macros. This guide attempts to provide a comprehensive resource for writing the most hygienic macros.

Understanding the Module System

First, a little aside on the details of Rust's module system, and specifically paths; it is