39 ms·
Deno on MDN
- staticelf 5y agoThat is great, good work you guys!
- stepbeek 5y agoThis is really cool! Can anyone explain why deno has made it to MDN but node.js has not?
- jamil7 5y agoI believe it's because Node.js has never made an effort to implement web APIs nor has it been a goal of the project. Edit: as others have pointed out, APIs that are implemented in Node.js are listed on MDN.
- lucideer 5y agoWorth noting, informationally, it is a goal of the Node.js project to implement web APIs. Deno is just way ahead as it doesn't have to worry about backward compat: it's a much tougher challenge for the Node.js guys, but they are working on it.
- mirekrusin 5y agonodejs is there as well, ie. [0]. Maybe it's missing for apis they don't provide? ie. fetch [1] does not list nodejs. [0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... [1] https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
- deleted 5y ago[deleted]
- opheliate 5y agoNode is on a number of MDN pages (e.g: [0]). I think it's just APIs that Deno supports and Node doesn't (e.g: fetch) that are linked here, which is why it's not in their support matrices. 0: https://developer.mozilla.org/en-US/docs/Web/API/console/log https://developer.mozilla.org/en-US/docs/Web/API/console/log
- chrismorgan 5y agosetTimeout is linked here, https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWor..., and shows partial support (with explanations) for Node.js.
- styfle 5y agoAlso see TextEncoder or WebAssembly which shows the version support of Node.js and others https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder#browser_compatibility https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder... https://developer.mozilla.org/en-US/docs/WebAssembly#browser_compatibility https://developer.mozilla.org/en-US/docs/WebAssembly#browser...
- lucideer 5y agonode is on MDN for all browser APIs it implememts, there's just not many of them. Deno has much higher browser compat. It's worth noting this isn't Node's fault: most Node APIs existed before there were browser equivalents and adding browser compat now is much harder for Node than for Deno which is starting from scratch.
- timdaub 5y ago> Deno has much higher browser compat. Is this a fact or a personal feeling? Any links to back up this statement?
- lucacasonato 5y agoThis is a fact. Import maps, fetch, ESM + web import semantics, localstorage, WebGPU, WHATWG streams, WebCrypto. Deno runs the shared web platform test suite: https://deno.co/wptfyi https://deno.co/wptfyi. You can also just look on MDN now and see which APIs are implemented in Deno compared to Node :-)
- timdaub 5y agoIs import maps considered an accepted proposal [1]? What's the point of implementing APIs like WebGPU and localstorage in a non-browser environment? I get WHATWG streams, esm, fetch and WebCrypro though. - 1: https://github.com/WICG/import-maps https://github.com/WICG/import-maps
- vorticalbox 5y agoLocal storage let's you save state across process restarts and session storage let's you share data across worker threads You could save the state of a discord bot across restarts for example.
- norman784 5y agoAbout webgpu > The WebGPU API gives developers a low level, high performance, cross architecture way to program GPU hardware from JavaScript. > GPUs allow programmers to make some numerical algorithms highly parallel. This is useful beyond rendering graphics and games. Effective use of GPUs in Machine Learning has enabled more complex neural networks - https://deno.com/blog/v1.8#experimental-support-for-the-webgpu-api https://deno.com/blog/v1.8#experimental-support-for-the-webg...
- earthboundkid 5y agoBecause Node is the new IE.
- jmuguy 5y agoI don't know why but I had to read this blog post about six times before I realized that its about Deno being added to the compatibility chart (far right in example) shown on MDN.
- avinassh 5y agoI noticed something odd. The image on the post is this - https://deno.com/deno-on-mdn/table.png https://deno.com/deno-on-mdn/table.png This is the image used in og meta tags - https://deno.com/deno-on-mdn/header.png https://deno.com/deno-on-mdn/header.png but this one includes a visual cue and it becomes immediately clear that Deno is added to the chart
- jmuguy 5y agoI need something for Monday mornings that shows me the content of the OG tags on articles so my lizard brain has an easier time.
- oauea 5y agoCan someone "sell me" on Deno? I'm still not sure why I should be interested in this versus for example NodeJS. Most of the features it lists seem rather dubious. > Secure by default. No file, network, or environment access, unless explicitly enabled. Great, but we're talking about server software so the first thing any project is going to do is enable all of that. And it's not like you can trust this on the server, you'd still need to sandbox to process if you truly want isolation. > Supports TypeScript out of the box. Okay so it's coupled to Microsoft's take on Javascript. What about Flow or any of the other compiles-to-Javascript languages? What's wrong with using Babel with sourcemaps? > Ships only a single executable file. I guess that could be convenient but I'm struggling to think of a situation where installing node has ever been a problem. > Has built-in utilities like a dependency inspector (deno info) and a code formatter (deno fmt). Is this not the job of the package manager? Or does deno force you to use itself as the package manager? Will that not just bring about another npm situation in a few years? I feel like I'm clearly missing something with how excited everyone is about deno, but I have no idea what it is.
- ecmascript 5y agoHonestly for me it is: - Follows the ecmascript standard and supports browser apis - No npm, no Microsoft lock-in - So far, no political bs like node has had
- FaisalAbid 5y agoIs Deno ready for production? What limitations have you run into?
- lucacasonato 5y agohttps://news.ycombinator.com/item?id=28131876 https://news.ycombinator.com/item?id=28131876
- ecmascript 5y ago> Is Deno ready for production? Yes. > What limitations have you run into? Libraries that exist for node that can't easily be ported over that don't yet exist for Deno. But that is basically it. In the beginning it was a bit hard to keep up with the rapid changes as well but that seems like a positve thing anyway.
- deleted 5y ago[deleted]
- binarynate 5y agoI'm a long-time Node user but decided to use Deno for a personal project and found that it's is a pleasure to work with. Some highlights: - TypeScript works out-of-the-box without configuration - includes modern browser APIs like fetch() without needing to import additional dependencies - The Deno-specific APIs (like Deno.readTextFile()[0]) are Promise-based and have intuitive interfaces - The Deno standard library[1] reduces the need for 3rd party dependencies, since it covers a lot of cases where one would be needed I haven't yet used Deno in a commercial product, but I believe I will in the future because Deno seems ready for primetime. [0]https://doc.deno.land/builtin/stable#Deno.readTextFile [1]https://deno.land/manual/standard_library
- timdaub 5y ago> - The Deno-specific APIs (like Deno.readTextFile()[0]) are Promise-based and have intuitive interfaces require("fs").readFileSync("hello.txt").toString() // toString because it's a buffer by default
- steve_adams_86 5y agoDo you know if Deno chose to use strings instead of buffers to be more consistent with the browser? I know buffers can be faster, but overall I like that readTextFile is returning a string here. I suspect most use-cases ultimately want to handle the output as a string.
- deleted 5y ago
- andrewmcwatters 5y agoImagine building a business and putting years of labor into a suite of intellectual property which makes you hundreds of thousands of dollars then they guy who built what your business runs on came out with something new to replace it and said hey now you can import using URLs and by default have access to nothing unless you ask for it. OK? Reminds me of how Rome is doing. You can’t reinvent this stuff over and over again and ignore that at the end of the day there are people who use this stuff to make money. Node.js is already good enough. I think if people end up using Deno it’ll be because of things people need to use that you can’t get or polyfill into Node.js today. But it won’t be because of new behaviors.
- TechBro8615 5y agoStop building new stuff?
- danr4 5y agoYou can’t reinvent this stuff over and over again and ignore that at the end of the day there are people who use this stuff to make money. Another way to say that: You can't build new awesome free stuff because other people already use your old awesome free stuff to make money. Sounds ridiculous. They can and should keep making new stuff, for the next generation of people and apps, whether to use it or not is an individual/organizational choice.
- andrewmcwatters 5y agoIf I told you I’m giving you an annual $600,000 budget to build a small team and write software, and you chose Deno and had to reinvent JavaScript libraries that already existed for years, I’d fire you for being negligent with funds. What you’re saying sounds ridiculous.
- DonHopkins 5y agoGood thing the MIT AI Lab couldn't fire RMS for being negligent about not continuing to maintain TECO Emacs, which so many people were using every day all over the ARPANET for years, and going on to learn from its mistakes and making Gnu Emacs with LISP implemented in C instead of TECO implemented in PDP-10 assembly. Or are you still using WordStar on CP/M, so you don't care about all that progress stuff?