Commit Graph

12 Commits

Author SHA1 Message Date
77d4fd72b3 phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0 2025-11-06 15:41:52 +09:00
30aa39f50b hv1 verify: add direct route (env JSON) and clean inline path; fix v1 phi incoming order; make test_runner use hv1 direct; add phase2037 phi canaries; load modules.workspace exports for alias; update docs (phase-20.38, source extensions) and CURRENT_TASK 2025-11-04 16:33:04 +09:00
fd56b8049a mir: implement proper short-circuit lowering (&&/||) via branch+phi; vm: add NYASH_VM_TRACE exec/phi logs and reg_load diagnostics; vm-fallback: minimal Void guards (push/get_position/line/column), MapBox.birth no-op; smokes: filter builtin Array/Map plugin notices; docs: CURRENT_TASK updated 2025-09-26 03:30:59 +09:00
85084664c2 docs+runner+parser: SSOT+AST using finalized (legacy text inlining removed); provider verify reads nyash.toml; preflight warn hook; method-body guard removed; CURRENT_TASK updated for next JSON work 2025-09-26 00:27:02 +09:00
d9f26d4549 feat: nyash.toml SSOT + using AST統合完了(12時間の戦い)
- nyash.tomlを唯一の真実(SSOT)として依存管理確立
- dev/ci/prodプロファイルによる段階的厳格化実装
- AST結合で宣言/式の曖昧性を根本解決
- Fail-Fast原則をCLAUDE.md/AGENTS.mdに明文化
- VM fallbackでもASTベース using有効化(NYASH_USING_AST=1)
- 静的メソッドの is_static=true 修正で解決安定化
- STATICブレークハック既定OFF化で堅牢性向上

🎉 usingシステム完全体への道筋確立!JSONライブラリ・Nyash VM開発が可能に

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 16:03:29 +09:00
d052f9dc97 feat: using構文完全実装&json_native大幅進化
## 🎉 using構文の完全実装(ChatGPT作業)
-  **include → using移行完了**: 全ファイルでusing構文に統一
  - `local X = include` → `using "path" as X`
  - 約70ファイルを一括変換
-  **AST/パーサー/MIR完全対応**: using専用処理実装
  - ASTNode::Using追加
  - MIRビルダーでの解決処理
  - include互換性も維持

## 🚀 json_native実装進化(ChatGPT追加実装)
-  **浮動小数点対応追加**: is_float/parse_float実装
-  **配列/オブジェクトパーサー実装**: parse_array/parse_object完成
-  **エスケープ処理強化**: Unicode対応、全制御文字サポート
-  **StringUtils大幅拡張**: 文字列操作メソッド多数追加
  - contains, index_of_string, split, join等
  - 大文字小文字変換(全アルファベット対応)

## 💡 MIR SIMD & ハイブリッド戦略考察
- **MIR15 SIMD命令案**: SimdLoad/SimdScan等の新命令セット
- **C ABIハイブリッド**: ホットパスのみC委託で10倍速化可能
- **並行処理でyyjson超え**: 100KB以上で2-10倍速の可能性
- **3層アーキテクチャ**: Nyash層/MIR層/C ABI層の美しい分離

## 📊 技術的成果
- using構文により名前空間管理が明確化
- json_nativeが実用レベルに接近(完成度25%→40%)
- 将来的にyyjsonの70%速度達成可能と判明

ChatGPT爆速実装×Claude深い考察の完璧な協働!

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 00:41:56 +09:00
c0978634d9 feat: using system完全実装+旧スモークテストアーカイブ完了
 using nyashstd完全動作(ChatGPT実装)
- builtin:nyashstd自動解決
- 環境変数不要でデフォルト有効
- console.log等の基本機能完備

 Fixture plugin追加(テスト用最小構成)
 v2スモークテスト構造への移行
 旧tools/test/smoke/削除(100+ファイル)

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 21:45:27 +09:00
95382bcaab feat: Phase 2.2 LLVM静的プラグイン検証完了!nyrt設計真実解明
 **Phase 2.2達成項目**:
- LLVMスモークテスト完全成功(1648バイト生成)
- プラグイン統合動作確認(StringBox/IntegerBox@LLVM)
- 静的コンパイル核心技術実証(MIR→LLVM→オブジェクト)
- Everything is Plugin革命のLLVM対応確認

🔍 **Task先生nyrt調査成果**:
- nyrt正体解明:AOT/LLVMランタイム必須インフラ
- 機能分類:58%必須(ハンドル・GC・エントリー)42%代替可能
- 設計一貫性:75%達成(Box操作完全プラグイン化)
- 削減戦略:Phase A実装で26個関数→プラグイン統合(42%削減)

