COSCUP 2026 開源人年會

The Deterministic Rubyist: Taming Your AI Pair Programmer with Nix
2026年8月9日 , TR514

AI coding agents are the new "high-speed interns" of the Ruby world. They can be eager and fast, but leave them unconstrained and you risk wrecking your system. Tie them up too tight and they'll end up hallucinating instead of producing results.

The answer isn't more documentation or prompt engineering; it’s a better contract.

In this talk, we’ll explore how Nix - the functional, deterministic package manager - serves as a bridge between human developers and AI agents. We will move beyond the "it works on my machine" era into the "it works in the contract" era.

We'll discuss how a Nix Flake acts as a shared mental model: a declarative, cryptographic receipt of every dependency, compiler, and system library your project requires.

We will dive into:

  • The Bundler Analogy: Translating Nix concepts into a language Rubyists already speak (Gemfile → Flake, Lockfile → Lock).
  • Effectiveness through Shared Context: How to use Nix to ensure your AI agent has the exact tools it needs (like ruby-lsp or specific C-extensions)
  • Security as an Enabler: Using Nix in tandem with Docker to create "principled sandboxes." We’ll look at real-world patterns from my opensource AI sandboxing tool.
  • The "Double Gemfile" Pattern: A practical tip for managing dev-only gems and agent-specific tools within a Nix-based workflow.

By the end of this session, you’ll see that Nix is a powerful tool for the modern Rubyist to build secure, reproducible, and highly effective environments where humans and AI can collaborate without the chaos.


難易度: 中階

Based in Taiwan. I appreciate the beauty of competing paradigms although deep at heart I am a functional programmer who naively loves Haskell and Nix and - less naively - Rust.
I think it is fun to be a polyglot in both the machine and human world so try asking me a question in any language and there's a non-zero chance I'll manage to answer ;)