Replit —— 在 30 毫秒内搜索 Nixpkgs

  • Main points: Today, Replit releases the first version of rippkgs, a CLI for indexing and searching Nix expressions. It aims to provide quick and accurate package searches. The motivation is to help users interact with Nix more comfortably. It's used instead of existing tools like nix-env, nix search, nix-locate, and search.nixos.org. rippkgs needs an index created by rippkgs-index. It evaluates nixpkgs and generates a SQLite database. Users can search the index with rippkgs. It uses a scalar function and fuzzy_matcher crate for searching. It's also incorporated into the command-not-found handler.
  • Key information: Replit uses Nix to offer many programming languages. Existing tools have limitations. rippkgs focuses on speed and correctness. rippkgs-index evaluates nixpkgs and creates an index. Users can search with rippkgs and an index. The search uses a scalar function and fuzzy matching. It's incorporated into the command-not-found handler.
  • Important details: nix-env and nix search are slow. nix-locate is for known paths. search.nixos.org is for up-to-date channels. rippkgs-index takes special measures to prevent failures. The index is a plain SQLite database and can be queried with sqlite3. rippkgs gives users better visibility in the command-not-found hook. Replit is hiring for writing CLIs.
阅读 28
0 条评论