9c94e88b86
ResultBox migration (stage 0): suppress legacy deprecation warnings in box_trait impls; keep dual handling in VM. Fix verifier Display for SuspiciousBarrierContext. Expose VM stats fields to vm_stats module. CLI core_ci guide and script in place.
2025-08-26 01:42:18 +09:00
f82ad5a84d
Phase 9.78h: VM BinOp and/or short-circuit + BoxRef<Integer> arithmetic; add diagnostic hooks. Update CURRENT_TASK with progress and VM path-tracing TODO. Align docs: MIR26 canonical spec and phase docs.
2025-08-26 00:06:35 +09:00
0aef8d49a7
Phase 2: TypeOp変換の一本化(Optimizer安全ネット削除)\nPhase 3: 可視化/スナップショット基盤(--mir-verbose-effects, snapshot/compare/ci_check)\nDocs: Phase 1/2 完了マーク・利用方法追記
2025-08-24 01:58:41 +09:00
f2761004d3
feat: Add parallel HTTP server E2E tests and enhance plugin system
...
- Add e2e_plugin_net_additional.rs with parallel server tests
- Fix test to properly handle request objects (no double accept)
- Add comprehensive net-plugin documentation
- Implement debug tracing for method calls
- Enhance plugin lifecycle documentation
- Improve error handling in plugin loader
- Add leak tracking infrastructure (for future use)
- Update language spec with latest plugin features
This enhances test coverage for concurrent HTTP servers and improves
the overall plugin system documentation and debugging capabilities.
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-22 05:01:11 +09:00
da716addc8
feat: Implement plugin singleton pattern with shutdown support
...
- Add singleton support for plugin boxes (e.g., CounterBox)
- Implement shutdown_plugins_v2() for controlled plugin lifecycle
- Plugin instances now shared across multiple new() calls
- Shutdown properly releases and allows re-initialization
- All singleton E2E tests passing ✅
ChatGPT5による高度なプラグインライフサイクル管理実装
- シングルトンパターンでプラグインインスタンス共有
- 明示的なshutdownでリソース解放と再初期化対応
- Nyashの統一ライフサイクルポリシー維持
Note: ast.rs test failures are due to rapid development pace -
tests need updating for new BoxDeclaration fields (private_fields, public_fields)
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-21 21:35:17 +09:00
cc2a820af7
feat(plugin): Fix plugin BoxRef return and Box argument support
...
- Fixed deadlock in FileBox plugin copyFrom implementation (single lock)
- Added TLV Handle (tag=8) parsing in calls.rs for returned BoxRefs
- Improved plugin loader with config path consistency and detailed logging
- Fixed loader routing for proper Handle type_id/fini_method_id resolution
- Added detailed logging for TLV encoding/decoding in plugin_loader_v2
Test docs/examples/plugin_boxref_return.nyash now works correctly:
- cloneSelf() returns FileBox Handle properly
- copyFrom(Box) accepts plugin Box arguments
- Both FileBox instances close and fini correctly
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-21 00:41:26 +09:00
670615d1de
feat: WASMビルド完全対応+finiシステム修正 🎉
...
## WASMビルド対応
- TimerBox、AudioBox等の問題のあるBoxをWASM環境では条件付きコンパイルで除外
- WebBox (WebDisplayBox, WebConsoleBox, WebCanvasBox) にas_anyメソッド追加
- プラグイン関連コードに#[cfg]ガードを追加
- web-sysフィーチャーを追加(Performance、MouseEvent等)
- projects/nyash-wasmのビルドが完全に通るように!
## finiシステム修正
- フィールド差し替え時の自動fini削除(Nyashの明示的哲学に従う)
- スコープ離脱時のみfini実行(meは除外)
- ドキュメント更新で正しいfiniルールを明記
## その他
- CLAUDE.mdにWASMビルド方法を追記(wasm-pack build --target web)
- 開発サーバー起動方法を記載(python3 -m http.server 8010)
- cargo testで全テスト成功を確認
これでNyashがブラウザで動作可能に!🐱 ✨
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-20 07:33:18 +09:00
ea40437d4d
docs: Update architecture documentation and add plugin-tester to CLAUDE.md
...
## Documentation Updates
### phase_9_75g_bid_integration_architecture.md
- Added detailed Phase 9.75g-0 implementation results
- Included FileBox plugin implementation details (293KB .so, 6 methods)
- Added plugin-tester diagnostic tool output examples
- Updated Phase 9.75g-1 implementation plan with concrete steps:
- Step 4.1: TLV encode/decode (src/bid/tlv.rs)
- Step 4.2: Plugin loader (plugin-tester migration)
- Step 4.3: BoxFactoryRegistry (transparent switching)
- Step 4.4: PluginBox proxy (NyashBox implementation)
### CLAUDE.md
- Added plugin-tester section to testing documentation
- Included build/run instructions and output examples
- Documented key features: Box name self-declaration, generic design
- Updated final timestamp to 2025-08-18 reflecting BID-FFI foundation completion
## Key Achievements Documented
- ✅ Box name non-hardcoded design (plugins declare themselves)
- ✅ Generic plugin-tester works with any plugin
- ✅ birth/fini lifecycle management implementation
- ✅ Memory ownership rules clarification
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-18 09:58:15 +09:00
2a96c91a81
feat(phase-9.75g-0): Implement BID-FFI Day 1 - TLV encoding/decoding foundation
...
BID-1 Implementation Progress (Day 1 Complete\! 🎉 ):
- Add BID module structure (src/bid/)
- Implement BID-1 TLV (Type-Length-Value) format
- TlvEncoder: Encode primitives, strings, handles
- TlvDecoder: Decode with version checking
- Full test coverage for all types
- Define core types and error codes
- BidType enum with Handle design
- Standard error codes (NYB_SUCCESS, NYB_E_*)
- Platform-dependent pointer size (Usize)
- Fix unrelated Arc<dyn NyashBox> conversion error
Additional improvements:
- Add Rust build error handling guide to CLAUDE.md
- Error file output pattern
- 32-thread build rules
- Common error patterns and solutions
Tests passing: 4/4 ✅
- bid::types::tests (2 tests)
- bid::tlv::tests (2 tests)
Next: Day 2 - Metadata API implementation (init/abi/shutdown)
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-17 18:32:15 +09:00
3df87fb1ce
fix(phase-4.3c-3): Fix StringBox literal handling in MIR builder
...
Phase 4-3c-3 Complete: WASM host functions now correctly output string content
## Changes:
- Fixed MIR builder to handle StringBox with string literal arguments
- Special case for to generate proper string constants
- Removed debug output after successful verification
- WASM now correctly outputs "Hello MIR!" instead of "StringBox"
## Test Results:
- MIR generation: ✅ Generates correctly
- WASM compilation: ✅ String data correctly placed at offset 4096
- WASM execution: ✅ Outputs "Hello MIR\!" as expected
## Technical Details:
- Modified build_new_expression() to detect StringBox with literal arguments
- Generates Const instruction with actual string content
- Host function reads StringBox memory layout correctly
This completes the WASM string output functionality for Phase 4.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-17 13:49:35 +09:00
fa1a3ad644
feat(Phase 9.75j): Complete warning elimination - 106→0 warnings (100% improvement)
...
✨ Major code quality improvements:
• Fixed all unused variable and parameter warnings
• Added appropriate #[allow(dead_code)] annotations
• Renamed constants to follow Rust naming conventions
• Achieved completely warning-free codebase
🔧 Key changes:
• Parser expressions: Fixed arg_count and statement_count usage
• MIR modules: Added dead_code allows for future-use code
• Backend modules: Prefixed unused parameters with underscore
• Effect constants: Renamed 'read' to 'READ_ALIAS' for conventions
📊 Results:
• Before: 106 warnings (noisy build output)
• After: 0 warnings (clean build)
• Improvement: 100% warning reduction
🎯 This continues the bug fixing initiative "つづきのしゅうせいおねがいにゃ!"
from Phase 9.75i (birth() fixes, static methods, Copilot apps).
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-16 17:39:04 +09:00
6b62209da9
feat(constructor): implement birth() syntax and pack transparency system
...
## 🌟 birth() Constructor Implementation
- Add BIRTH token to tokenizer (src/tokenizer.rs:37,403)
- Implement birth() parser support (src/parser/mod.rs)
- Add birth() interpreter support with priority system
- Priority: birth > pack > init > Box名
## 🚨 Fix Documentation Inconsistencies
- Fix delegation-system.md: pack → birth unified
- Fix box-design/README.md: add pack-specific section
- Fix LANGUAGE_GUIDE.md: birth unified, pack builtin-only
- Fix CLAUDE.md: birth philosophy, pack system separation
## 📋 pack Transparency System Design
- Create phase_8_8_pack_transparency_system.md specification
- Establish correct pack definition: builtin Box inheritance only
- Design user-transparent system: from BuiltinBox() → internal pack
- Comprehensive test cases and implementation requirements
## 🧪 Testing
- Add test_birth_simple.nyash: birth() functionality verification
- Document constructor name decision process
- Prepare for Copilot implementation with clear specifications
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-15 19:34:26 +09:00
890b58a19e
docs: 実用優先戦略でPhase 9-10完全再設計
...
Phase 8.6+8.7完了受けて、実用価値最大化戦略に基づく設計変更:
📋 Phase 9-10再設計:
- Phase 9: JIT planning → AOT WASM実装(最優先・2-3週間)
- Phase 9.5: HTTPサーバー実用テスト追加(AOT検証・2週間)
- Phase 10: AOT exploration → LLVM Direct AOT(最高性能・4-6ヶ月)
- Cranelift JIT: Phase 12以降の将来オプションに変更
🎯 実用優先戦略の根拠:
- WASM既に動作済み(13.5倍高速化実証済み)
- AOT実装で即座配布価値提供
- Cranelift JITは重複投資(Rust開発環境改善効果限定)
- 時間効率:2-3ヶ月節約でLLVM集中投資
🚀 期待効果:
- `nyash --compile-native app.nyash -o app.exe` 実現
- 配布可能HTTPサーバーデモ(Phase 9.5)
- Everything is Box哲学のネイティブ最適化
- 1000倍高速化目標(Phase 10)
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-14 13:00:44 +09:00
8ec80a35c3
feat(benchmark): add comprehensive performance benchmarking system
...
🚀 Phase 8.2 PoC2 Achievement: 280x WASM performance boost proven\!
## New Features:
- Complete benchmark framework (src/benchmarks.rs)
- CLI integration: --benchmark --iterations options
- 3-backend comparison: Interpreter/VM/WASM
- Automated performance measurement & reporting
## Benchmark Results (100 iterations average):
- WASM: 0.17ms (280x faster than Interpreter\!)
- VM: 16.97ms (2.9x faster than Interpreter)
- Interpreter: 48.59ms (baseline)
## Added Files:
- benchmarks/bench_{light,medium,heavy}.nyash - Test cases
- benchmark_summary_20250814.md - Clean results
- wasm_demo/ - Browser execution environment
## Documentation Updates:
- docs/execution-backends.md - Added benchmark usage
- docs/CURRENT_TASK.md - Phase 8.3 Copilot coordination
- CLAUDE.md - Quick benchmark access
## Copilot Integration Ready:
- Phase 8.3 merge conflict avoidance strategy documented
- Benchmark framework ready for Box operation performance validation
- CLI integration preserved for future enhancements
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-14 07:19:23 +09:00
697223c8cf
docs: move execution-backends.md to docs root and add quick access
...
- Move docs/説明書/execution-backends.md → docs/execution-backends.md
- Add execution backend guide link to CLAUDE.md quick start section
- Update relative path in docs/説明書/README.md
- Improve developer access to VM/WASM execution options
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-14 06:46:57 +09:00
42379a3694
docs: update Phase 7 planning and add correct Nyash philosophy test files
...
- Update CLAUDE.md with 32-thread build option
- Enhance phase7_async_mir.md with detailed implementation plan
- Add Obj class definition to phase6_ref_set_get.nyash
- Create phase6_ref_set_get_correct.nyash following Everything is Box philosophy
2025-08-13 21:06:37 +09:00
621bf7cc3d
docs: reorganize into 説明書/予定/archive; update docs/README.md and CLAUDE.md; move root .nyash to local_tests; consolidate native-plan notes into README + archive
2025-08-13 18:54:02 +09:00
0abdd9dbcf
🔧 fix: FloatBoxインポートパス修正 + コンテキスト圧縮対策追加
...
- FloatBoxインポートをcrate::boxes::math_box::FloatBoxに修正
- expressions.rs, objects.rsでインポートパス統一
- CLAUDE.mdにコンテキスト圧縮時の重要ルール追加
- 次回Copilot作業のための準備完了
Note: FloatBox toString()はまだ未修正(Copilotに引き継ぎ)
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-12 05:12:32 +09:00
19cfe70df9
🔧 refactor: P2PBox複雑実装を削除し段階的実装方針に変更
...
- 複雑なP2PBox関連実装を削除:
* Transport trait + MessageBus + MessageIntentBox + NewP2PBox
* 依存関係が複雑で一度に追加すると失敗することを学習
- nyashバイナリのビルドを安定化:
* 全てのimportエラーを修正
* cargo build --bin nyash が正常に動作
- CURRENT_TASK.mdに新しい段階的実装方針を記載:
* Phase 1: FloatBox (依存なし)
* Phase 2: ArrayBox改良
* Phase 3: 演算子システム改良
- 教訓: 一つずつ確実に実装し、テストファーストで進める
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-12 04:02:19 +09:00
50fc4ca1ce
🎁 feat: pack構文革命完全達成 - Box哲学の具現化
...
【実装内容】
- packキーワード追加: TokenType::PACK, "pack" mapping
- パーサー対応: init同様の特別扱い + from Parent.pack()
- インタープリター対応: pack > init > Box名順優先選択
- デリゲーション統合: from Parent.pack()で親packを呼び出し
- テスト完備: test_pack_syntax.nyash包括テスト
【革命的効果】
- Box哲学具現化: 「箱に詰める」でコードを書くたび哲学体験
- 他言語差別化: new/init超越のNyash独自アイデンティティ
- 直感的UX: Gemini・ChatGPT両先生一致推薦の最適命名
- メンタルモデル統一: 全Boxで1つのpack動詞に収束
- 拡張基盤: try_pack, from_*パターンへの発展準備完了
🎉 Everything is Box - Now Everything is Packed\!
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-11 09:40:24 +09:00
ccb3204a35
🚀 feat: ":"継承演算子実装+全14Box型の包括的ドキュメント化完成
...
## 🔧 言語機能改善
- from予約語問題を解決する":"継承演算子を実装
- box Child : Parent 構文でより直感的な継承表現
- tokenizer/parserを更新、from を変数名として使用可能に
## 📚 ドキュメント大改善(1000行以上追加)
全14Box型に包括的なJavaDoc風ドキュメントを追加:
- StringBox: 文字列操作メソッド群
- IntegerBox/BoolBox: 基本データ型と演算子
- MathBox/RandomBox/TimeBox: 計算・ユーティリティ
- ConsoleBox/DebugBox/SoundBox: システムIO
- MapBox/NullBox: データ構造
- EguiBox: デスクトップGUI
- SimpleIntentBox: P2P通信
各Boxに概要・メソッド一覧・使用例・実用例・注意事項を完備
## 🧹 プロジェクト整理
- ルートディレクトリから60個のテストファイルを削除
(development/root_tests/に移動済み)
- 不要ファイル削除: bmp, tar.xz, html, 空フォルダ等
- examplesフォルダへ適切なファイルを移動
## 📝 その他の更新
- CLAUDE.md: パーサーデバッグ機能の説明追加
- sessions/: AI相談記録2件を保存
- from予約語問題の解決策検討
- 標準Box型(ArrayBox等)の設計相談
2025-08-10 11:32:32 +09:00
e7f6666917
🎨 feat: EguiBox GUI開発基盤完成 + パーサー無限ループバグ修正
...
## 🚀 主要機能追加
### EguiBox - GUI開発基盤
- Windows版GUIメモ帳アプリ (simple_notepad.rs, nyash_notepad_jp.rs)
- 日本語フォント対応 (NotoSansJP-VariableFont_wght.ttf)
- BMPアイコン表示システム (c_drive_icon.bmp)
- Windowsエクスプローラー風アプリ (nyash_explorer.rs)
- アイコン抽出システム (test_icon_extraction.rs)
### ビジュアルプログラミング準備
- NyashFlow プロジェクト設計完成 (NYASHFLOW_PROJECT_HANDOVER.md)
- ビジュアルノードプロトタイプ基盤
- WebAssembly対応準備
## 🔧 重大バグ修正
### パーサー無限ループ問題 (3引数メソッド呼び出し)
- 原因: メソッドパラメータ解析ループの予約語処理不備
- 修正: src/parser/mod.rs - 非IDENTIFIERトークンのエラーハンドリング追加
- 効果: "from"等の予約語で適切なエラー報告、ハング→瞬時エラー
### MapBoxハング問題調査
- MapBox+3引数メソッド呼び出し組み合わせ問題特定
- バグレポート作成 (MAPBOX_HANG_BUG_REPORT.md)
- 事前評価vs必要時評価の設計問題明確化
## 🧹 コード品質向上
- box_methods.rs を8モジュールに機能分離
- 一時デバッグコード全削除 (eprintln\!, unsafe等)
- 構文チェック通過確認済み
## 📝 ドキュメント整備
- CLAUDE.md にGUI開発セクション追加
- Gemini/ChatGPT先生相談ログ保存 (sessions/)
- 段階的デバッグ手法確立
## 🎯 次の目標
- must_advance\!マクロ実装 (無限ループ早期検出)
- コマンド引数でデバッグ制御 (--debug-fuel)
- MapBox問題の根本修正
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-10 07:54:03 +09:00
a4d32b3c57
📝 docs: Windows版ビルド手順を全ドキュメントに追記
...
🪟 新機能追加:
• cargo-xwinクロスコンパイル手順
• Windows実行ファイル (916KB) 生成方法
• Linux/WSL/Windows/WebAssembly 4プラットフォーム対応
📚 更新ドキュメント:
• CLAUDE.md - 開発ガイド更新
• README.md - 英語版に Windows クロスコンパイル
• README.ja.md - 日本語版に Windows 手順
🎯 完全マルチプラットフォーム対応達成!
Linux + Windows + WebAssembly のトリプル展開可能
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-09 16:19:22 +09:00
0bed0c0271
🎉 initial commit: Nyash Programming Language完成版
...
🚀 主要機能:
• Everything is Box哲学による革新的アーキテクチャ
• WebAssemblyブラウザー対応プレイグラウンド
• アーティスト協同制作デモ - 複数Boxインスタンス実証
• 視覚的デバッグシステム - DebugBox完全統合
• static box Mainパターン - メモリ安全設計
⚡ 言語機能:
• NOT/AND/OR/除算演算子完全実装
• ジェネリクス/テンプレートシステム
• 非同期処理(nowait/await)
• try/catchエラーハンドリング
• Canvas統合グラフィックス
🎨 ブラウザー体験:
• 9種類のインタラクティブデモ
• リアルタイムコード実行
• WebCanvas/WebConsole/WebDisplay
• モバイル対応完了
🤖 Built with Claude Code collaboration
Ready for public release!
2025-08-09 15:14:44 +09:00