Skip to content

Releases: SanTiepi/benoit

v0.8.0 — The language where code is proof

11 Apr 20:58

Choose a tag to compare

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 interpreterrun_ben.mjs runs .ben files directly. Zero eval(), zero new Function(). Pratt parser + tree-walking evaluator.
  • Self-programming machineevolve.mjs discovers 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 benoit

Try 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 code

Full 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

08 Mar 09:31

Choose a tag to compare

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 Solvingadd(?, 3) == 5 → finds unknown inputs by brute force.

Language Features

  • Else/elif conditionalscond? -> / else? -> chains with implicit return
  • Local module importsuse ./math.add, subtract → ES module imports
  • String interpolation"Hello {name}" → template literals
  • Interactive REPLbenoit repl
  • Watch modebenoit watch file.ben
  • Structured errorsBenoitError with line/column/source and pretty formatting
  • VS Code extension — TextMate grammar for .ben syntax 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 protocol

Named 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

08 Mar 07:55

Choose a tag to compare

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 assertionsadd(2,3) == 5 right 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 benoit

Quick Start

Create hello.ben:

greet name -> "Hello, " + name + "!"
greet("World") == "Hello, World!"

Run:

benoit check hello.ben

What's in the box

  • src/transpile.mjs — the transpiler
  • src/tokenizer.mjs — token analysis
  • bin/benoit.mjs — CLI tool
  • examples/ — showcase files
  • SPEC.md — full language specification
  • 46 tests passing

MIT License — Robin Fragnière