Hacker News new | ask | show | jobs
by quotemstr 562 days ago
This is not a compiler. It is doing no program translation. No register allocation. No parsing. No linking. It in no way resembles a compiler. Not every program that produces an executable file is a compiler just because some programs you may have heard of, like gcc, are in fact compilers.

I wish the JS universe would stop inventing new and wrong names for things.

(That said, this thing is at least using postject for actual insertion of the payload blob into the target executable, and based on its README, postjecth as the good taste to embed data as PE/ELF/Mach-O sections instead (as Bun does) of just YOLOing the attachment with cat.)

1 comments

I totally understand your point - Astra doesn’t do register allocation or full parsing, so strictly speaking, it’s not a compiler in the traditional sense.

I used the term "compiler" because for many developers, it’s strongly associated with "turning source code into a single binary." That’s what Astra does at a practical level - even if it's technically just bundling and embedding into a node executable using SEA and postject.

> it’s strongly associated with "turning source code into a single binary."

Using things because they sound nice without thinking about whether they make sense is pretty much the whole JavaScript community. :)

This whole thread was uncalled for honestly. It takes source, it makes an exe, that meets the definition for compiler to me. Your pedantry is not useful.
How would you define the difference between a compiler and a linker?
This is just dishonest marketing then.