Live data from Hacker News

Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

dash.deno.com

31–40 of 49 posts

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#31
post #30

I'm a bit confused when people say "native TypeScript" and "no transpiling" about Deno, does Deno now execute TypeScript without translating it to JavaScript first?

It always did. That’s been a core feature / benefit from day 1.

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#32
post #5

What I really like about this is that you open the dependency in a web browser and see the human readable source code. No transpiling! https://deno.land/std/http/server.ts

This is generally already possible with webpack, but many/most websites i've looked at have source maps turned off. Maybe the extra compile time is too much, or they just want to disincentivize client-side reverse engineering.

It's the latter.

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#33
post #6

Deno is such a nice little scripting tool. I've been using it for devops glue and scripts lately. Native typescript, easy-as-pie dependency management. its great!

Personally I do not like the fact that it puts too much trust into DNS. DNS wasn't created with security in mind, so to say Deno is secure because it uses a permissions system while relying directly into DNS for imports to me sounds weird.

How is this any different than any other package management system? If you npm or pip install a package and import it, you’re still relying on DNS to resolve pypi or npmjs.

But with deno, if you’ve just accidentally installed some malicious squatters’ package that mimics the one you meant to use, at least you’ve got less exposure because the malicious code won’t necessarily have blanket permissions to make network calls, read files, etc. virtually any other language/package management system cannot say the same.

deno will download and cache the dependencies you import, they’re right in the project folder vs buried in a sea of node_modules. It’s super convenient to look at and inspect, if there’s any doubt or idle curiosity.

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#34
post #8

Earlier quoted context omitted.

TypeScript...

what, I'm just supposed to know that?

Nothing is to be known by everybody. But it's surprising that you don't associate typescript with deno. Unless you didn't know about deno in the first place.

Just saying because TS had some kind of popularity these days.

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#36
post #30

I'm a bit confused when people say "native TypeScript" and "no transpiling" about Deno, does Deno now execute TypeScript without translating it to JavaScript first?

It always did. That’s been a core feature / benefit from day 1.

so question - normally the thing I like about Node.js is not much context switching and ability to rerun code between backend and frontend. I can get the same thing with TS if I compile in both backend and frontend - if in Deno I don't compile and in the frontend I do are there any weird gotchas I would run into?

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#37
post #30

I'm a bit confused when people say "native TypeScript" and "no transpiling" about Deno, does Deno now execute TypeScript without translating it to JavaScript first?

It always did. That’s been a core feature / benefit from day 1.

No, it never did, Deno always have converted TypeScript into JavaScript that then gets read and executed by the browser, at least according to their own docs but maybe that has changed lately?

> At a high level, Deno converts TypeScript (as well as TSX and JSX) into JavaScript. It does this via a combination of the TypeScript compiler, which we build into Deno, and a Rust library called swc. When the code has been type checked and transformed, it is stored in a cache, ready for the next run without the need to convert it from its source to JavaScript again.

https://deno.land/manual/typescript/overview

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#38

Has anyone written a comparison of Deno Deploy and Cloudflare Workers yet?

Deno: 28 datacenters Workers: 200+ datacenters

Deno: written by a guy who regrets his previous attempt at writing a programming environment

CloudFlare: global, huge company who regrets they don't already route 100% of internet traffic

Edit: I should add, I commend both efforts, both probably improve the world more than they hurt it, just injecting a bit of humor.

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#39
post #12

Earlier quoted context omitted.

what, I'm just supposed to know that?

I think it's not unobvious if you open the link

To be fair, there is absolutely zero information about what technology is being used on the page the submission links to. Clicking the top-left icon brings you to "https://dash.deno.com/projects" which then forces you to login, still not giving any indication on what this thing is about or even written in.

I can see how you can get confused, even if I wasn't as I'm around the JS community.

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#40
post #30

I'm a bit confused when people say "native TypeScript" and "no transpiling" about Deno, does Deno now execute TypeScript without translating it to JavaScript first?

It always did. That’s been a core feature / benefit from day 1.

It's native in so far as it embeds the transpiler and hides it from the user. It is still JavaScript under the hood.

https://deno.land/manual@v1.15.3/typescript/overview#how-doe...

Post reply on HN