Skip to main content

bb.py

Tests

Nurturing a society that recognizes diversity as strength through verifiable knowledge sharing.

Experimental: This is research software under active development.

Every programmer who thinks in Wolof, Tamil, Vietnamese, or Tamazight and codes in English pays a cognitive tax. Every variable named in a second language is a thought translated before it's expressed. This overhead is invisible to the people who don't pay it — and universal for everyone who does.

bb.py makes that tax optional. Write functions in your language — name variables, write documentation, think natively. The tool separates what your code does from what you called things. Same logic, same hash, regardless of tongue.

Content-addressing gives every function a unique fingerprint. Authorship is preserved. Lineage is traceable. Knowledge is shared without losing track of who made what.

Same logic, three languages, one hash

# English
def calculate_sum(first_number, second_number):
    """Calculate the sum of two numbers."""
    result = first_number + second_number
    return result
# Français
def calculer_somme(premier_nombre, deuxieme_nombre):
    """Calculer la somme de deux nombres."""
    sortie = premier_nombre + deuxieme_nombre
    return sortie
# Español
def calcular_suma(primer_numero, segundo_numero):
    """Calcular la suma de dos números."""
    resultado = primer_numero + segundo_numero
    return resultado
bb init
bb add example_simple.py@eng      # → 9f86d0...
bb add example_simple_french.py@fra   # → 9f86d0...  ← same hash
bb add example_simple_spanish.py@spa  # → 9f86d0...  ← same hash again

Three languages. One identity. No one translated — they wrote originals.

What it enables

bb.py is a tool for sharing content-addressed knowledge that is verifiable, maintainable, and preserves authorship and lineage.

  • Think in your language — variable names and documentation in your native tongue, without penalty
  • Share across languages — retrieve any function in any language with bb show hash@lang
  • Verify identity — same logic always produces the same hash, no matter who wrote it or in what language
  • Preserve lineage — every function is traceable; who made what, who built on whom
  • Compose and build — functions import other pool functions; dependencies are tracked, compiled, and runnable
  • Single file, zero dependencies — the entire tool is one Python file

How it works

Source code → Parse to AST → Normalize → Hash → Store

Normalization renames all local variables to a canonical form, sorts imports, and strips docstrings before hashing. Built-in names and imports are never renamed. The result: any function with the same logical structure produces the same SHA-256 hash, regardless of the names chosen by the author.

The original names, docstrings, and language metadata are stored alongside the hash — one mapping per language. This separates identity (the logic) from presentation (the language).

Exact matching is the foundation — the clean case where two people write the same logic independently and the hash proves it. For the realistic case where two people solve the same problem differently, semantic search surfaces near-matches: similar structure, different choices. Convergence isn't forced. It's discovered. The hash is the meeting point — independent teams who solve the same problem find each other through identity, not coordination.

Install

# Using pip
pip install git+https://github.com/amirouche/bb.py.git

# Using uv
uv tool install git+https://github.com/amirouche/bb.py.git

Requires Python 3.11+. No runtime dependencies.

Vision

bb.py is a step toward Möbius — a content-addressed language where timestamps make lineage visible, and names are views into a multilingual registry. Who made what, who built on whom, who absorbed whose work without credit. The mirror doesn't prescribe norms or enforce justice. It refuses amnesia.

Related Work

  • Unison — content-addressable code where the hash is the identity
  • Abstract Wikipedia — multilingual knowledge representation that separates meaning from language
  • Situational application — local, contextual solutions (also known as Situated Software)
  • Non-English-based programming languages — Wikipedia overview
  • Content-addressed storage — Git, IPFS, Nix
  • Multilingual programming — Racket's #lang system, Babylonian programming

See Also

  • transcripts/ — walkthrough sessions showing Beyond Babel in action
  • LIMITS.md — known limitations and research questions

"The limits of my language mean the limits of my world." — Ludwig Wittgenstein

Metadata

Release files for beyondbabel 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beyondbabel 0.2.0
File Size Uploaded Provenance
beyondbabel-0.2.0.tar.gz 50.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for beyondbabel 0.2.0
File Interpreter ABI Platform
beyondbabel-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 90.6 kB

Release files / beyondbabel-0.2.0.tar.gz

Download URL beyondbabel-0.2.0.tar.gz
Size 50.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dfdc7aeadf7aada9c9f5b6cb66399804158c61007ead3ae376004f1fbb0031df
BLAKE2b-256 checksum
How to use checksums
af55405b4e8ed58359fb5195ed5f158f95be0d13ef63b05e50915810fcc8a530
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / beyondbabel-0.2.0-py3-none-any.whl

Download URL beyondbabel-0.2.0-py3-none-any.whl
Size 40.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f25ae45b86ea9abc5738951abbe00f5bf2bfc00658be9ac6b3af17841a22eb0
BLAKE2b-256 checksum
How to use checksums
bd693badaf8f38ff0b995006123e6812ebaea9a1b3be24c9678e2c878f4746c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for beyondbabel 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page