Jacquard is a FriendMachine research project for running, reviewing, simulating,
and trusting programs written by models and reviewed by people. Start with the
human-friendly introduction to Jacquard.
Concretely, it is a small programming language where every function signature
lists the outside-world effects the function may perform — network, files,
clock, randomness — and the runtime refuses any effect you have not granted
on the command line. A reviewer reads the signature to learn what a change
can touch; the checker guarantees the signature is complete. The
implementation is an OCaml checker and interpreter, a compiler that accepts
public .jac or lower-level .jqd files and produces standalone native
binaries by emitting C, the jac command-line tool, a standard library written
in Jacquard itself, and a test framework called Warp. Version 0.1 works end to
end but is a research prototype, not a production language;
docs/release/0.1/LIMITS.md is the honest boundary.
इससे जुड़ी जानकारी
Install the 0.1 release candidate without OCaml or opam:
curl -fsSL https://raw.githubusercontent.com/jbwinters/jacquard-lang/jacquard-core-0.1-rc3/scripts/install.sh | sh
~/.local/bin/jac run ~/.local/share/jacquard/demos/basics/m1-fact.jacThe expected output is 120. Linux x86-64, macOS Intel, and macOS Apple
Silicon binaries are published; development from source is documented below.
Then run one policy under concrete and probabilistic telemetry worlds, followed
by sampled and exhaustive Warp checks:
sh ~/.local/share/jacquard/demos/case-studies/release-risk/run.shMost languages tell you what a program computes. Jacquard also exposes which
effects it may perform, finite discrete uncertainty, and canonical program
identity. Tools can inspect all three because they live in the language rather
than only in comments, logs, or your memory of the codebase.
Things you can do here that most languages cannot offer:
- Read one line and see the effects a function may perform. A signature like
(text) ->{net} textsays the function may perform theneteffect. The
Jacquard runtime rejects unhandled world effects unless their authority is
explicitly granted with--allow, including effects performed by dynamic
code. This is language-level enforcement in a research runtime, not a
substitute for an operating-system sandbox. - Run one program against many worlds. The same code can run against the real
network, a scripted fake, a recording of last week’s traffic, or a
probability model of how servers usually behave. A handler is the piece
that answers a program’s requests to the outside world; you swap the
handler, and the code never changes. This can replace much conventional
mocking at effect boundaries and makes “what would my agent do if the API
went down?” an ordinary test. If this sounds like dependency injection: an
injected dependency is the special case of a handler that resumes the
program exactly once. A handler can also decline to resume, aborting the
rest of the computation cleanly, or resume many times, forking the rest of
the program to explore every outcome. That last case is what makes
exhaustive testing and exact inference ordinary library code here. - Enumerate exact probabilities for finite discrete models. A program can
sample weighted choices and record evidence, and enumeration lists every
reachable outcome with its exact probability. The repair demo below treats a
failing test as evidence and computes which patches remain possible and how
likely each is. - Rename and reformat without changing canonical identity. Jacquard hashes
canonical resolved structure rather than source bytes. Comments, formatting,
provenance, and ordinary local or term renames are erased; pure tests rerun
only when canonical code or dependency content changes. This is structural
identity, not a proof that arbitrary programs are behaviorally equivalent.
The bet behind all of this: when most code is written by machines, the humans
reviewing it need the language itself to answer “what can this touch, and how
sure are we” without reading every line.
Suppose a model hands you this one-line change in Python:
def normalize_name(name):
return lookup_alias(name).strip().lower()To learn whether the change can reach the network, you read lookup_alias,
then everything it calls. The answer lives in the transitive closure of the
diff, and nothing checks whatever answer you settle on.
The same change in Jacquard arrives with this checked signature:
normalize-name : (text) ->{net} text
Some function below lookup-alias performs a net operation, so net
surfaces in the row of every caller until a handler discharges it. The
checker computes the row; a signature that omits an effect is a type error.
The reviewer’s first question about generated code — what can this touch —
is answered on the first line of the diff, before reading any body. At run
time the same row is enforced: jac run refuses the program without
--allow net, and that includes effects performed by dynamically loaded
code.
Effect rows are also what separates this from an ordinary type system: they
propagate through the call graph without hand annotation, and they are tied
to runtime authority. Ordinary types describe the values a function handles;
the row describes what running it may do to the world, and the runtime holds
it to that.
Read docs/SKILL.md first. It compresses the kernel, the CLI, the prelude,
Warp testing, and the known gotchas into one file, and it loads as a project
skill from docs/SKILL.md. The language is deliberately small enough that an
agent with no Jacquard in its training data can work from that one file.
Operating rules are in AGENTS.md. What will save you time:
- Behavior is pinned by evidence: cram transcripts under
test/cli/, corpus
goldens, demo scripts, anddocs/release/0.1/CLAIMS.md. If a pin fails,
treat it as information about your change, and never weaken a pin to make a
diff pass. - The kernel is 27 forms (
docs/ast.md);.jacis a projection onto those
forms, and bootstrap.jqdremains permanently supported. Treat the shipped
surface boundary and its parked follow-ups as release evidence, not as a
frozen grammar; do not add out-of-scope features (AGENTS.mdlists them). - The development gate is
dune build @all && dune runtest && dune fm...
Leave a Reply