← Back to context

Comment by pizlonator

17 hours ago

Yeah

- using quickjs at all in a thing that needs perf. Quickjs is hilariously slow. Midwits use it because it has “quick” in the name.

- using floats for numbers and deferring int optimizations for later. Inferring ints is like half the problem of fast JS.

- rejecting inadequately annotated or too dynamic code without a whole heck of a lot of self-reflection about how unlikely that is to work out.

The observation that languages that are even slightly dynamic need dynamic JIT opts is very old; folks figured that out in the 80s.

This project reeks of weapons grade AI psychosis

As far as I can tell they pull in QuickJS (actually quickjs-ng) only in the case where the program has untyped dependencies that still need to be run by an interpreter - and they chose that library because it's pretty small (620KB). Did I miss something, are they using it outside of that purpose?

  • They will have untyped dependencies. That’s how the TS/JS ecosystem works.

    Note that “untyped dependency” means any code that says `any`.

    • They won't have untyped dependencies for situations where someone used Scriptc as a way to build a fast binary executable for some custom-written TypeScript, which was the first use-case that came to mind for me.

      Being able to build small, fast binaries without writing them in C or Rust - if you're already fluent in TypeScript - seems like a valuable capability.

      9 replies →

    • Devil's advocate - this is for the backend. You get to control your dependencies there, and I'd say Vercel controls its own stack, so they can replace deps as they go by submitting patches/slopforking projects to remove incompatible features.

  • > "As far as I can tell they..."

    This phrase I think highlights the fundamental issue for a lot of folks that would otherwise consider adopting a project like this written by humans.

> using floats for numbers and deferring int optimizations for later. Inferring ints is like half the problem of fast JS.

For a project like this, isn't it worth introducing a TS type for Ints? Since they are trying to leverage TypeScript anyway...

"This project reeks of weapons grade AI psychosis" - fantastic quote: I will shamelessly steal & use. Apologies to pizlonator