News for hackers. Stuff that matters.
Re:Deno 1.20 by yulaow on Thursday March 17, 2022 @10:29AM (#30711573)
Honestly not and for a simple reason: there is nothing in deno that I need and can't find in node, but there are a lot of libraries in node that I need and I can't use them in deno. Simple as that
Re:Deno 1.20 by encryptluks2 on Thursday March 17, 2022 @10:33AM (#30711614)
Such as? Do you mean things in the standard library or like JS packages?
Re:Deno 1.20 by tentacleuno on Thursday March 17, 2022 @10:35AM (#30711643)
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 Deno as a concept, I can't really use it. Making a totally new JavaScript runtime with new API's and no compatibility with the current largest runtime is a very ambitious goal, and I hope they succeed with it nevertheless.

Re:Deno 1.20 by MarkBennett on Thursday March 17, 2022 @10:49AM (#30711780)
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 by afavour on Thursday March 17, 2022 @12:00PM (#30712598)
> and no compatibility with the current largest runtime

Well… the current largest runtime is web browsers and Deno has a much better story there than Node does. But agreed, it’s a long road ahead.

Re:Deno 1.20 by erikpukinskis on Thursday March 17, 2022 @10:42AM (#30711712)
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!

Re:Deno 1.20 by chaosharmonic on Thursday March 17, 2022 @11:07AM (#30711943)
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.