News for hackers. Stuff that matters.
Re:Deno raises $21M by potamic on Tuesday June 21, 2022 @03:10PM (#31827863)
Interesting how this will play out. It's an ambitious goal to consolidate client side and server side javascript ecosystems which is quite fragmented today. On the other hand, this may only increase fragmentation further by introducing another target to develop for (wait for transpilers that can automagically convert between deno and node code). I will always look at javascript as this problem kid that cannot get its shit together in life, perpetually chasing the romance of utopia.
Re:Deno raises $21M by jitl on Tuesday June 21, 2022 @03:22PM (#31828005)
There is already a system for building a NPM node package from a Deno package, called dnt (deno to node). It's maintained by some Deno team members. Here's a blog post they wrote about porting "Oak" (a deno HTTP server framework) to Node: https://deno.com/blog/dnt-oak

The nice thing about Deno conceptually, is that it's much more similar to the browser platform than node is. It uses ES6 only, has things like `fetch` built-in by default, and generally follows browser standards around interfaces like Request, Response, etc. Instead of needing a complicated build process to make Node code work on the browser, now we have a complicated build process to make Deno/Browser code work on Node. ¯\_(ツ)_/¯

Re:Deno raises $21M by capableweb on Tuesday June 21, 2022 @03:25PM (#31828045)
Not to take away from the rest of your message, I thought you wanted to get up to speed on that `fetch` is now available in nodejs core since version 17 or something like that (think it got included early this year).
Re:Deno raises $21M by jitl on Tuesday June 21, 2022 @03:27PM (#31828058)
I think this requires the `--experimental-fetch` command-line argument (per https://nodejs.org/tr/blog/release/v17.5.0/), so I don't think it qualifies as "by default".
Re:Deno raises $21M by wging on Tuesday June 21, 2022 @03:35PM (#31828160)
That's an old blog post; the current release is 18.4.0, which supports `fetch` without a command-line argument. You do get this warning the first time it's invoked, though:

    (node:340760) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
    (Use `node --trace-warnings ...` to show where the warning was created)
(some later blog posts that mention fetch being enabled-by-default and in the global scope are https://nodejs.org/en/blog/announcements/v18-release-announc... and https://nodejs.org/en/blog/release/v18.0.0/)
Re:Deno raises $21M by wdb on Tuesday June 21, 2022 @04:01PM (#31828455)
Yeah, but you could use `undici`-package for older Node version as it is being used to provide this experimental Fetch in Node 17+
Re:Deno raises $21M by melony on Tuesday June 21, 2022 @04:07PM (#31828527)
Can the same build pipelines be reused for CF/Fastly workers? The DX for workers is horrible with multiple buggy Wrangler implementations and zero observability into deployed workers.
Re:Deno raises $21M by the_gipsy on Tuesday June 21, 2022 @03:33PM (#31828142)
What about using an npm package in deno?
Re:Deno raises $21M by wperron on Tuesday June 21, 2022 @03:51PM (#31828341)
Has been possible (and surprinsingly easy) for a while through CDNs like skypack or esm.sh
Re:Deno raises $21M by yencabulator on Wednesday June 22, 2022 @08:12PM (#31843543)
Re:Deno raises $21M by the_gipsy on Wednesday June 22, 2022 @04:58AM (#31833535)
So deno runs JS? I thought it ran exclusively typescript.
Re:Deno raises $21M by whostolemyhat on Wednesday June 22, 2022 @05:34AM (#31833736)
Javascript is Typescript - TS is a superset of JS, so valid JS is valid TS, although you'd almost certainly get lint errors in dev complaining about lack of types.
Re:Deno raises $21M by ascorbic on Wednesday June 22, 2022 @03:19AM (#31832942)
Deno code is really close to browser code. If you have ESM code that runs in the browser and doesn't need access to the DOM then it's a good bet it'll run on Deno, and vice versa. They use web standards for most things, and anything proprietary is put on the Deno global object. For standards that need adapting to work outside the browser, they're working with Cloudflare and others on WinterCG, which is defining a common baseline for these non-browser runtimes.
Re:Deno raises $21M by thdxr on Tuesday June 21, 2022 @04:18PM (#31828645)
there is a group formed including Deno that will work together to try to maintain standards + compatibility

https://blog.cloudflare.com/introducing-the-wintercg/

Re:Deno raises $21M by Cthulhu_ on Wednesday June 22, 2022 @05:18AM (#31833638)
I do think Deno is a step in the right direction, by reducing the need for transpiler steps (e.g. TS to JS) and embracing JS standards instead of building their own (which is what NodeJS did, but this was in a time when JS had no standard for dependencies or per-file isolation).
Re:Deno raises $21M by danielvaughn on Tuesday June 21, 2022 @03:23PM (#31828020)
It's what I kind of love about it though - the JS ecosystem is Neverland.
Re:Deno raises $21M by rising-sky on Tuesday June 21, 2022 @07:29PM (#31830325)
It's a battle of ideals, you could have have a high entropy ecosystem that's constantly evolving and perhaps "appears" unstable, or an ecosystem that's "gotten it's shit together" and probably trends toward stagnation and apathy
Re:Deno raises $21M by jjtheblunt on Wednesday June 22, 2022 @01:01AM (#31832222)
Is Go a counterexample?
Re:Deno raises $21M by berkes on Wednesday June 22, 2022 @01:58AM (#31832530)
It is. As is Rust.

Grandparent confuses correlation for causation.

Re:Deno raises $21M by tambourine_man on Tuesday June 21, 2022 @03:25PM (#31828044)
Re:Deno raises $21M by ascorbic on Wednesday June 22, 2022 @03:21AM (#31832961)
That's not a fair reply. One of the main benefits of Deno is that they're using existing standards. It's Node that's the outlier.
Re:Deno raises $21M by ricardonunez on Tuesday June 21, 2022 @04:03PM (#31828485)
I knew that xkcd before I even clicked. They should update it and increase the number dramatically.
Re:Deno raises $21M by tambourine_man on Tuesday June 21, 2022 @04:38PM (#31828839)
It could store a cookie and increment the number every time you see the comic
Re:Deno raises $21M by keyle on Tuesday June 21, 2022 @06:07PM (#31829660)
I think we're in the 100s by now, within the javascript ecosystem alone! :)