8 comments

  • sheept42 minutes ago
    One of the strengths of TypeScript besides its expressiveness is that it&#x27;s compatible with the massive npm ecosystem. Most packages only ship untyped JavaScript with type declarations defining the interface,[0] so realistically you&#x27;d still need a JavaScript engine if you use any packages.<p>But if you&#x27;re starting from scratch and know you won&#x27;t be using any npm packages, you might as well use AssemblyScript.[2]<p>[0]: Publishing packages in TypeScript is explicitly discouraged by Node[1]. TypeScript isn&#x27;t backwards compatible even in minor releases, and its compiler settings aren&#x27;t portable for packages.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;nodejs&#x2F;node&#x2F;blob&#x2F;main&#x2F;doc&#x2F;api&#x2F;typescript.md#type-stripping-in-dependencies" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nodejs&#x2F;node&#x2F;blob&#x2F;main&#x2F;doc&#x2F;api&#x2F;typescript....</a><p>[2]: <a href="https:&#x2F;&#x2F;www.assemblyscript.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.assemblyscript.org&#x2F;</a>
    • simonw38 minutes ago
      &gt; so realistically you&#x27;d still need a JavaScript engine if you use any packages.<p>Looks like Scriptc&#x27;s solution to that problem is that it can optionally bundle a 620KB quickjs-ng JavaScript engine if you have dependencies that need to be executed that way.
    • bbor28 minutes ago
      Those are good reasons to publish untyped libraries as a rule, sure. But the contention that those reasons outweigh the value of <i>types</i> kinda boggles the mind, ngl!
  • acmnrs58 minutes ago
    Porforr&lt;<a href="https:&#x2F;&#x2F;porffor.dev" rel="nofollow">https:&#x2F;&#x2F;porffor.dev</a>&gt; has been working towards the same goal for a while. The creator, CanadaHonk&lt;<a href="https:&#x2F;&#x2F;honk.foo" rel="nofollow">https:&#x2F;&#x2F;honk.foo</a>&gt;, is extremely talented and the project still only passes ~68% of Test262. I&#x27;m more than a little suspicious of how Vercel has made so much progress so fast, unless I&#x27;m misunderstanding the scope of this project.
    • simonw52 minutes ago
      &gt; I&#x27;m more than a little suspicious of how Vercel has made so much progress so fast<p>Coding agents. They landed 918,000 lines of code in a single week: <a href="https:&#x2F;&#x2F;github.com&#x2F;vercel-labs&#x2F;scriptc&#x2F;graphs&#x2F;contributors?selectedMetric=additions" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;vercel-labs&#x2F;scriptc&#x2F;graphs&#x2F;contributors?s...</a>
      • acmnrs49 minutes ago
        That makes sense. It also seems like this uses a lot more dependencies and tiers of compilation whereas Porforr is trying to do everything from scratch.
      • pizlonator31 minutes ago
        That explains why:<p>- the architecture is idiotic.<p>- they have zero credible perf numbers.<p>I plan to benchmark it using generally accepted methods.<p>Porffor makes careful trade offs that make sense and is benchmarked in a way that I can believe.<p>(Source: I make dynamic languages fast for a living)
        • bbor26 minutes ago
          Putting aside the whole “team of professionals putting out a product vs solo dev fine tuning their opus” of it all:<p>Can you clarify what about the architecture is ‘idiotic’? Not trying to catch you or demand a defense, just looking for a vague description. I don’t even know how to start examining the architecture of something like this.
          • pizlonator20 minutes ago
            Yeah<p>- using quickjs at all in a thing that needs perf. Quickjs is hilariously slow. Midwits use it because it has “quick” in the name.<p>- using floats for numbers and deferring int optimizations for later. Inferring ints is like half the problem of fast JS.<p>- 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.<p>The observation that languages that are even slightly dynamic need dynamic JIT opts is very old; folks figured that out in the 80s.<p>This project reeks of weapons grade AI psychosis
            • simonw12 minutes ago
              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&#x27;s pretty small (620KB). Did I miss something, are they using it outside of that purpose?
            • Tadpole91813 minutes ago
              So you don&#x27;t actually have real criticisms of the architecture at all...?
  • satvikpendem1 hour ago
    A lot of people are trying this now with AI, a native TypeScript compiler, for example <a href="https:&#x2F;&#x2F;github.com&#x2F;PerryTS&#x2F;pry" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;PerryTS&#x2F;pry</a>. It&#x27;s a compelling value proposition, TypeScript is already well typed and barring a few cases it can be turned into machine code without a JS runtime.
  • chilipepperhott36 minutes ago
    It&#x27;s difficult to ignore how the README is filled with Claudisms.
    • simonw33 minutes ago
      Looks like PRs are actively accepted. I just got rid of one of them! <a href="https:&#x2F;&#x2F;github.com&#x2F;vercel-labs&#x2F;scriptc&#x2F;commit&#x2F;c4b68dc6d9c2591b53cebef8ead290a3b81b2731" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;vercel-labs&#x2F;scriptc&#x2F;commit&#x2F;c4b68dc6d9c259...</a>
      • asdfsa325 minutes ago
        This is like putting lipstick on a pig. Give me an AI written README or tests but actually thoughtful codebase over human written readme but aislop code any day of the month
      • binary1327 minutes ago
        Perhaps they should be left as a warning to others.
  • xiaodai21 minutes ago
    how can you compile it if javascript is a valid subset of typescript? confused.
  • aabhay1 hour ago
    178kb?! What are you putting in there, a JVM?
  • casper1452 minutes ago
    I like the idea.