J++

September 20, 2026 · View on GitHub

J++ — compose questions and methods

Compose questions. Compose methods. Compose the compositions.

简体中文 · Why J++ · Progress · Language design & grammar · Contributing

J++ is an experimental programming-language project exploring semantic judgment as a programmable operation. Questions are values. Methods are values. A composed method can become a building block in another method.

Write standalone .jpp source and run it with the native Rust implementation. It parses source, checks language rules and executes methods through one shared kernel. The earlier Python 3.12 embedded implementation remains available as a behavior reference and experiment tool. Rust package and examples · Language implementation decision.

Why we are doing this

We are drawn to a familiar power of algorithms: a few simple operations, organized well, can accomplish something surprisingly complex. JEV led us to ask what happens when semantic judgment joins those operations, alongside exact computation, search and feedback.

Our intuition is that questions and solving methods should be reusable values. A program should be able to construct its next question, accept a method as an argument, and return a method that another program can use. The resulting composition should remain a building block.

We do not yet know every application this will enable. We want others to construct methods we did not anticipate. Working components and executable examples let experience shape the language. Read the project origin and design motivation.

Our first application question comes from Towow: can a fuzzy intent meet different participants' local contexts to produce new cooperation possibilities, with ongoing results and candidate combinations participating in further discovery? Read the research proposal (中文).

The first application is the Towow discovery lab. Explore 216 participants and 20 intents, inspect profiles and compare a semantic-plus-lexical method against BM25, or disable referral/composition in the ten-person experiment. Both pages execute the current J++ Python sources in the browser using published real JEV response recordings. Animated explanation · Measurements and reproduction (中文).

The 325-profile real-source comparison evaluates seven retrieval/judgment compositions against 963 historical proxy relation labels. Inspect individual candidates, regressions, exact response recordings and offline reproduction. Results and evaluation scope (中文).

Discovery roadmap (中文) records candidate-pool bottlenecks, reusable Towow research assets and the next bounded experiment. Its offline diagnostic script requires no model calls.

The composable discovery application runs different task plans through the same J++ composition and feeds a two-member proposal back in to nominate a third member. Its API accepts replaceable questions, routing and combination functions. Three synthetic live examples, exact replay and the unsuccessful fixed-slot exploration control are documented in the iteration report; this is a bounded application component, not a delivered distributed discovery network.

Run standalone J++

git clone https://github.com/towow-ai/jpp.git
cd jpp/rust
cargo build --locked --workspace
cargo run -p jpp-cli -- run examples/composition.jpp
cargo run -p jpp-cli -- run examples/adaptive.jpp --fixtures examples/fixtures/adaptive.json
cargo run -p jpp-cli -- run examples/partial.jpp --fixtures examples/fixtures/partial.json

The three programs compose methods, locate 731 among 1,000 candidates in ten questions, and improve a usable cost-9 candidate combination to cost 2 by changing the continuation strategy. The source contains the algorithms; the CLI supplies fixed observations and a local recording action. No model API is called. Grammar · Source and direct-core equivalence.

Building needs Rust; the installed native executable runs without Python or Cargo. Use the explicit executable path if the retained Python jpp command is also installed.

The native delivery passed 41 Rust tests and GitHub's Rust/Python checks. Next steps: reusable source-library methods, consistent composition rules and an application using standalone source.

Run the retained Python reference

git clone https://github.com/towow-ai/jpp.git
cd jpp
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'
jpp demo
jpp methods --output method-report.json
python -m pytest -q

Windows: activate with .venv\Scripts\activate instead.

The methods command runs complete dynamically constructed methods and saves their plan, generated structures and execution results. You can also install the built wheel without a source checkout. Write your own methods and inspect a run.

The demo runs offline with no API key or API charges. It identifies a target among 1,000 candidates using at most 10 adaptive binary questions, then constructs an expression using counterexamples and checks all nine declared inputs. The answers are synthetic and the generator is finite enumeration: this demonstrates the execution and composition mechanisms, not real-model accuracy or a new search algorithm.

A method stays a method

from jev_compose import component, execute
from jev_compose.fixtures import runtime

@component("length", str, int)
def length(text):
    return len(text)

@component("double", int, int)
def double(n):
    return n * 2

method = length.then(double)
assert execute(method, "hello", runtime()).value == 10

The same interface supports methods that ask questions, choose subsequent methods, or iterate over feedback. inquire(...) and feedback(...) are themselves composition constructors; their strategies can be replaced without changing the runtime.

What is in the retained Python implementation

LayerCurrent implementation
QuestionsTest, selection, and measurement; save and restore question values
CompositionSequential composition, branches, products, dynamic method selection, bounded iteration
AlgorithmsAdaptive inquiry and candidate/check/counterexample feedback
UncertaintyExplicit unresolved observations and conditional count bounds
RuntimeMaterials, judgment effects, generation/action hooks, budgets, records and replay
DistributionInstallable Python package, offline CLI demonstration and tests

src/foundation contains the runtime; src/jev_compose contains the composition layer; src/jpp provides the distribution entry point. Existing import names remain available while the language design develops.

This is an early alpha. APIs may change. Real-model quality requires separate evaluation; the default demo never contacts JEV. See current scope and backend notes.

Help shape the language

Standalone syntax and Rust execution are delivered. Current work is to resolve correctness findings from review, make source methods reusable, clarify composition rules and extend measured backend evaluation. The Towow examples include published live-backend recordings on the retained Python path. Dated progress report · Roadmap.

The most useful contribution is a new method built from existing components, together with an example that runs. Tell us where composition becomes awkward, what you had to duplicate, and which primitive would eliminate that duplication. Start here.

MIT licensed. J++ is an independent project, not an official JEV/TypeSafe product, and is unrelated to Microsoft's historical Visual J++.