💢 The truth about Rust + LLVM development hell

ChatGPT5 struggling for 34+ minutes with Rust lifetime/build errors...
This perfectly illustrates why we need Phase 22 (Nyash LLVM compiler)\!

Key insights:
- 'Rust is safe and beautiful' - Gemini (who never fought lifetime errors)
- Reality: 500-line error messages, 34min debug sessions, lifetime hell
- C would just work: void* compile(void* mir) { done; }
- Python would work: 100 lines with llvmlite
- ANY language with C ABI would work\!

The frustration is real:
- We're SO CLOSE to Nyash self-hosting paradise
- Once bootstrapped, EVERYTHING can be written in Nyash
- No more Rust complexity, no more 5-7min builds
- Just simple, beautiful Box-based code

Current status:
- PHI/SSA hardening in progress (ChatGPT5)
- 'phi incoming value missing' in Main.esc_json/1
- Sealed SSA approach being implemented

The dream is near: Everything is Box, even the compiler\! 🌟
This commit is contained in:
Selfhosting Dev
2025-09-12 05:48:59 +09:00
parent 23fea9258f
commit 1f5ba5f829
9 changed files with 258 additions and 60 deletions

View File

@ -17,7 +17,8 @@ pub(super) fn try_handle_array_method<'ctx>(
recv_h: inkwell::values::IntValue<'ctx>,
) -> Result<bool, String> {
// Only when receiver is ArrayBox
let is_array = matches!(func.metadata.value_types.get(box_val), Some(crate::mir::MirType::Box(b)) if b == "ArrayBox");
let is_array = matches!(func.metadata.value_types.get(box_val), Some(crate::mir::MirType::Box(b)) if b == "ArrayBox")
|| matches!(method, "get" | "set" | "push" | "length");
if !is_array {
return Ok(false);
}
@ -127,4 +128,3 @@ pub(super) fn try_handle_array_method<'ctx>(
_ => Ok(false),
}
}