logoalt Hacker News

semiinfinitelyyesterday at 11:45 PM8 repliesview on HN

I do not understand why in the age of ai coding we would implement this in javascript


Replies

thomasfromcdnjstoday at 6:43 AM

I am building an entire GPT model framework from the ground up in Typescript + small amounts of c bindings for gpu stuff. https://github.com/thomasdavis/alpha2 (using claude)

Don't hate me aha and no, there is no reason other than I can

mccoybyesterday at 11:51 PM

It’s straightforward: JavaScript is a dynamic language, which allows code (for instance, code implementing an extension to the harness) to be executed and loaded while the harness is running.

This is quite nice — I do think there’s a version of pi’s design choices which could live in a static harness, but fully covering the same capabilities as pi without a dynamic language would be difficult. (You could imagine specifying a programmable UI, etc — various ways to extend the behavior of the system, and you’d like end up with an interpreter in the harness)

At least, you’d like to have a way to hot reload code (Elixir / Erlang could be interesting)

This is my intuition, at least.

show 2 replies
sean_pedersentoday at 1:23 AM

There is a Rust port: https://github.com/Dicklesworthstone/pi_agent_rust

show 1 reply
Blackareayesterday at 11:50 PM

yes! I just don't understand that as well. Up until some time ago claud code's preferred install was a npm i, wasn't it? Please serious answers for why anyone would use a web language for a terminal app

show 1 reply
moonlion_ethtoday at 2:28 AM

i wrote an agent in zig, it kinda sucks tho. the language is just words

andaitoday at 4:02 AM

See also: pz: pi coding-agent in Zig

https://news.ycombinator.com/item?id=47120784