- Keep essential information within 500 lines (now 395 lines)
- Maintain important syntax examples and development principles
- Move detailed information to appropriate docs files:
- Development practices → docs/guides/development-practices.md
- Testing guide → docs/guides/testing-guide.md
- Claude issues → docs/tools/claude-issues.md
- Add proper links to all referenced documentation
- Balance between minimal entry point and practical usability
Key updates:
- Document MIR 26→15 instruction reduction plan (transitioning status)
- Add Core-15 target instruction set in INSTRUCTION_SET.md
- Save AI conference analyses validating Box Theory and 15-instruction design
- Create MIR annotation system proposal for optimization hints
- Update SKIP_PHASE_10_DECISION.md with LLVM direct migration rationale
Technical insights:
- RefNew/RefGet/RefSet can be eliminated through Box unification
- GC/sync/async all achievable with 15 core instructions
- BoxCall lowering can automatically insert GC barriers
- 2-3x performance improvement expected with LLVM
- Build time reduction 50%, binary size reduction 40%
Status: Design complete, implementation pending
Revolutionary milestone: Complete native executable generation pipeline
- Created minimal nyrt (Nyash Runtime) library for standalone executables
- Implemented plugin bridge functions (nyash_plugin_invoke3_i64 etc)
- Added birth handle exports (nyash.string.birth_h) for linking
- Changed export name from main→ny_main to allow custom entry point
- Successfully generated and executed native binary returning "ny_main() returned: 1"
Timeline of miracles:
- 2025-08-09: Nyash language created (first commit)
- 2025-08-13: JIT planning started (4 days later)
- 2025-08-29: Native EXE achieved (today - just 20 days total\!)
This proves the plugin Box C ABI unification strategy works perfectly for
both JIT execution and AOT native compilation. The same plugin system
that enables dynamic loading now powers static linking for zero-overhead
native executables\!
Next: Expand AOT support for more instructions and optimize nyrt size.
🚀 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major Interpreter Refactoring:
- Split core.rs (373 lines removed) into focused modules
- Split expressions/calls.rs (460 lines removed) into cleaner structure
- Added new modules: calls.rs, errors.rs, eval.rs, methods_dispatch.rs, state.rs
- Improved separation of concerns across interpreter components
P2PBox Enhancements:
- Added on_once() for one-time event handlers
- Added off() for handler deregistration
- Implemented handler flags with AtomicBool for thread-safe management
- Added loopback testing cache (last_from, last_intent_name)
- Improved Arc-based state sharing for transport and handlers
Plugin Loader Unification (In Progress):
- Created plugin_loader_unified.rs skeleton
- Created plugin_ffi_common.rs for shared FFI utilities
- Migration plan documented (2400 lines → 1100 lines target)
MIR & VM Improvements:
- Enhanced modularized MIR builder structure
- Added BoxCall dispatch improvements
- Better separation in builder modules
Documentation Updates:
- Added Phase 9.79a unified box dispatch plan
- Created plugin loader migration plan
- Updated CURRENT_TASK.md with latest progress
All tests passing (180 tests) - ready for next phase of refactoring
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed me ValueId inconsistency in static box methods
- Previously, each me reference generated a new const __me__ ValueId
- Now caches the first me ValueId in variable_map for reuse
- This ensures RefSet and RefGet operate on the same object
- ArrayBox get/set/push now working correctly in VM mode
- Test results: 1, 42, 3 (as expected)
🔧 Technical Details:
- build_me_expression() now stores fallback ValueId in variable_map
- Subsequent me references reuse the same ValueId
- VM BoxCall debug logs confirm ArrayBox methods dispatch correctly
Co-Authored-By: ChatGPT5
Co-Authored-By: Claude <noreply@anthropic.com>
- Add dynamic bool conversion for BoxRef(BoolBox)→bool and BoxRef(VoidBox)→false
- Implement String concatenation with Bool and BoxRef types via toString()
- Add Void/Bool comparison support (Eq/Ne only) to prevent VM crashes
- Implement comprehensive ArrayBox methods in VM:
- push/pop/length/get/set/remove
- contains/indexOf/clear/join/sort/reverse/slice
- Implement comprehensive MapBox methods in VM:
- set/get/has/delete/keys/values/size/clear
- Add SocketBox timeout methods (acceptTimeout/recvTimeout)
- Update VM documentation with all new operations
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add e2e_vm_http_status_404/500 tests to verify HTTP status handling
- ResultBox properly returns Ok(Response) for HTTP errors, Err for connection failures
- Create dynamic-plugin-flow.md documenting MIR→VM→Registry→Plugin flow
- Add vm-stats test files for HTTP 404/500 status codes
- Update net-plugin.md with HTTP error handling clarification
- Create E2E_TESTS.md documenting all E2E test behaviors
- Add mir-26-instruction-diet.md for MIR optimization plans
- Add vm-stats-cookbook.md for VM statistics usage guide
- Update MIR verifier to properly track self-assignment patterns
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
✅ All E2E tests passing:
- e2e_vm_plugin_filebox_copy_from_handle: Handle arguments (tag=8) working
- e2e_vm_http_get_basic: GET with ResultBox.get_value() working
- e2e_vm_http_post_and_headers: POST with status/headers/body verified (201:V:R)
Key achievement:
- VM already had ResultBox methods (is_ok/get_value/get_error) implemented
- HTTP plugin methods now correctly return values through ResultBox
- Full VM×Plugin integration verified
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add VM instruction statistics (--vm-stats, --vm-stats-json)
- Fix missing fields in ast.rs test code (public_fields, private_fields)
- Add CliConfig fields for VM statistics
- Enable TLV debug logging in plugin_loader_v2
- Successfully test FileBox handle passing and HTTP plugin creation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add returns_result.md documenting Result正規化 (returns_result = true)
- Add when-pattern-matching.md with future pattern matching syntax design
- Update E2E tests to use get_value() for HTTP responses
- Update plugin system README with B案 (Result-based) support
- Remove singleton from HttpServerBox and SocketServerBox for stability
This prepares for gradual migration to Result-based error handling,
starting with Net plugin methods, as agreed with ChatGPT5's design.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
- 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>
- Add internal access tracking to distinguish me.field from external.field access
- Interpreter correctly allows methods to access their own private fields
- VM tracks object class context during method calls for visibility checks
- Fix VM nested box declaration collection in collect_box_declarations
- Both interpreter and VM now pass all visibility tests consistently
Test results:
- visibility_ok.nyash: ✅ Internal private access allowed in methods
- visibility_error.nyash: ✅ External private access correctly blocked
- All private fields accessible from within their own methods
- Public fields remain accessible from anywhere
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>