Live data from Hacker News

Deno 1.20

deno.com

11–20 of 60 posts

Re: Deno 1.20

#11

Earlier quoted context omitted.

Such as? Do you mean things in the standard library or like JS packages?

Probably both. You can't use NPM (though you can use one of those online CDN's like unpkg) and the packages you can use probably don't work, as Deno doesn't support Node's API at all. It doesn't support any Node-specific packages like 'fs' or 'crypto' either. Unless you're writing a totally new application and don't need anything (even retrospectively) from NPM, Deno probably won't work for you. As much as I like Den…

You might want to consider giving Deno another shot, as they've spent a lot of time on building node comparability since v1.15 specifically to address these problems.

Many of the APIs you mentioned are supported already, while a few require the unstable flag...

https://deno.land/std/node/README.md

In my experience I've been able to use many node packages unmodified recently.

Re: Deno 1.20

#12
post #2

Has anyone tried switching from Node to Deno in an existing project? I'm personally very interested in Deno but it's hard to find a greenfield project to try it out and writing toy programs is not giving me enough insights of how much better/faster Deno is.

Not switching from Node, but I've been building some Typescript libraries that are mainly for the browser and when building command line app versions for them, Deno worked out of the box while Node has hiccups (no Fetch, no Websockets, etc) and since Deno works so well I just never added Node support.

Small aside: if you ever plan on doing Deno-first libraries, https://deno.land/x/dnt@0.20.1 is a library that takes a Deno project and builds an entire Node project with shims (sadly only for Deno-specific stuff, so no node-fetch or ws) so you can publish to NPM.

Re: Deno 1.20

#13
post #2

Has anyone tried switching from Node to Deno in an existing project? I'm personally very interested in Deno but it's hard to find a greenfield project to try it out and writing toy programs is not giving me enough insights of how much better/faster Deno is.

> ...enough insights of how much better/faster Deno is We moved our Deno project to Node because of lack of lower-level APIs on Deno's Conn interfaces [0][1], but otherwise for our use-case (lots of tiny HTTPS connections) Deno absolutely blew Node out-of-the-water. Even at p50 (100tps) Deno (v1.18) was 10x faster than Node (v17.x) [2] RAM wise, I found Deno (v1.18+) use 10M or so higher for the same code-base. DevEx…

[deleted]

Re: Deno 1.20

#14

Earlier quoted context omitted.

Such as? Do you mean things in the standard library or like JS packages?

I was playing with Deno for a side project about 6 months ago but stopped because none of the WebRTC handshake modules were supported. I tried to push through and port one of them, but the base Node Socket library was missing most of the methods. Deno looks awesome though, I can’t wait to take another look when it’s a little more mature!

It's a pretty ergonomic way of scripting smaller tasks, at least. The first time picked it up for the sake of a meaningful experiment I stopped short of actually deploying a full project on it -- the key limitation being that I couldn't find anything comparable to Mongoose -- but did end up building a companion tool that turned out to be pretty useful, and for stuff like API calls and bulk file manipulation I would reach for it every time.

Specifically, it was a minimal simfile parsing/conversion/seeding tool, as part of a DDR workout tracker I was working on a while ago. (Everything from COVID to a mouse problem in my workspace kind of undercut me doing the cardio I had built it to track, so it sort of stagnated :-/ But the tooling itself was pleasant enough here.) Basically it had three core pieces of functionality:

- Parsing .sm files and converting them to .ssc (the former doesn't label its fields, so doing this first simplified everything else)

- Extracting metadata from simfiles in .ssc format and exporting it to JSON

- Uploading extracted metadata to the accompanying API

This is something of a moot point since it's been added to Node now, but at the time having access to server-side `fetch()` also saved me some frontend work, because then all of my client-side requests became isomorphic and I could just mock out what I was eventually going to need for my UI without actually having to make any other decisions about how the UI was going to be structured.

Re: Deno 1.20

#16
I love working with JS/TS (front, back, tooling), but find Node more and more annoying (especially bothered with packaging a release for production, lately).

So naturally I tried Deno lately.

Some things mentioned in other comments were really nice, but the lack of retrofit with the Node ecosystem is a shame. So many years and efforts and community growth are sitting right next door only to be ignored...

I can't understand that.

Re: Deno 1.20

#17
post #2

Has anyone tried switching from Node to Deno in an existing project? I'm personally very interested in Deno but it's hard to find a greenfield project to try it out and writing toy programs is not giving me enough insights of how much better/faster Deno is.

I'm an existing typescript user but I just can't see a reason to use Deno.

Depending on the NPM repository CDN is less worrisome than depending n different CDNs.

Including all my dependencies unilaterally (aka deps.ts) seems like a patch upon a bad decision.

Making the server side runtime environment pretend to be or adopt aspects of the web browser client environment seems like a misguided direction in my wisdom, because it compromises the whole runtime and you it'll always eventually fall short, as everything that copies does.

With everything going toward serverless, support there is essential and Deno just doesn't have it.

Lack of backward compatibility with other libraries means an uphill struggle, likely resulting in a lot of ported and unmaintained packages.

I sense that Deno is primarily being pushed by developers who cut their teeth in React-based code camps who are looking for (understandably) a wave to ride into "full stack" software development.

For all these reasons, I regard Deno as dubious for now. I say all of this narrowly through my own experience and perception.

Re: Deno 1.20

#18
Looks promising and I find the Deno project very exciting!

What is the recommended way of running Deno in production on a multi core machine? In node there is the cluster module that allows one process to run a cpu intensive task while the other processes to continue answering web requests.

This is good for stuff like excel exports as an example on larger datasets. Obviously you could run some kind of cronjob in the background but it seems like I may a bit confused about Denos architechture regarding this subject. I am afraid of switching to Deno because of this since I often want to do these kind of operations without having to do the hassle of breaking the app up for simple exporting/importing operations.

Also, will Deno really utilize other cores on the machine? It seems like if you have a machine with multiple cores Deno won't use the full potential of the hardware or am I just confused about this subject?

Re: Deno 1.20

#19
post #4
post #2

Has anyone tried switching from Node to Deno in an existing project? I'm personally very interested in Deno but it's hard to find a greenfield project to try it out and writing toy programs is not giving me enough insights of how much better/faster Deno is.

I have enough trouble upgrading Node versions in serious projects. I don’t think it makes sense to convert a big existing project.

What kind of problems did you encounter ? I recently switched from v12 to v16 without any problems on a decent sized project. I was expecting to break a few things and surprised how smooth it all went.

Re: Deno 1.20

#20
What is the reality of Deno now?

I remember when Deno was being developed it was promoted like how Web3 is being promoted right now. But browsing through hundreds of job posts I have not seen anyone having Deno as a requirement. Everyone wants Typescript+Node and that's about it.

Size of community, enterprise use and approachability as the first framework to learn. I think these 3 factors determine the success of any programming related stuff. Performance on the other hand is what people talk about. But nobody cares about performance irl.

Post reply on HN