News for hackers. Stuff that matters.
Re:The Deno Company by threatofrain on Monday March 29, 2021 @10:23AM (#26622047)
Unfortunately Deno gave up on their most unique differentiator, the TS [runtime].
Re:The Deno Company by wperron on Monday March 29, 2021 @11:11AM (#26622908)
We most certainly did not, TypeScript is and continues to be a primary concern for us and we plan on continuing to support it as a first-class citizen of the ecosystem
Re:The Deno Company by threatofrain on Monday March 29, 2021 @11:16AM (#26623001)
Is Deno still going for TS runtime?

> Deno is a runtime for JavaScript and TypeScript that is based on the V8 JavaScript engine and the Rust programming language.

Re:The Deno Company by wperron on Monday March 29, 2021 @01:47PM (#26625533)
Insofar as we take `.ts` files seamlessly yes -- though to be clear, one does not simply "run" TypeScript. There are no runtimes for TypeScript directly (there's AssemblyScript that _looks_ like TypeScript, but isn't exactly TypeScript)

We've simply incorporated the type-checking and transpiling steps into the deno cli, making it super simple to get going, no config needed.

Re:The Deno Company by threatofrain on Tuesday March 30, 2021 @06:47AM (#26633084)
This is actually quite confusing, because

> A secure runtime for JavaScript and TypeScript.

Shouldn't require caveats, with the caveat being that there is no runtime for TS.

There is reason to believe that the extra information given from TS typings could be carried into runtime wins, and so there is absolutely pent up demand for an actual TS runtime.

Re:The Deno Company by forty on Monday March 29, 2021 @02:19PM (#26626045)
Exactly. And I guess the package still needs to be compiled to JS before deploying to production? To avoid shipping a full TS compiler on a production server which would be a crazy thing to do.
Re:The Deno Company by sneak on Monday March 29, 2021 @03:39PM (#26627171)
I don't think that would be that crazy, especially if it's in the stdlib.
Re:The Deno Company by forty on Monday March 29, 2021 @05:56PM (#26628752)
It seems like a huge amount of code and potential vulns to bring in production for no good reasons.
Re:The Deno Company by reader_mode on Monday March 29, 2021 @11:20PM (#26630964)
Why do you need a full TS compiler - you can just strip type annotations ala babel.
Re:The Deno Company by lucacasonato on Monday March 29, 2021 @10:51AM (#26622562)
No we didn't?! Where did you get this info from? Deno is made to work with TypeScript out of the box. The Deno Standard Library is written in TypeScript: https://deno.land/std. Most userland modules are TypeScript too.
Re:The Deno Company by not_knuth on Monday March 29, 2021 @11:46AM (#26623556)
If it helps, I think this is the main source of misinformation:

https://startfunction.com/deno-will-stop-using-typescript/

It featured on HN some time back:

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

Re:The Deno Company by threatofrain on Tuesday March 30, 2021 @03:13PM (#26639017)
I do find the messaging to be confusing, because what would you think I meant if I talked about the runtime of Elixir or Scala?

This is the marketing line on the front page of the Deno project:

> A secure runtime for JavaScript and TypeScript.

They are using the same term "runtime" to describe JS as well as TS. All replies here by Deno team members use the language "Typescript support" but nobody here is saying TypeScript runtime.

Re:The Deno Company by not_knuth on Wednesday March 31, 2021 @07:07PM (#26654339)
I can understand where the confusion comes from, but I think it's a matter of context. I would never have thought that they would want to build a runtime that runs TS directly. The effort would just be insane.

Hence the implied step that TS needs to first be transpiled to JS before getting executed in the runtime was always in the back of my head and I'm guessing this is the way most people think as well.

And from a black-box perspective, whether TS first gets transpiled to JS or run directly doesn't make a difference. In that sense one could argue that it is a "TS runtime". This is a petty semantics-fight I don't want to get into though and I've probably already said too much :).

If you are interested in something that gets close to a TS runtime though, have a look at AssemblyScript [0]. It compiles to WASM and tries to keep most of the syntax of TS. Very interesting project imo.

Re:The Deno Company by threatofrain on Monday March 29, 2021 @10:56AM (#26622643)
Wasn't a TypeScript runtime the original Deno selling point? Didn't the project have to pivot away from that?
Re:The Deno Company by lucacasonato on Monday March 29, 2021 @11:25AM (#26623142)
No. Nothing has changed about Typescript support since 1.0. It is just as well supported as JS. We never removed support...
Re:The Deno Company by threatofrain on Monday March 29, 2021 @11:29AM (#26623218)
So Deno is still committing to TS runtime?
Re:The Deno Company by asiachick on Monday March 29, 2021 @08:42PM (#26630118)
I feel like people are talking past each other here.

To me "TypeScript runtime" means running TypeScript in a mode that runs faster than JavaScript by actually using the type info to generate better machine code. It does not mean translating to JavaScript at runtime and running in V8.

For example at one time there was an experimental version of Chrome that had a Dart Runtime. A quick google finds this HN thread when they decided NOT to have a dart runtime

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

So can we get clear? Does Deno plan to execute TypeScript natively (not via V8 or via a heavily modified V8) or are the plans to continue compiling TypeScript to JavaScript internally and actually just run JavaScript

Re:The Deno Company by threatofrain on Tuesday March 30, 2021 @06:41AM (#26633040)
That's what I understood as well, and now I'm confused at the messaging.
Re:The Deno Company by rhencke on Monday March 29, 2021 @11:33AM (#26623285)
Y E S
Re:The Deno Company by lucacasonato on Monday March 29, 2021 @11:50AM (#26623628)
Heck yeah
Re:The Deno Company by threatofrain on Monday March 29, 2021 @01:16PM (#26625068)
I don't know where I got so misinformed. I thought Deno had stopped going for a TS runtime.
Re:The Deno Company by rhencke on Monday March 29, 2021 @01:57PM (#26625675)
Unfortunately, the words "Deno", "TypeScript", and "removal" made for good headline material, and what was effectively a design document about performance optimization[1] became misinterpreted by many as heralding the removal of TypeScript from Deno, despite the document being updated with a explanatory warning that it was a very deep technical document about a specific part of architecture, and that Deno remains completely committed to supporting TypeScript forever.

1: https://docs.google.com/document/d/1_WvwHl7BXUPmoiSeD8G83JmS...

Re:The Deno Company by forty on Monday March 29, 2021 @02:23PM (#26626101)
Was does a TS runtime means anyway? Doesn't checking types at run time rather than at compile time a pure loss?
Re:The Deno Company by threatofrain on Tuesday March 30, 2021 @03:02PM (#26638866)
No, because TS hints should also be able to translate to runtime savings.

I do find the messaging to be confusing, because what would you think I meant if I talked about the runtime of Elixir or Scala?

This is the marketing line on the front page of the Deno project:

> A secure runtime for JavaScript and TypeScript.

They are using the same term "runtime" to describe JS as well as TS. All replies here by Deno team members use the language "Typescript support" but nobody here is saying TypeScript runtime.

Re:The Deno Company by Soremwar on Monday March 29, 2021 @11:19AM (#26623033)
They had to remove it from the Deno build process so Deno internals didn't need a compiler. However TypeScript support remains untouched and receives constant updates
Re:The Deno Company by pocketgrok on Monday March 29, 2021 @11:42AM (#26623463)
I don’t remember “TS runtime” as you’re meaning it ever being pitched. I don’t think Ryan would consider that in scope for Deno unless MS wanted to collaborate on it.
Re:The Deno Company by threatofrain on Tuesday March 30, 2021 @03:10PM (#26638976)
I do find the messaging to be confusing, because what would you think I meant if I talked about the runtime of Elixir or Scala?

This is the marketing line on the front page of the Deno project:

> A secure runtime for JavaScript and TypeScript.

They are using the same term "runtime" to describe JS as well as TS. All replies here by Deno team members use the language "Typescript support" but nobody here is saying TypeScript runtime.