Hacker News new | ask | show | jobs
by mwexler 1400 days ago
For those like me who didn't know:

https://bun.sh/. "Bun is a fast all-in-one JavaScript runtime. Bundle, transpile, install and run JavaScript & TypeScript projects — all in Bun. Bun is a new JavaScript runtime with a native bundler, transpiler, task runner and npm client built-in."

1 comments

"Run TypeScript" is misnomer, unless I'm missing something, it compiles TS -> JS and "runs" that.
"Run JavaScript" is a misnomer, it compiles JS -> bytecode and "runs" that.
"Run bytecode" is a misnomer, it compiles bytecode -> machine code and "runs" that.
"Runs machine code" is a misnomer, the CPU will translate machine code to microcode and "run" that.
It might, if the code can be optimized. There are all sorts of reasons why it might not. For example, at one point in time, a switch statement with more than 128 cases could not be optimized.

https://github.com/petkaantonov/bluebird/wiki/Optimization-k...