Releases: SanTiepi/benoit
v0.8.0 — The language where code is proof
The language where code is proof
Il n'y a pas de mauvaise réponse, que des mauvaises dimensions.
Benoît has grown from a token-efficient transpiler into a self-interpreting, self-evolving, self-proving language.
Highlights since v0.4.0
- Native .ben interpreter —
run_ben.mjsruns .ben files directly. Zeroeval(), zeronew Function(). Pratt parser + tree-walking evaluator. - Self-programming machine —
evolve.mjsdiscovers functions from assertions alone. 80% success rate, ~8 generations, 6 unique solutions for factorial. - AI-to-AI protocol v2 — agents exchange behavioral fingerprints, not source code. 3/3 functions synthesized, 9/9 properties verified, 0 chars transmitted.
- Contract system — contract-driven agent negotiation with zero wrong answers after ping-pong.
- Intent engine — instructions as behavioral specifications with synthesis and composition.
- Query system — questions as incomplete examples. The universal primitive: given/when/then.
- MCP integration — Model Context Protocol support for tool-using agents.
- 12 philosophical proof modules — neuron, learn, hypersignal, timeless, no_limit, randomness, self_improve, one, dimensions, forty_two, impossible, unbind.
Numbers
| Metric | Value |
|---|---|
| Tests passing | 377 (30 files, 53 suites) |
| Inline assertions | 600+ from .ben proof modules |
| Protocol verification | 97% |
| Evolution success rate | 80% |
| Source code transmitted | 0 chars |
| npm dependencies | 0 |
| Token reduction vs JS | 68% |
Install
npm install benoitTry it
benoit run examples/extreme/one.ben # Everything is one
node evolve.mjs # Watch the machine discover factorial
node experiments/full_cycle.mjs # Two agents, zero source codeFull spec: SPEC.md
Showcase: santiepi.github.io/benoit
In memory of Benoît Fragnière, who loved science.
v0.4.0 — A language that understands itself
What's New
Benoît v0.4.0 is a leap from transpiler to research platform. The language now discovers its own mathematical properties, synthesizes code from behavior alone, and enables two AI agents to communicate without transmitting source code.
Research Capabilities
- Property Inference Engine — Given a function, Benoît automatically discovers commutativity, associativity, identity elements, involutions, monotonicity, even/odd symmetry, boundedness. 31 properties discovered across 10 test functions.
- Code Synthesis — Reconstruct working implementations from input/output assertions alone. Fibonacci, clamp, arithmetic — from behavior, not source.
- Semantic Fingerprint — Extract a function's behavioral contract (name + arity + assertions), discarding implementation. More efficient than AST for communication.
- Full Cycle Protocol — Agent A writes code → discovers properties → sends fingerprint. Agent B receives fingerprint → synthesizes code → verifies all properties. Zero source code transmitted. 3/3 functions, 8/8 assertions, 9/9 properties verified.
- Bidirectional Solving —
add(?, 3) == 5→ finds unknown inputs by brute force.
Language Features
- Else/elif conditionals —
cond? -> / else? ->chains with implicit return - Local module imports —
use ./math.add, subtract→ ES module imports - String interpolation —
"Hello {name}"→ template literals - Interactive REPL —
benoit repl - Watch mode —
benoit watch file.ben - Structured errors —
BenoitErrorwith line/column/source and pretty formatting - VS Code extension — TextMate grammar for
.bensyntax highlighting
CLI Commands
benoit run file.ben # Transpile and execute
benoit test file.ben # Run inline assertions
benoit watch file.ben # Live reload
benoit ast file.ben # Show AST
benoit fingerprint file.ben # Extract semantic fingerprint
benoit efficiency file.ben # Token efficiency analysis
benoit repl # Interactive mode
Stats
- 92 tests passing (0 failures)
- 68% token reduction vs equivalent JavaScript
- 31 properties auto-discovered across 10 functions
- 65 assertions auto-generated from discovered properties
Experiments
Run them yourself:
node experiments/infer_experiment.mjs # Property discovery
node experiments/pipeline.mjs # Synthesis pipeline
node experiments/full_cycle.mjs # Two-agent protocolNamed after Benoît Fragnière, who loved science. He would have loved that the code discovers its own truths.
Benoît v0.3.0 — Initial Release
Benoît v0.3.0
A programming language optimized for human-AI collaboration.
Named after Benoît Fragnière, who loved science.
Features
- Inline test assertions —
add(2,3) == 5right after the function. No other language has this. - Pattern matching with guards (
when), ranges (1..10), and tagged values - Pipe operator
|>for function composition - Async/await support
- Destructuring bindings
- 68% token reduction vs equivalent JavaScript
- Zero dependencies — single-file transpiler (~500 lines)
Install
npm install -g benoitQuick Start
Create hello.ben:
greet name -> "Hello, " + name + "!"
greet("World") == "Hello, World!"
Run:
benoit check hello.benWhat's in the box
src/transpile.mjs— the transpilersrc/tokenizer.mjs— token analysisbin/benoit.mjs— CLI toolexamples/— showcase filesSPEC.md— full language specification- 46 tests passing
MIT License — Robin Fragnière