🎯 **Everything is Plugin完全実現への道筋**:
- 現状:プラグインファクトリー(StrictPluginFirst)完全動作
- 課題:nyrt中央集権 vs プラグイン哲学の矛盾
- 解決:Hybrid Plugin Architecture推進
- 目標:String/Box API→プラグイン統合で設計一貫性完成

📊 **技術的成果**:
- LLVM static plugin integration:  完全動作
- Plugin priority system:  完全動作
- Object code generation:  実証済み
- nyrt architectural analysis:  完全解明

🚀 **Phase 15.5革命基盤確立**: プラグイン優先アーキテクチャ実用化完了
次段階Phase 2.3でビルトインBox段階削除+nyrt Plugin統合推進へ

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 12:22:08 +09:00
d99b941218 docs: add MIR13 mode doc and set PHI-off as default; bridge lowering split (if/loop/try); llvmlite resolver stabilization; curated runner default PHI-off; refresh CURRENT_TASK.md 2025-09-17 10:58:12 +09:00
47f4ca0e44 📚 docs: Record field declaration design discussion in papers
## Summary
Documented the "init block vs fields-at-top" design discussion as a valuable example of AI-human collaboration in language design.

## Changes

### Paper G (AI Collaboration)
- Added field-declaration-design.md documenting the entire discussion flow
- Showcased how complex init block proposal evolved to simple "fields at top" rule
- Demonstrates AI's tendency toward complexity vs human intuition for simplicity

### Paper H (AI Practical Patterns)
- Added Pattern #17: "Gradual Refinement Pattern" (段階的洗練型)
- Documents the process: Complex AI proposal → Detailed analysis → Human insight → Convergence
- Field declaration design as a typical example

### Paper K (Explosive Incidents)
- Added Incident #046: "init block vs fields-at-top incident"
- Updated total count to 46 incidents
- Shows how a single human comment redirected entire design approach

## Design Decision
After analysis, decided that BoxIndex should remain a compiler-internal structure, not a core Box:
- Core Boxes: User-instantiable runtime values (String, Integer, Array, Map)
- Compiler internals: BoxIndex for name resolution (compile-time only)
- Clear separation of concerns between language features and compiler tools

## Philosophy
This discussion exemplifies key principles:
- The best design needs no explanation
- Constraints provide clarity, not limitation
- "Everything is Box" doesn't mean "compiler internals are Boxes"
- AI tends toward theoretical completeness; humans toward practical simplicity

🐱 Sometimes the simplest answer is right in front of us\!
2025-09-16 14:57:05 +09:00
6ca56b0652 feat: 配列/Mapリテラル糖衣構文の実装とネームスペース解決の改善計画
- ArrayLiteral/MapLiteralのAST定義追加
- パーサーで[...]と{...}構文をサポート
- MIR Builderでnew Box() + push/setへのdesugaring実装
- テストケースとスモークスクリプト追加
- CURRENT_TASK.mdにネームスペース解決Phase-1計画を追記
- 3段階解決順序(ローカル→エイリアス→プラグイン)の設計合意
2025-09-16 06:13:44 +09:00
d90216e9c4 📚 Phase 15 - セルフホスティング戦略の明確化とEXE-first実装
## 主な変更点

### 🎯 戦略の転換と明確化
- PyVMを開発ツールとして位置づけ(本番経路ではない)
- EXE-first戦略を明確に優先(build_compiler_exe.sh実装済み)
- Phase順序の整理: 15.2(LLVM)→15.3(コンパイラ)→15.4(VM)

### 🚀 セルフホスティング基盤の実装
- apps/selfhost-compiler/にNyashコンパイラMVP実装
  - compiler.nyash: メインエントリー(位置引数対応)
  - boxes/: parser_box, emitter_box, debug_box分離
- tools/build_compiler_exe.sh: ネイティブEXEビルド+dist配布
- Python MVPパーサーStage-2完成(local/if/loop/call/method/new)

### 📝 ドキュメント整備
- Phase 15 README/ROADMAP更新(Self-Hosting優先明記)
- docs/guides/exe-first-wsl.md: WSLクイックスタート追加
- docs/private/papers/: 論文G~L、爆速事件簿41事例収録

### 🔧 技術的改善
- JSON v0 Bridge: If/Loop PHI生成実装(ChatGPT協力)
- PyVM/llvmliteパリティ検証スイート追加
- using/namespace機能(gated実装、Phase 15では非解決)

## 次のステップ
1. パーサー無限ループ修正(未実装関数の実装)
2. EXEビルドとセルフホスティング実証
3. c0→c1→c1'ブートストラップループ確立

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 18:44:49 +09:00