Live data from Hacker News

The JavaScript Oxidation Compiler

oxc.rs

71–80 of 147 posts

Re: The JavaScript Oxidation Compiler

#72

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.

People shaving off the last milliseconds or microseconds in their tooling aren't the same people shipping slow code to browsers. Say thanks to POs, PMs, stakeholders, etc.

Re: The JavaScript Oxidation Compiler

#73
post #20

Earlier quoted context omitted.

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 c…

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

It absolutely does:

https://mail.python.org/pipermail/python-dev/2018-May/153296...

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

Re: The JavaScript Oxidation Compiler

#74

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!

It takes a good programmer to write it, and most good programmers avoid JavaScript, unless forced to use it for their day job. in that case, there is no incentive to speed up the part of the job that isn't writing JavaScript.

> It takes a good programmer to write it, and most good programmers avoid JavaScript, unless forced to use it for their day job.

Nonsense.

Re: The JavaScript Oxidation Compiler

#75
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.

Do you not use a VCS?

Re: The JavaScript Oxidation Compiler

#76
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.

> running oxfmt without any arguments recursively scans directory tree from the current directory for all .js and .ts files and silently reformats them

I've got to say this is what I would have expected and wanted to happen. I'd say it is wise to not run tools designed to edit files on files you don't have a backup for (like Git) without doing a dry-run or a small scope experiment first.

Re: The JavaScript Oxidation Compiler

#77
post #8

This compiles to native binaries, as opposed to deno which is also in rust but is more an interpreter for sandboxed environments?

If you want native binaries from typescript, check my project: https://tsonic.org/

Currently it uses .Net and NativeAOT, but adding support for the Rust backend/ecosystem over the next couple of months. TypeScript for GPU kernels, soon. :)

Re: The JavaScript Oxidation Compiler

#78
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.

This is user error. oxfmt did what you asked it to do.

Re: The JavaScript Oxidation Compiler

#80
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.

> running oxfmt without any arguments recursively scans directory tree from the current directory for all .js and .ts files and silently reformats them I've got to say this is what I would have expected and wanted to happen. I'd say it is wise to not run tools designed to edit files on files you don't have a backup for (like Git) without doing a dry-run or a small scope experiment first.

While I can get behind things such as "use version control," "use backups", etc. this is definitely not what I'd expect from a program run without arguments, especially when it will go and change stuff.
Post reply on HN