beyondbabel 0.2.0__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {beyondbabel-0.2.0 → beyondbabel-0.4.0}/PKG-INFO +37 -28
  2. {beyondbabel-0.2.0 → beyondbabel-0.4.0}/README.md +36 -27
  3. beyondbabel-0.4.0/bb.py +8670 -0
  4. {beyondbabel-0.2.0 → beyondbabel-0.4.0}/beyondbabel.egg-info/PKG-INFO +37 -28
  5. beyondbabel-0.4.0/beyondbabel.egg-info/SOURCES.txt +26 -0
  6. {beyondbabel-0.2.0 → beyondbabel-0.4.0}/pyproject.toml +1 -1
  7. beyondbabel-0.4.0/tests/test_compile.py +67 -0
  8. beyondbabel-0.4.0/tests/test_edit_file.py +113 -0
  9. beyondbabel-0.4.0/tests/test_edit_new.py +111 -0
  10. beyondbabel-0.4.0/tests/test_edit_refactor.py +37 -0
  11. beyondbabel-0.4.0/tests/test_import_by_name.py +89 -0
  12. beyondbabel-0.4.0/tests/test_internals.py +1504 -0
  13. beyondbabel-0.4.0/tests/test_lineage_v2.py +324 -0
  14. beyondbabel-0.4.0/tests/test_pool_refs.py +55 -0
  15. beyondbabel-0.4.0/tests/test_positional.py +102 -0
  16. beyondbabel-0.4.0/tests/test_refactor_stale.py +45 -0
  17. beyondbabel-0.4.0/tests/test_restore.py +127 -0
  18. beyondbabel-0.4.0/tests/test_scratchpad.py +175 -0
  19. beyondbabel-0.4.0/tests/test_storage.py +687 -0
  20. beyondbabel-0.4.0/tests/test_translate_file.py +66 -0
  21. beyondbabel-0.4.0/tests/test_translate_tree.py +75 -0
  22. beyondbabel-0.4.0/tests/test_undefined_names.py +53 -0
  23. beyondbabel-0.4.0/tests/test_update.py +100 -0
  24. beyondbabel-0.2.0/bb.py +0 -4988
  25. beyondbabel-0.2.0/beyondbabel.egg-info/SOURCES.txt +0 -11
  26. beyondbabel-0.2.0/tests/test_internals.py +0 -982
  27. beyondbabel-0.2.0/tests/test_storage.py +0 -389
  28. {beyondbabel-0.2.0 → beyondbabel-0.4.0}/beyondbabel.egg-info/dependency_links.txt +0 -0
  29. {beyondbabel-0.2.0 → beyondbabel-0.4.0}/beyondbabel.egg-info/entry_points.txt +0 -0
  30. {beyondbabel-0.2.0 → beyondbabel-0.4.0}/beyondbabel.egg-info/requires.txt +0 -0
  31. {beyondbabel-0.2.0 → beyondbabel-0.4.0}/beyondbabel.egg-info/top_level.txt +0 -0
  32. {beyondbabel-0.2.0 → beyondbabel-0.4.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beyondbabel
3
- Version: 0.2.0
3
+ Version: 0.4.0
4
4
  Summary: A function pool manager for Python that enables multilingual function sharing through AST normalization
5
5
  Author: Amirouche Boubekki
6
6
  License-Expression: MIT
@@ -28,50 +28,53 @@ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
28
28
 
29
29
  ![Tests](https://github.com/amirouche/bb.py/actions/workflows/test.yml/badge.svg)
30
30
 
31
- **Nurturing a society that recognizes diversity as strength through verifiable knowledge sharing.**
31
+ **Diversity as strength, made verifiable.**
32
32
 
33
- > **Experimental**: This is research software under active development.
34
-
35
- 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.
33
+ Write a function in your language; if someone else, human or machine, had the same thought, the hash will show it.
36
34
 
37
- 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.
38
-
39
- Content-addressing gives every function a unique fingerprint. Authorship is preserved. Lineage is traceable. Knowledge is shared without losing track of who made what.
35
+ > **Experimental**: This is research software under active development.
40
36
 
41
- ## Same logic, three languages, one hash
37
+ Convergence is detected, divergence is preserved. When two minds write the same logic, they get the same hash, and no shared language was needed to find each other. When they write different logic, they get different hashes, and both are kept. Nothing is flattened into a single English version.
42
38
 
43
39
  ```python
44
- # English
45
- def calculate_sum(first_number, second_number):
46
- """Calculate the sum of two numbers."""
47
- result = first_number + second_number
48
- return result
40
+ # Français
41
+ def additionner(premier, second):
42
+ """Additionner deux nombres."""
43
+ somme = premier + second
44
+ return somme
49
45
  ```
50
46
 
51
47
  ```python
52
- # Français
53
- def calculer_somme(premier_nombre, deuxieme_nombre):
54
- """Calculer la somme de deux nombres."""
55
- sortie = premier_nombre + deuxieme_nombre
56
- return sortie
48
+ # العربية
49
+ def اجمع(الأول, الثاني):
50
+ """اجمع عددين."""
51
+ الناتج = الأول + الثاني
52
+ return الناتج
57
53
  ```
58
54
 
59
55
  ```python
60
56
  # Español
61
- def calcular_suma(primer_numero, segundo_numero):
62
- """Calcular la suma de dos números."""
63
- resultado = primer_numero + segundo_numero
64
- return resultado
57
+ def sumar(primero, segundo):
58
+ """Sumar dos números."""
59
+ suma = primero + segundo
60
+ return suma
65
61
  ```
66
62
 
67
63
  ```bash
68
- bb init
69
- bb add example_simple.py@eng # → 9f86d0...
70
- bb add example_simple_french.py@fra # → 9f86d0... ← same hash
71
- bb add example_simple_spanish.py@spa # → 9f86d0... ← same hash again
64
+ bb add additionner.py@fra # → one hash
65
+ bb add اجمع.py@ara # → the same hash
66
+ bb add sumar.py@spa # → the same hash again
72
67
  ```
73
68
 
74
- Three languages. One identity. No one translated — they wrote originals.
69
+ Three people, or two people and a model prompted in Arabic. Nobody translated; each wrote an original. The names and the docstring stay in their own language, and the hash is computed from the logic alone.
70
+
71
+ ## Why
72
+
73
+ Students learn to code in English while thinking in their own language, and every name they choose is a thought translated before it is written. Languages in Arabic script also tend to cost more tokens on LLMs for the same meaning, a quiet tax on the people who already pay one.
74
+
75
+ The machine side is the same question seen from outside. When several LLM agents work on one problem, someone has to know whether two of them really agree, or only sound alike. A shared hash is a cheap, honest answer for the case where the logic is identical, and an honest "no" when it is not.
76
+
77
+ The project is early. Exact matching is the foundation; near-matches are still a research question (see `LIMITS.md`).
75
78
 
76
79
  ## What it enables
77
80
 
@@ -108,6 +111,12 @@ uv tool install git+https://github.com/amirouche/bb.py.git
108
111
 
109
112
  Requires Python 3.11+. No runtime dependencies.
110
113
 
114
+ ## About
115
+
116
+ Nurturing a society that recognizes diversity as strength through verifiable knowledge sharing.
117
+
118
+ Content-addressing gives every function a fingerprint. Authorship is preserved. Lineage is traceable. Knowledge is shared without losing track of who made what.
119
+
111
120
  ## Vision
112
121
 
113
122
  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.
@@ -2,50 +2,53 @@
2
2
 
3
3
  ![Tests](https://github.com/amirouche/bb.py/actions/workflows/test.yml/badge.svg)
4
4
 
5
- **Nurturing a society that recognizes diversity as strength through verifiable knowledge sharing.**
5
+ **Diversity as strength, made verifiable.**
6
6
 
7
- > **Experimental**: This is research software under active development.
8
-
9
- 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.
7
+ Write a function in your language; if someone else, human or machine, had the same thought, the hash will show it.
10
8
 
11
- 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.
12
-
13
- Content-addressing gives every function a unique fingerprint. Authorship is preserved. Lineage is traceable. Knowledge is shared without losing track of who made what.
9
+ > **Experimental**: This is research software under active development.
14
10
 
15
- ## Same logic, three languages, one hash
11
+ Convergence is detected, divergence is preserved. When two minds write the same logic, they get the same hash, and no shared language was needed to find each other. When they write different logic, they get different hashes, and both are kept. Nothing is flattened into a single English version.
16
12
 
17
13
  ```python
18
- # English
19
- def calculate_sum(first_number, second_number):
20
- """Calculate the sum of two numbers."""
21
- result = first_number + second_number
22
- return result
14
+ # Français
15
+ def additionner(premier, second):
16
+ """Additionner deux nombres."""
17
+ somme = premier + second
18
+ return somme
23
19
  ```
24
20
 
25
21
  ```python
26
- # Français
27
- def calculer_somme(premier_nombre, deuxieme_nombre):
28
- """Calculer la somme de deux nombres."""
29
- sortie = premier_nombre + deuxieme_nombre
30
- return sortie
22
+ # العربية
23
+ def اجمع(الأول, الثاني):
24
+ """اجمع عددين."""
25
+ الناتج = الأول + الثاني
26
+ return الناتج
31
27
  ```
32
28
 
33
29
  ```python
34
30
  # Español
35
- def calcular_suma(primer_numero, segundo_numero):
36
- """Calcular la suma de dos números."""
37
- resultado = primer_numero + segundo_numero
38
- return resultado
31
+ def sumar(primero, segundo):
32
+ """Sumar dos números."""
33
+ suma = primero + segundo
34
+ return suma
39
35
  ```
40
36
 
41
37
  ```bash
42
- bb init
43
- bb add example_simple.py@eng # → 9f86d0...
44
- bb add example_simple_french.py@fra # → 9f86d0... ← same hash
45
- bb add example_simple_spanish.py@spa # → 9f86d0... ← same hash again
38
+ bb add additionner.py@fra # → one hash
39
+ bb add اجمع.py@ara # → the same hash
40
+ bb add sumar.py@spa # → the same hash again
46
41
  ```
47
42
 
48
- Three languages. One identity. No one translated — they wrote originals.
43
+ Three people, or two people and a model prompted in Arabic. Nobody translated; each wrote an original. The names and the docstring stay in their own language, and the hash is computed from the logic alone.
44
+
45
+ ## Why
46
+
47
+ Students learn to code in English while thinking in their own language, and every name they choose is a thought translated before it is written. Languages in Arabic script also tend to cost more tokens on LLMs for the same meaning, a quiet tax on the people who already pay one.
48
+
49
+ The machine side is the same question seen from outside. When several LLM agents work on one problem, someone has to know whether two of them really agree, or only sound alike. A shared hash is a cheap, honest answer for the case where the logic is identical, and an honest "no" when it is not.
50
+
51
+ The project is early. Exact matching is the foundation; near-matches are still a research question (see `LIMITS.md`).
49
52
 
50
53
  ## What it enables
51
54
 
@@ -82,6 +85,12 @@ uv tool install git+https://github.com/amirouche/bb.py.git
82
85
 
83
86
  Requires Python 3.11+. No runtime dependencies.
84
87
 
88
+ ## About
89
+
90
+ Nurturing a society that recognizes diversity as strength through verifiable knowledge sharing.
91
+
92
+ Content-addressing gives every function a fingerprint. Authorship is preserved. Lineage is traceable. Knowledge is shared without losing track of who made what.
93
+
85
94
  ## Vision
86
95
 
87
96
  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.