Skip to content

Instantly share code, notes, and snippets.

@evacchi
evacchi / ssa-interpreter-assessment.md
Created March 25, 2026 20:46
Assessment: Reimplementing wazero interpreter on wazevo's SSA

Assessment: Reimplementing the Interpreter on Wazevo's SSA

What exists today

Current interpreter (~11k lines of non-test code in internal/engine/interpreter/):

  • Compiles Wasm bytecode into a flat array of unionOperation instructions (a custom IR)
  • Executes via a giant switch statement in callNativeFunc() over 82+ operation kinds
  • Uses a uint64 value stack and a call frame stack
  • Control flow is resolved to absolute PC addresses at compile time
  • Two-pass compilation: first translates opcodes, then resolves label addresses
@evacchi
evacchi / blockkit-gemma3-1b-theme-category-finetune.ipynb
Created October 8, 2025 13:01
Fine-tune Gemma-3 1B for Theme+Category Block Kit Sections (6k dataset)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@evacchi
evacchi / blockkit-gemma3-270m-theme-category-finetune.ipynb
Last active October 8, 2025 07:36
Fine-tune Gemma-3 270M for Theme+Category Block Kit Sections (6k dataset)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@evacchi
evacchi / blockkit-gemma3-1b-single-block-finetune.ipynb
Last active October 7, 2025 18:52
Fine-tune Gemma-3 1B for Single Block Kit Blocks (5k dataset)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@evacchi
evacchi / blockkit-gemma3-single-block-finetune.ipynb
Last active October 7, 2025 16:31
Fine-tune Gemma-3 270M for Single Block Kit Blocks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@evacchi
evacchi / MODEL_COMPARISON.md
Last active October 7, 2025 15:44
Fine-tune Gemma-3 1B for Block Kit UI Generation
const std = @import("std");
const json = std.json;
pub const ContentType = enum {
text,
image,
resource,
};
pub const CallToolResult = struct {
@evacchi
evacchi / drools.java
Created June 28, 2021 09:50
jbang drools.java (improved)
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 16
//REPOS jitpack=https://jitpack.io/
//DEPS com.github.evacchi:drools-jbang-starter:main-SNAPSHOT
// example
// jbang <url> '{ "name":"Mario", "age":40 }' '{ "name":"Mark", "age":37 }'
package org.kie.example;
@evacchi
evacchi / drools.java
Created June 26, 2021 12:24
jbang drools.java
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS org.drools:drools-engine:7.56.0.Final
//DEPS org.drools:drools-mvel:7.56.0.Final
//DEPS org.drools:drools-mvel:7.56.0.Final
//DEPS org.slf4j:slf4j-nop:1.7.31
//DEPS com.fasterxml.jackson.core:jackson-databind:2.12.3
// example
// jbang <url> '{ "name":"Mario", "age":40 }' '{ "name":"Mark", "age":37 }'
@evacchi
evacchi / my-process.bpmn
Created March 5, 2021 08:25
my-process.bpmn
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpsim="http://www.bpsim.org/schemas/1.0" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" id="_P72zYV-6EDmrSITuK2tOlw" exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20">
<bpmn2:itemDefinition id="_nameItem" structureRef="String"/>
<bpmn2:itemDefinition id="_ageItem" structureRef="Integer"/>
<bpmn2:process id="my-process" drools:packageName="com.example" drools:version="1.0" drools:adHoc="false" name="my-process" isExecutable="true" processType="Public">
<bpmn2:property id="name" itemSubjectRef="_nameItem" name="name"/>
<bpmn2:property id="age" itemSubjectRef="_ageItem" name="age"/>
<bpmn2:sequenceFlow id="_A627D26C-DD92-4175-8372-77E98C7E4BD7" sourceRef="_BB7258FB-435F-447F-B52D-54D78D00F8D4" targetRef="_23D28193-C2