logoalt Hacker News

mccoybyesterday at 11:51 PM2 repliesview on HN

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.


Replies

jataritoday at 12:30 AM

Code hotloading isn't a particularly difficult feature to implement in any language.

show 2 replies
sergiomatteitoday at 12:55 AM

I built my own harness on Elixir/Erlang[0]. It's very nice, but I see why TypeScript is a popular choice.

No serialization/JSON-RPC layer between a TS CLI and Elixir server. TS TUI libraries utilities are really nice (I rewrote the Elixir-based CLI prototype as it was slowing me down). Easy to extend with custom tools without having to write them in Elixir, which can be intimidating.

But you're right that Erlang's computing vision lends itself super well to this problem space.

[1]: https://github.com/matteing/opal