Live data from Hacker News

The JavaScript Oxidation Compiler

oxc.rs

61–70 of 147 posts

Re: The JavaScript Oxidation Compiler

#61
It always comes as a surprise to me how the same group of people who go out of their way to shave off the last milliseconds or microseconds in their tooling care so little about the performance of the code they ship to browsers.

Not to discredit OP's work of course.

Re: The JavaScript Oxidation Compiler

#62
I thought oxfmt would just be a faster drop-in replacement for "biome format"... It wasn't.

Let this be a warning: running oxfmt without any arguments recursively scans directory tree from the current directory for all *.js and *.ts files and silently reformats them.

Thanks to that, I got a few of my Allman-formatted JavaScript files I care about messed up with no option to format them back from K&R style.

Re: The JavaScript Oxidation Compiler

#63

Earlier quoted context omitted.

I'm going to call it: a Rust implementation of JavaScript runtime (and TypeScript compiler) will eventually overtake the official TypeScript compiler now being rewritten in Go.

? Most JavaScript runtimes are already C++ and are already very fast . What would rewriting in Rust get us?

Nothing, but it will happen anyway. Maybe improved memory safety and security, at least as a plausible excuse to get funding for it. Perhaps also improved enthusiasm of developers, since they seem to enjoy the newness of Rust over working with an existing C++ codebase. Well there are probably many actual advantages to "rewrite it in Rust". I'm not in support or against it, just making an observation that the cultural trend seems to be moving that way.

Re: The JavaScript Oxidation Compiler

#64
post #5

Earlier quoted context omitted.

they are going to use vite plus for monetization

The vite plus idea is that you'll pay for visual tools. What's odd to me is it makes their paid product kind of a bet against their open product. If their open platform were as powerful as it should be, it would be easy to use it to recreate the kinds of experiences they propose to sell. The paradox gains another layer when you consider that their whole mission is to build tools for the JavaScript ecosystem, yet by m…

> they are betting that JS-the-language is so broken that it cannot even host its own tools.

Evan wallace proved it by building esbuild. this is no longer bet.

> If their open platform were as powerful as it should be, it would be easy to use it to recreate the kinds of experiences they propose to sell.

you would be surprised to know that tech companies may find it cheaper to pay money than developer bandwidth for stuff beyong their core compentency.

dropbox was also considered to be trivially implementable, but end users rarely try to re-invent it.

Re: The JavaScript Oxidation Compiler

#65
post #32

Earlier quoted context omitted.

sounds impossible to even index and classify files so fast. What hardware?

I’m assuming they meant 100kloc rather than 100,000 files of arbitrary size (how could we even tell how impressive that is without knowing how big the files are?)

[deleted]

Re: The JavaScript Oxidation Compiler

#66
post #62

I thought oxfmt would just be a faster drop-in replacement for "biome format"... It wasn't. Let this be a warning: running oxfmt without any arguments recursively scans directory tree from the current directory for all *.js and *.ts files and silently reformats them. Thanks to that, I got a few of my Allman-formatted JavaScript files I care about messed up with no option to format them back from K&R style.

Git undo?

Re: The JavaScript Oxidation Compiler

#67
post #64

Earlier quoted context omitted.

The vite plus idea is that you'll pay for visual tools. What's odd to me is it makes their paid product kind of a bet against their open product. If their open platform were as powerful as it should be, it would be easy to use it to recreate the kinds of experiences they propose to sell. The paradox gains another layer when you consider that their whole mission is to build tools for the JavaScript ecosystem, yet by m…

> they are betting that JS-the-language is so broken that it cannot even host its own tools. Evan wallace proved it by building esbuild. this is no longer bet. > If their open platform were as powerful as it should be, it would be easy to use it to recreate the kinds of experiences they propose to sell. you would be surprised to know that tech companies may find it cheaper to pay money than developer bandwidth for st…

> esbuild

Another example is the TypeScript compiler being rewritten in Go instead of self-hosting. It's an admission that the language is not performant enough, and more, it can never be enough for building its own tooling. It might be that the tooling situation is the problem, not the language itself, though. I do see hopeful signs that JavaScript ecosystem is continuing to evolve, like the recent release of MicroQuickJS by Bellard, or Bun which is fast(er) and really fun to use.

Re: The JavaScript Oxidation Compiler

#68
post #20

I wonder why did it take so long for someone to make something(s) this fast when this much performance was always available on the table. Crazy accomplishment!

Because Rust makes developers excited in a way that C/C++ just doesn't.

We had many languages that are faster that are not c/c++.

Compare Go (esbuild) to webpack (JS), its over 100x faster easily.

For a dev time matters, but is relative, waiting 50sec for a webpack build compared to 50ms with a Go toolchain is life changing.

But for a dev waiting 50ms or 20ms does not matter. At all.

So the conclusion is javascript devs like hype, and flooded Rust and built tooling for JS in Rust. They could have used any other compiled languge and get near the same peformance computer-time-wise, or the exact same time human-timewise.

Re: The JavaScript Oxidation Compiler

#69
post #62

I thought oxfmt would just be a faster drop-in replacement for "biome format"... It wasn't. Let this be a warning: running oxfmt without any arguments recursively scans directory tree from the current directory for all *.js and *.ts files and silently reformats them. Thanks to that, I got a few of my Allman-formatted JavaScript files I care about messed up with no option to format them back from K&R style.

These files are under version control, right? Or backed up. Right?
Post reply on HN