18 ms·
Deno in 2023
- coldtea 3y ago[flagged]
- arnorhs 3y agoThis is a low effort comment, overly negative and provides no value to the discussion.
- vallode 3y agoTo be fair to the original commenter I believe they were making a Mean Girls (2004) reference. The line in question is "Stop trying to make fetch happen. It's not going to happen.". Likely just a funny quip and nothing serious :)
- bmulholland 3y agoYes, and that’s actually the problem with the comment. HN guidelines are for substantive discussions, not funny quips. There’s a few HN comment guidelines [1] that could apply here, but the most directly applicable one is “Omit internet tropes.” [1] https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- coldtea 3y agoIt's both a throwaway quip, and a real sentiment: I think that Deno is not getting any traction, surely not the intended traction expected when it was created (and by Node's creator no less), and it will just keep hanging on in the fringe. Besides, it wouldn't hurt HN to loosen up a little once in a while. You know, obsessive total adherence to rules is never a good thing - even to the law.
- hitekker 3y agoIf the original comment was funny,I wouldn’t have downvoted. But it’s just low effort, extremely online snark.
- user432678 3y agoGive them a break, competition is clearly a good thing in this domain. At least drives node.js from stagnation.
- coldtea 3y agoDoes it though? I see Node developing quite quickly by itself, even though Deno doesn't have any real adoption to give them anything to worry about. Sure, competition is good. But I've seen a lot of devs get caught into eternally fringe doomed projects. Which is fine if you understand what it is, but can hurt you if you think you're making a sure bet on a soon-to-be major platform.
- rtcode_io 3y agoDeno Deploy dropped from 35 GCP regions to just 12: https://news.ycombinator.com/item?id=39127598 https://news.ycombinator.com/item?id=39127598
- vorticalbox 3y agosure but is that a bad thing? this regions probably see next to or zero use and cutting them frees up money to be used on other things.
- qprofyeh 3y agoThey’re operating like a startup, which like you say should be perfectly fine. Can’t pretend like a giant when you don’t have the bank account for that. Though they’re also selling a developer ecosystem. A lock-in. Are you willing to bet your company’s own software tools on a vendor that could go bankrupt from their other (hosting) business? The question is if Deno hosting dies, will Deno as a platform still thrive?
- vorticalbox 3y ago> The question is if Deno hosting dies, will Deno as a platform still thrive? that I am unsure about, a large part of the appeal at least for me is the deno deploy. URL imports are a bit of a hassle when you are trying to get them from say a private github repo.
- soulofmischief 3y agoDeno supports package.json now https://docs.deno.com/runtime/manual/node/package_json https://docs.deno.com/runtime/manual/node/package_json
- PoignardAzur 3y agoI think by now accusations of lock-in are a bit shaky. They're providing self-hosted alternatives for all the features of their ecosystem (and it's all open-source anyway).
- nerder92 3y agoI'm really interested in deno, but I didn't yet have the chance to test it properly. I would love for this year to see the runtime support for either Google Cloud Functions or AWS Lambdas
- olestr 3y agoYou can join the waitlist in the sneak peak of JSR linked in the end of the article: https://jsr.io/waitlist https://jsr.io/waitlist I'm curious on what the Deno team is building here.
- rapnie 3y agoHmm, curious too. Maybe, given the few hints, an alternative to npmjs.com registry.
- esperent 3y agoJSR = JavaScript Registry (from the site). It seems fairly clear this is a package registry, i.e. an NPM alternative.
- simultsop 3y agoBut they promoted they will not need one at any time, to extent they will never build one. There was only deno.land as a point to discover libraries or what community builds.
- skybrian 3y agoYep, but it seems they learned something from the experience? Hopefully it will be closer to how Go does it.
- andyferris 3y agoI assume it's an npm competitor? Likely with a different technical design.
- throwitaway1123 3y agoLike others have said, it's going to be a new package registry. It was unofficially announced at SeattleJS Conf 2023: https://www.youtube.com/watch?v=Dkqs8Mcxbvo&t=424s https://www.youtube.com/watch?v=Dkqs8Mcxbvo&t=424s
- 3y ago
- tarruda 3y agoWhat is the state of Deno's node.js compatibility when compared to Bun?
- ehhthing 3y agoDeno wasn't originally designed to be node compatible, but I think they realized nobody would want to switch to it because node is so prevalent already...
- tarruda 3y agoI think the main appeal of projects like Bun and Deno is the built-in tooling for building/bundling modern typescript applications without requiring dozens of dependencies for even a basic hello world app. If node.js decided to include functionality similar to what is available on Bun/Deno, both projects would probably lose traction quickly.
- incrudible 3y agoNot sure what modern typescript means, but you only need one or two dependendencies (esbuild and tsc) unless you are doing something more involved, in which case deno alone might not work either.
- vorticalbox 3y ago> If node.js decided to include functionality similar to what is available on Bun/Deno, both projects would probably lose traction quickly. I believe this too. The big appeal for me is not having to install typescript, eslint, jest AND then set up all the configs. deno has nice defaults, though the importing via URLS and browser compatible API do make deno very tempting
- pjmlp 3y agoExcept they are playing catch up with what Microsoft says Typescript is supposed to mean. I rather have pure JavaScript, or use the Typescript from source, without having to figure out if a type analysis bug is from me, or the tool that is catching up to Typescript vlatest.
- wldlyinaccurate 3y agoI deployed my first non-trivial Deno app to production in 2023. There were some teething issues with learning to keep the lock file in sync, especially in a repo with multiple entry points each with separate lock files. Some of the granular permissions stuff didn't work how I expected, to the point where I almost gave up and just allowed network to/from all hosts. But overall the experience was good, and I have positive feelings towards Deno. I look forward to seeing where they take it.
- tracker1 3y agoI tend to put a shebang line on Deno scripts intended to be run... This has the permissions right there in the script. Alternatively, like in my ~/bin, I'll put a shell script without a file extension to make it easier on myself.
- deleted 3y ago[deleted]
- msoad 3y agoIf Deno is looking for more growth they should make it super easy to run Next.js with it
- globalise83 3y agoDeno has also created a Next.js competitor, Fresh. I found it a few weeks ago and am starting to go through the docs, looks like a good overall concept. https://fresh.deno.dev/ https://fresh.deno.dev/
- crubier 3y agoI actually found this worrying, since it means they are not committed to make NextJS work nicely, quite the opposite they now have incentive to not make it happen
- bartlomieju 3y agoBartek from the Deno team here - we are actively working on improving experience running NextJS projects in Deno.
- ultrakorn9968 3y ago[dead]
- cryptonym 3y agoNextJS doesn't have an incentive to run on anything else than Vercel. I wouldn't blame this on Deno.
- MadSudaca 3y agoI know it sound silly but I love the aesthetic behind Deno's brand, it makes me want to use it for one project or another. Node.js is so old now. it's reliable but boring. I want something new, bold, and daring. Node.js is not it, although it was ~11 years ago. It's interesting how our views change.
- smokel 3y agoThis does indeed sound silly. If people were to use proper arguments to select technology, we wouldn't be in this mess in the first place. Unfortunately, most of us are more susceptible towards aesthetics, novelty, and admiration of self-proclaimed software gurus. Thanks for being open about this and sharing. It would have been nice if I had realized this aspect of technological evolution earlier in my career. I might have spent more time learning about marketing than about the actual technology.
- ffsm8 3y ago> If people were to use proper arguments to select technology, we wouldn't be in this mess in the first place. The ultimate killer argument is always "does it improve my CV?" CV driven development is usually the reason for questionable technology choices
- MadSudaca 3y agoNo worries, it's never too late to learn important truths about human nature!
- Kinrany 3y agoNovelty is good. Not every new thing is an improvement, but every improvement is a new thing.
- Aaronmacaron 3y agoI'm not sure if this is real or a subtle parody of the stereotypical JS/node user.
- 3y ago
- ecmascript 3y agoI have a deno app in production and it is working just fine. However, I still think node is superior when you self host when you are not using docker. Deno afaik still doesn't support any way of running one process for every CPU like the cluster module in Node.js. I like to run my shit on the metal and without Docker and it feels like Deno was designed to run on Docker or some other kind of virtual containerized environment. However, you can run it on node thanks to pm2, but I guess why even run on Deno in the first place?
- ihateolives 3y agoOTOH Deno can produce self-contained binaries. For me this is a plus, it makes distribution so much easier. I don't care if it's 100MB, I just want to have one file which I can throw on my server,
- ecmascript 3y agoSo does node.js nowadays. But yeah, I agree it is an awesome feature!
- JimDabell 3y agoThat’s overstating it a bit. As you can see, it’s an experimental, tedious, manual process with Node: > Stability: 1 - Experimental: This feature is being designed and will change. — https://nodejs.org/api/single-executable-applications.html https://nodejs.org/api/single-executable-applications.html Deno, on the other hand, has it as a supported, complete feature that’s very easy to use: https://docs.deno.com/runtime/manual/tools/compiler https://docs.deno.com/runtime/manual/tools/compiler
- yencabulator 3y agoThat feature has a bad history of refusing to run due to unsupported things you're using, just like deno bundle.
- Kyiro 3y agoYou can do it using Workers, just like you would in a web browser
- dingdingdang 3y agoWould love to see the compile situation fixed - the generated executables are ~90MB+ at this stage and do now allow compression without erroring out. Deploying ala Golang is not feasible at that level but could well be down the line if this dev branch is picked up again! The exe output grew from from ~50MB to plus ~90MB from 2021 to 2024: https://github.com/denoland/deno/discussions/9811 https://github.com/denoland/deno/discussions/9811 which mean Deno is worse than Node.js's pkg solution by a decent margin.
- ijustlovemath 3y agoI'm not sure what your requirements are, but I've had a good amount of success with converting Node.js libraries to native libraries by embedding a CommonJS module into the binary, then running the actual code through QuickJS. Much smaller binaries. If you really are pressed for space, you could use upx, or store 7z compressed code and embed the 7z library to decompress before passing it along to QuickJS. Here's a proof of concept: https://github.com/ijustlovemath/jescx https://github.com/ijustlovemath/jescx
- dns_snek 3y agoIsn't QuickJS order(s) of magnitude slower than V8? That doesn't seem like a practical tradeoff to make outside of embedded.
- ijustlovemath 3y agoLike I said, I wasn't sure of their requirements. I can say QuickJS is orders of magnitude easier to embed and understand than V8, which is why I adopted it for my use case.
- factormeta 3y agoThanks for sharing that info! Would like to see more runtime independent JS project such Hono. Although I'm not sure if it supports QuickJS.
- 3y ago
- asim 3y agoIs anyone a user of Deno KV? What's your experience been like?
- aostiles 3y agoI've been using it to build a dynamic blog/newsletter. Local DX with https://github.com/kitsonk/kview https://github.com/kitsonk/kview has been nice.
- skybrian 3y agoHaven't deployed it yet, but the API seems decent when doing local development. It's a bit low-level compared to a SQL database; you're building your own indexes and need to write transactions to update them atomically along with the main record. (But it does have transactions, so it's reasonable.) It reminds me of App Engine datastore, back in the day. There are some fairly tight limits. (64k for records.) I wouldn't use it for storing images or larger files. Not sure what I'm going to do for full-text search. But I've built simple search engines from scratch before.
- brodo 3y agoI use Deno as a Javascript/Typescript-REPL. It has syntax-highlighting built-in.
- bmwolf102990 3y agoInterestingly, Deno and Node were both originally developed by the same person, Ryan Dahl. Why did he feel the need to build a competitor to his own product? Whatever features are supposed to make Deno "better" than Node...why didn't he just work on integrating them into Node? I understand that sometimes changes to software can be infeasible, especially if they are large fundamental/foundational changes, but this is still a bit of a head scratcher to me.
- Gare 3y agoIt is explained here: https://choubey.gitbook.io/internals-of-deno/introduction/history-of-deno https://choubey.gitbook.io/internals-of-deno/introduction/hi...
- smt88 3y agoHe couldn't work them into Node because he doesn't control Node.
- pavlov 3y agoWhy did Bill Gates have a team build Windows NT when he already had the extremely successful MS-DOS? Sometimes you do need to reset the foundations, then build compatibility on top.
- satvikpendem 3y agoHe explains why in this video: https://youtu.be/M3BM9TB-8yA https://youtu.be/M3BM9TB-8yA He also can't unilaterally change them in NodeJS because at that point it wasn't a solo project of his anymore.
- promiseofbeans 3y agoHe explains it in this talk, which is also when Deno was first announced: https://www.youtube.com/watch?v=M3BM9TB-8yA https://www.youtube.com/watch?v=M3BM9TB-8yA
- ogoffart 3y agoI'm interrested in the WebGPU feature. With Slint [1] we're working on a framework which allow to make a desktop GUI in Javascript/Typescript, without bringing a browser/webview. Currently, we do it by using binaries through napi-rs so we can bring in a window using the platform native API. And then we do some hack to merge the event loops. But if Deno supports bringing up a window directly, this means we can just ship wasm instead of native binary for all platform. And also I hope event loop integration will be simplified. Although we'd also need more API than just showing a window (mouse and keyboard input, accessibility, popup window, system tray, ...) [1] https://slint.dev https://slint.dev Edit: I got excited a bit too early. The WebGPU feature doesn't include the API to launch a Window. One still need to rely on an extra library binary.
- FrostKiwi 3y agoBig fan of custom rendering approaches, but wouldn't such a Design system sidestep any and accessibility tools? Nothing for screenreader to hook into. Text and interfaces would be neither native nor DOM based.
- pygy_ 3y agoSlint uses https://github.com/AccessKit/accesskit https://github.com/AccessKit/accesskit to provide cross-platform a11y.
- mborch 3y ago> A program run with Deno has no file, network, or environment access unless explicitly enabled. You can do this using containerization technology, no need to invent this per language runtime.
- fabiospampinato 3y agoYes but now in non-linux systems you have the pretty large overhead of that.
- mborch 3y agoOn MacOS, you have built-in sandboxing via "sandbox-exec" which shouldn't incur any noticeable overhead. It's used by Chrome, Bazel, etc. Not sure what's available on Windows.
- int_19h 3y agoWindows has a lot of things in this department. https://github.com/microsoft/Windows-Sandbox-Utilities https://github.com/microsoft/Windows-Sandbox-Utilities sounds similar to what you describe, but there are also finer-grained APIs: https://learn.microsoft.com/en-us/windows/win32/secauthz/appcontainer-for-legacy-applications- https://learn.microsoft.com/en-us/windows/win32/secauthz/app...
- papruapap 3y agoAgree. This feature just make it worse as a script language, which are supposed to have rapid development.
- bheadmaster 3y agoIt is interesting to me that none of the new NodeJS alternatives support multithreading. Why is that? Is it just a side-effect of using V8 engine for the heavy lifting, or is it some part of the ECMAScript specification which forbids multithreaded implementations of the language?
- epolanski 3y agoMultithreading is achieved through workers and the event based architecture, it's not the same, but we should rather discuss the pros/cons of it.
- bheadmaster 3y agoPros: Vertical scalability. Cons: All your async code becomes full of data races. I suppose adding multithreading to the Node ecosystem would be as hard (if not harder) than removing GIL from Python. At least Python has locking primitives. Node, as far as I know, has none.
- dvlsg 3y ago> Node, as far as I know, has none. Atomics are probably the closest. https://v8.dev/features/atomics https://v8.dev/features/atomics
- meowtimemania 3y agoIn what cases would you want multi-threading in javascript? I feel like most performance intensive nodejs modules drop down to c++ where real concurrency already exists. (e.g. sharp - https://sharp.pixelplumbing.com/api-utility#concurrency https://sharp.pixelplumbing.com/api-utility#concurrency)
- bheadmaster 3y ago> In what cases would you want multi-threading in javascript? In all of them - JavaScript is mostly used for asynchronous programs, which are easily parallelizable. There's no reason not to want multi-threading.
- brightball 3y agoSounds like it would be a great talk for a polyglot event like the Carolina Code Conference…
- a3w 3y agoShouldn't the HN title be *Deno in 2023 (2024)*, so we know:: - it is not about a discussion of deno being new, relevant or modern in 2023, and - avoid thinking that the article is from 2023?
- kebman 3y ago"Jupyter, the open source notebook tool, added support for JavaScript and TypeScript using Deno. This means data science, visualization, and more can all be done using modern JavaScript and TypeScript and web standards APIs." I love this! At the same time, who would want to do this, given Python's excellent support for numbers and mathematics? And what about Haskell?
- inbx0 3y agoThe people who already know JS/TS and would like to occasionally do something interesting with a piece of data. With Python, most of my time goes into googling how that list filtering / mapping syntax went again or some other basic level stuff that I do every day with JS. I know Python, but I'm not fluent in it. And I will likely never be fluent in it, because my Python use cases are so infrequent.
- maelito 3y agoSimply because using the same language for both Web and server is incredible.
- skybrian 3y agoMaybe you want to share examples of how to do things in TypeScript using a notebook? Although, Observable [1] is another way to do that, for JavaScript at least. [1] https://observablehq.com/ https://observablehq.com/
- tracker1 3y agoEasier dependencies.
- pachico 3y agoI'm not a big fan of JavaScript but I admit I stayed away from it because I dislike nodejs and npm terribly. I was forced to start coding again in JS some weeks ago and I wanted to try Deno. I must say it's been a very smooth and fast experience so far. Very well done!
- Quothling 3y agoWe use Typescript for virtually everything at my place of work. Not so much because it's a great language for the a lot of the backend, and we do use some c++ for bottlenecks, but because it's so much more productive to use a single language when you're a small team. Not only can everyone help each other, we can also share resources between the front and the back end, and we've several in-house libraries to help us with things like ODATA querying and API's since there aren't really any public packages that are in anyway useful for that. I guess we probably should've gone with something other than ODATA, but since we use a lot of Microsoft graph APIs which despite their names are ODATA, it made sense at the time. We don't have trouble with Node or NPM, and when we onboard new people, the tend to step right into our setup and like it. Granted, we've done some pretty extensive and very opinionated skeleton projects that you have to use if you want to pass the first steps in our deployment pipeline. This took a little bit of effort, and it's still a team effort to keep our governance up to something we all agree on, but with those in place, I've found it's genuinely a nice way to work. An example of how strict we are is how you can't have your functions approved without return types and you certainly can't change any of the linting or Typescript configs. Similarly you can't import 3rd party NPM packages which aren't vetted first, and we have no auto-update on 3rd party packages with out a two week grace period and four sets of human eyes. I'm not going to pretend that a all of these choices are in anyway universal, but it's what we've come together and decided works for us. Anyway you're certainly not alone in your opinion, but I think that a lot of the bad reputation with Node and NPM comes from the amount of "change management" you need to do to "limit" the vast amount of freedom the tools give you into something that will be workable for your team. Once you get there, however, I've found it to be a much to work with than things like Nuget and dotnet, requirements.txt and python, Cargo and Rust and a lot of others. I do have a personal preference for yarn, but I guess that's mostly for nostalgic reasons. I also very much appreciate that things like PiPy are going down what is similar to the NPM route.
- mongrelion 3y agoSlightly off topic but I just came here to show appreciation for the hang glider in the picture. Shout out to all my fellow hang gliders.
- andsoitis 3y agowhat is a great comparison between Bun, Deno, and Node.js? Why should I choose Bun over Deno or vice versa?
- culi 3y agoPick your horse to bet on. They both have great teams behind them. Bun (written in Zig) claims higher performance. It looks promising but independent tests have yet to validate these claims. They also kinda have different goals. Bun seeks to be more of a drop-in replacement from Node whereas Deno, being spearheaded by the same person who made Node, seeks to move the industry forward and fix mistakes Deno made. However Deno, out of necessity, has also highly valued backwards compatibility with the Node ecosystem
- nonethewiser 3y agoIt's a weird scenario. You have node which is entrenched, feature-rich, and stable although not perfect. Then you have two runtimes/ecosystems trying to optimize on that but in slightly different ways. I love it but I feel like there is barely room for even one. It's just incredible there is so much work being put forth into moving the needle maybe an extra 20% on the existing node/npm status quo.
- andsoitis 3y ago> Deno, being spearheaded by the same person who made Node, seeks to move the industry forward and fix mistakes Deno (I assume you mean Node.js) made. If they aren't able to evolve Node.js to overcome the mistakes (e.g. because they're technical in nature, or momentum of install base, or they don't have the leadership ability), I am worried that they might repeat the same pattern with Deno, since it isn't possible to NOT make any mistakes. OTOH, having a clean slate that's learned from mistakes and you can bring a lot of your code along doesn't seem like a major impediment. Is code written for any of the 3 runtimes generally transferrable? I realize some won't (e.g. Deno has WebGPU support, which is attractive to me), but generally?
- Leokuma 3y ago
- agos 3y agoI'd love to use Fresh but a framework for web development which calls itself v1.x and yet only supports Tailwind for styling purposes feels very immature. The fact that for the next iteration they are prioritizing view transitions and not CSS bundling is baffling.
- mring33621 3y agoHopefully, in a few years, someone will release an open-source library for javascript-based web development.
- rglover 3y agohttps://github.com/cheatcode/joystick https://github.com/cheatcode/joystick
- skybrian 3y agoWhy does CSS bundling need to be integrated? Couldn't you generate a CSS file in whatever way you like?
- agos 3y agoif I want to use any modern styling solution (CSS modules, Vanilla Extract, Panda, any CSS-in-JS...) a bit of collaboration by the bundler is needed. I can generate CSS file(s) in any way I like but I would have zero integration with the templates
- simlevesque 3y agoPersonally I'm happy with modern CSS using variables and nesting natively. The bundling step isn't necessary for the vast majority of usecase IMO.
- agos 3y agoall CSS-in-JS or styling solutions that allow for component scoping require some kind of bundling or otherwise interaction for the bundler. It's true most people don't need it, but most people don't need 90% of what Fresh offers, surely?
- winrid 3y agoIs Deno using the same request/response buffer sizes as Node in those benchmarks?
- cactusfrog 3y agoI’ve used Jupyter notebooks with deno decently. They seem much better than Python Jupyter notebooks because of the lack of pain around dependency management.
- simlevesque 3y agoDo you have a guide / link for more info about this ?
- simlevesque 3y agoI deployed 3 projects on Deno last year and I'm planning on launching 2 websites in the next couple of months. Mix of personal projects and some for clients. Deno Deploy just works, albeit the cold start can be slow but I'm now using an hybrid setup with Fresh routes backed by a CDN. The dev experience is great. I've used a couple of other solutions similar (Next, Nuxt and vite-ssr-plugin) and I sometimes I need to do somethings manually that would already exist on other platforms but in the end my projects stay simpler. I love saaskit [1] and Netzo [2] [1] https://deno.com/saaskit https://deno.com/saaskit [2] https://github.com/netzo/netzo https://github.com/netzo/netzo
- apitman 3y agoAre there any libraries or frameworks to facilitate writing code that accesses things like the filesystem and network, but also works in Node, Deno, and Bun (bunodeno)?
- apatheticonion 3y agoDeno is such a great project. I would love to see greater support for embedding it into a Rust host process. I'm writing a JavaScript bundler and need a Node.js runtime to execute plugins. Deno's executable has fantastic Node support (at least, good enough for my use case) however the deno-core crate is super barebones and difficult to embed. At this stage I can't simply add the deno runtime into my Rust application, I need to copy/paste internal crates from the Deno executable and wire them up myself (without documentation on how). I'd love to see expansion for my use case - Deno could become the "plugin runtime" for the JS tooling world if it had a nice embed story. Right now I am just going with a Nodejs child process that I talk to from the Rust host process using stdio. In my tests, the stdio approach has 10x the communication latency when compared to an embedded Deno runtime (that adds ~1 second per round trip message in a project with 100k assets)
- ohnoesjmr 3y agoI still haven't figured out how to bring in a deno "app", a cli tool, into an air-gapped environment. There is literally zero docs and everything assumes you are connected to the internet. The whole thing is too magical, and has no hope in the corporate world.
- nikisweeting 3y agoAwesome work Deno team! I've been hard on ya'll in the past to add NPM package support and I can now officially retract all of my earlier criticisms. It's amazing to see Deno mature so fast while staying well-thought-out, and I'm excited to use it in as many projects as I can now.
- SteveHammans 3y ago[dead]