@yuntiandeng: Totally agree. Replaced the regex with ProgramAsWeights (and it actually works): import programasweights as paw fn = pa…

X AI KOLs Following Tools

Summary

A tweet endorsing ProgramAsWeights as a working replacement for regex, demonstrating an email validation function compiled from natural language.

Totally agree. Replaced the regex with ProgramAsWeights (and it actually works): import programasweights as paw fn = paw.compile_and_load("check whether a string looks like a valid email address") fn("[email protected]") # "valid" fn("abc@def") # "invalid"
Original Article
View Cached Full Text

Cached at: 08/06/26, 02:44 PM

Totally agree. Replaced the regex with ProgramAsWeights (and it actually works):

import programasweights as paw

fn = paw.compile_and_load(“check whether a string looks like a valid email address”)

fn(“[email protected]”) # “valid” fn(“abc@def”) # “invalid”

Similar Articles

Program-as-Weights: A Programming Paradigm for Fuzzy Functions

Hugging Face Daily Papers

Program-as-Weights (PAW) introduces a programming paradigm where a 4B compiler translates natural-language specifications into compact neural artifacts executable by a 0.6B interpreter, achieving performance comparable to 32B models with drastically lower memory and inference cost.