You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Philosophy:** Quality over quantity. Curate with taste.
4
+
**Philosophy:** Quality over quantity. Verify against reality. Curate with taste.
5
5
6
6
---
7
7
8
-
## Project Overview
8
+
## Vision
9
9
10
-
Locutus is a JavaScript library that ports standard library functions from PHP, Go, Python, Ruby, and C. The project has **373+ functions** (primarily PHP), focusing on complex implementations that provide real value beyond native JavaScript.
10
+
Locutus is **the** reference implementation for cross-language standard library functions in JavaScript. Every function should be:
11
11
12
-
### Current Status
13
-
-**Tests:** 910 passing
14
-
-**Linting:** Biome (migrated from ESLint + Prettier)
15
-
-**Build:** Babel 6 (legacy, migration planned)
16
-
-**Package Manager:** Yarn 4.12.0
12
+
1.**Verified** - Tested against actual language runtimes (not just JS unit tests)
13
+
2.**Documented** - Clear examples, edge cases, and differences from native
14
+
3.**Typed** - Full TypeScript definitions
15
+
4.**Modern** - ESM, tree-shakeable, zero dependencies
**Goal:** Best-in-class coverage for target languages.
28
74
29
-
**Status:** This code has LGPL copyleft implications. Users of locutus who include these BC math functions may need to comply with LGPL requirements for that portion of their codebase.
-**LGPL-2.1** - `src/php/_helpers/_bc.js` and `src/php/bc/*`
94
184
95
-
### Before Adding a Function, Ask:
96
-
1. Does this provide value beyond native JS?
97
-
2. Is the implementation non-trivial?
98
-
3. Have you verified against actual PHP/Go/Python?
185
+
See [LICENSE](../LICENSE) for details.
99
186
100
187
---
101
188
102
-
## Changelog
189
+
## Open Items
103
190
104
-
### 2026-01-06 - Biome Migration
105
-
- Migrated from ESLint + Prettier to Biome
106
-
- Removed 12 ESLint/Prettier dependencies
107
-
- Fixed variable scoping issues in 6 files after auto-fix
108
-
- Added `yarn check` command for quick validation
109
-
110
-
### 2026-01-06 - Initial Setup
111
-
- Fixed 5 failing tests
112
-
- Expanded Go, Python, Ruby, C coverage
113
-
- Created TypeScript definitions
114
-
- Updated yarn to 4.12.0
115
-
- Added knip for unused code detection
191
+
### PR #477 - composer.json
192
+
Status: Open, needs clarification
193
+
194
+
### Issue #473 - LGPL
195
+
Status: **Resolved** - Documented in LICENSE, README, source files
116
196
117
197
---
118
198
119
199
## Lessons Learned
120
200
121
-
1.**Biome's unsafe fixes can break code** - Variable declarations with multiple variables (`let i, j = 0`) get split incorrectly. Always run tests after auto-fix.
201
+
1.**Verify against reality** - Unit tests aren't enough. Run actual PHP/Go/Python.
122
202
123
-
2.**Keep one plan document** - Don't create multiple strategy docs. Revise this one.
203
+
2.**Don't duplicate infrastructure** - Check `src/_util/` before creating new tools.
124
204
125
-
3.**Merge before adding more** - Get changes merged before piling on more work.
205
+
3.**Document in the right place** - LICENSE, README, SPDX headers. Not just issues.
126
206
127
-
4.**Clean up thoroughly** - After migrations, remove ALL traces (including suppression comments).
207
+
4.**Biome unsafe fixes break code** - Always test after auto-fix.
128
208
129
-
5.**eval() is sometimes necessary** - For PHP function ports like `json_decode`, `create_function`, `is_callable`, eval is legitimately needed. Suppress the warning with a comment explaining why.
209
+
5.**eval() is sometimes necessary** - Suppress with explanation, don't fight it.
130
210
131
-
6.**Document licensing in the right places** - Don't just comment on issues. Update LICENSE, README, and add SPDX headers to affected files.
211
+
6.**Keep one plan** - Revise this document, don't create new ones.
132
212
133
-
7.**Don't duplicate existing infrastructure** - Check src/_util/ before creating new scripts. The test generation and parsing utilities already exist.
213
+
7.**Merge often** - Small PRs, fast iteration.
134
214
135
215
---
136
216
137
-
## Open Items
217
+
## Changelog
138
218
139
-
### PR #477 - composer.json
140
-
Status: Open, awaiting clarification on use case
219
+
### 2026-01-06 - Cross-Language Verification
220
+
- Created `scripts/verify.ts` with Docker support
221
+
- Content-based caching for fast re-runs
222
+
- Native TypeScript (Node 25+)
223
+
224
+
### 2026-01-06 - LGPL Documentation
225
+
- Added LGPL exception to LICENSE
226
+
- Added License section to README
227
+
- Added SPDX headers to `_bc.js`
141
228
142
-
### Issue #473 - LGPL in _bc.js
143
-
Status: **Resolved.** LGPL licensing now documented in LICENSE, README, and _bc.js header.
0 commit comments