Hacker News new | ask | show | jobs
by vladev 791 days ago
Interesting that they use Rust for most things, rather than Deno. I would've expected more dog-fooding on their part.
4 comments

So the reason we do this - and I should have mentioned this in the post - is that we explicitly do not want to dog food here. Because JSR is the package registry, if it goes down, and we can not pull packages from the registry during deployment of a new version of the registry (that fixes the reason it is down), that would be very bad. So we don't put anything that depends on the registry in the path of deployment of the registry :)

Also, a lot of the work that the registry does (parsing source code, analyzing dependencies, enforcing rules on the code, etc) are pieces of code that are shared with the Deno CLI, which implements this in Rust. The reason for this is that this work has to happen in Rust, because JavaScript, for the most part, can not "self-host" itself (ie you can not implement a JavaScript runtime on a JavaScript host if you want your runtime to provide more system bindings than the host runtime).

Finally, we do use Deno for many pieces of the registry where the "circular dependency" problem is not relevant. Namely the entire frontend uses Deno and Fresh :)

The Javascript and Python ecosystems, somewhat ironically, have begun using rust for their tooling, because the actual language is too slow.

Aside though: IMO python is good as "glue" between low level code. JS... I don't know man.

My dream language/environment would be something that is ubiquitous, has a straight-forward learning curve, has a REPL, and empowers dev productivity - like python - but then, if i should choose, there would be an additional straight-forward path for me to push my code thhough some compilation process in order to supercharge the performance/speed of my code - like Go or Rust, etc...Basically let me choose to employ my code as a (dynamic) script, or compiled code...sort of like some hybrid of python and Go, or python and rust, etc. but combined into a single lang./env. :-)
I believe this is essentially the goal of Mojo [0][1], at least for ML/AI development.

[0] https://www.modular.com/max/mojo

[1] https://news.ycombinator.com/item?id=35790367

Another rabbit hole for me to discover! Thanks!
That's Java. You can work in the REPL, and when you put your code in a file and launch it it runs fast; very fast.
I can't deny the performance and scalability of Java. But I've never been a fan of the need to be so verbose when coding for it. Also my memory of Java is from the late 90s...so maybe I'm missing something but I can't recall there ever being a REPL in Java. So I guess TIL :-)
Not only is there now a REPL, but the language is not at all what you remember from the 90s.
That is what Scala claims to be. https://www.scala-lang.org/

Scala has its own downsides tho. It is a "big" language in the sense that because it tries to do everything, there are too many ways to do one things.

Common Lisp, maybe?
Clojure is probably closest to that right now.
Interesting; i guess i have a rabbit hole to dive into. Thanks forvthe suggestion!
Deno is written in Rust, so it makes sense to write stuff like Typescript compilation in the same ecosystem as your Typescript runtime.

It sounds like they use Fresh (deno framework) for the web ui parts.

JavaScript for UI, Rust for data

Not really. Most software nowadays is like When I pay it is Rust for best performance when user pays(in perf or actual dollars) ..blah..blah.. JS/Electron for the win