hvm-runtime
БесплатноБез исполняемых скриптовНе проверенHVM Runtime Skill
от plurigrid★ 73 звезды на GitHubОб этом скилле
hvm-runtime Skill
"Optimal reduction at the speed of light. Interaction nets meet GPUs."
Overview
HVM Runtime (Higher-order Virtual Machine) implements massively parallel functional computation using interaction nets. Compiles functional code to GPU-accelerated graph reduction.
GF(3) Role
| Aspect | Value |
|---|---|
| Trit | +1 (PLUS) |
| Role | GENERATOR |
| Function | Generates optimal parallel reductions |
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ HVM RUNTIME │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Source Code Compiler Runtime Output │
│ (+1 GEN) (0 COORD) (+1 GEN) (result) │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ ┌───────┐ ┌────────┐ ┌──────────┐ ┌─────────┐ │
│ │ Bend │─────►│ Compile│───►│ Parallel │──►│ Normal │ │
│ │ Lang │ │ to Net │ │ Reduce │ │ Form │ │
│ └───────┘ └────────┘ └──────────┘ └─────────┘ │
│ │ │
│ ┌──────────────┼──────────────┐ │
│ ▼ ▼ ▼ │
│ GPU CUDA Metal │
│ Threads Cores Shaders │
│ │
└─────────────────────────────────────────────────────────────────┘
Interaction Net Compilation
-- Bend source (functional language for HVM)
def fib(n):
match n:
0: 0
1: 1
_: fib(n-1) + fib(n-2)
-- Compiles to interaction net nodes:
-- λ, App, Dup, Era, Sup, Con
Node Types
// HVM interaction net nodes
enum Node {
// Lambda abstraction
Lam {
body: Port,
var: Port
},
// Application
App {
func: Port,
arg: Port
},
// Duplicator (for lazy sharing)
Dup {
label: u32,
left: Port,
right: Port
},
// Eraser (garbage collection)
Era,
// Superposition (parallel branches)
Sup {
label: u32,
left: Port,
right: Port
},
// Constructor (data types)
Con {
tag: u32,
fields: Vec<Port>
},
}
Parallel Reduction
// GPU-parallel interaction
fn parallel_reduce(net: &mut Net, gpu: &Gpu) {
loop {
// Find all active pairs (redexes)
let redexes = find_redexes(net);
if redexes.is_empty() {
break; // Normal form reached
}
// Reduce all in parallel on GPU
gpu.dispatch(redexes.len(), |i| {
let (a, b) = redexes[i];
interact(net, a, b);
});
}
}
// Core interaction rules
fn interact(net: &mut Net, a: Node, b: Node) {
match (a.tag, b.tag) {
// β-reduction: (λx.body) @ arg → body[x := arg]
(LAM, APP) => {
link(a.body, b.arg);
link(a.var, b.func);
},
// Duplication: Dup @ λ → λ₁, λ₂
(DUP, LAM) => {
let lam1 = new_node(LAM);
let lam2 = new_node(LAM);
// ... wire up
},
// Erasure: Era @ any → nothing
(ERA, _) => {
// Node b is garbage collected
},
// Superposition annihilation
(SUP, SUP) if a.label == b.label => {
link(a.left, b.left);
link(a.right, b.right);
},
// Superposition commutation
(SUP, SUP) => {
// Create 4 new nodes, rewire
},
}
}
Optimal Sharing
Traditional: HVM (Optimal):
f (expensive) f (expensive)
│ │
├───► result1 ┌───┴───┐
│ │ Dup │
└───► result2 └───┬───┘
│
Computes f twice! ├───► result1 (shared!)
└───► result2
Bend Language Examples
# Parallel map (auto-parallelizes)
def pmap(f, xs):
fold xs:
List.nil: List.nil
List.cons: List.cons(f(xs.head), pmap(f, xs.tail))
# Parallel reduce
def sum(xs):
fold xs:
List.nil: 0
List.cons: xs.head + sum(xs.tail)
# GPU-accelerated recursion
def parallel_fib(n):
bend val = 0, i = 0:
when i < n:
left = fork(val + 1, i + 1)
right = fork(val, i + 2)
left + right
else:
val
Performance Characteristics
| Operation | Complexity | GPU Speedup |
|---|---|---|
| β-reduction | O(1) | N/A |
| Duplication | O(size) | 10-100x |
| Parall |
Установить hvm-runtime в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл hvm-runtime?
HVM Runtime Skill
Как установить скилл hvm-runtime?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл hvm-runtime запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic