5 ms·
Pi is good in concept, but why couldn’t they choose a compiled language instead of TypeScript?
by guessmyname 3mo ago
Pi is good in concept, but why couldn’t they choose a compiled language instead of TypeScript?
- gidellav 3mo agoSorry for self-insert, but that's exactly what I thought and I built https://github.com/gi-dellav/zerostack https://github.com/gi-dellav/zerostack, so you are right I'd say
- tuvix 3mo agoI would imagine the extension system they built would be much more difficult to manage. They could have opted for Lua, though, I suppose.
- jack_pp 3mo agosince pi is built to modify itself, isn't it better to use a language like typescript where LLMs have a LOT of training data? a harness doesn't do any computations by itself so what benefit is using a compiled language?
- whimsicalism 3mo agoi find LLMs generally play better with compiled languages actually, they do great with rust. you can think of it almost as analogous to a harness.
- brightball 3mo agoThe more structure the better. Provides strong guardrails. I’ve had great experience with Elixir and the new compiler combined with Ash.
- olalonde 3mo agoThey play better with statically typed languages, not compiled ones in particular. Rust's typing is stricter than Typescript though so that probably helps.
- simonw 3mo agoI imagine because they want to support plugins, and plugins in compiled language are a lot less natural than plugins in languages like TypeScript or Python.
- qiine 3mo agowell neovim does that beautifully
- buremba 3mo agoFor TUIs, Rust/Go vs Typescript doesn't really makes a huge performance difference and you lose the 50x bigger community advantage of Typescript.
- imron 3mo agoIt makes a huge memory difference.
- buremba 3mo agoNot really because you're not building a database or GUI app where using native elements & data structures help a lot with memory pressure. TUI renderer is the one using the memory heavily so your terminal takes the heavy lifing. If you're managing the buffers and out-of-screen context good enough, Typescript can be pretty efficient.
- imron 3mo agoI love opencode but it chews through memory on my 64gb MacBook Pro. Can’t have too many long running sessions because the memory use just slowly creeps up. It’s not about the terminal at all which as you noted accounts for minimal isage. It’s all the internal chat and history and everything else the agent tracks - all of which are smallish (and largish) strings allocated on the heap. I don’t have the same issues with rust based tuis.
- fg137 3mo agoDoes it matter to you as a user, other than the Nodejs/npm requirement?
- maxloh 3mo agoOpencode is written in Go.
- grepex 3mo agoIt is written in Typescript. https://github.com/anomalyco/opencode https://github.com/anomalyco/opencode There is an archived Opencode project written in Go but I don't think it is affiliated. https://github.com/opencode-ai/opencode https://github.com/opencode-ai/opencode
- ValentineC 3mo agoThis is a pretty good summary of what happened: https://news.ycombinator.com/item?id=44483251 https://news.ycombinator.com/item?id=44483251
- root_axis 3mo agoWhy does it matter? Agent harnesses aren't doing anything that would make a compiled language more suitable than a scripting language.
- wyre 3mo agoI agree, but there are a lot of great reasons for TypeScript: It's hot reloadable, so any modifications an agents makes can be surfaced in the active session. Nearly everything is already written in TS which makes integrating Pi into other software, or other software into Pi much easier.