4 ms·
Deno is the perfect real world example of a programmer looking at the complicated mess of code they wrote over many years, deciding to start fresh to fix all th
by paxys 4y ago
Deno is the perfect real world example of a programmer looking at the complicated mess of code they wrote over many years, deciding to start fresh to fix all the problems, realizing their simple and elegant new product does not address all the use cases that the old one did, adding more and more complexity to it until it does, and eventually ending up with exactly what they had before.
- berry_sortoro 4y ago[dead]
- draw_down 4y agoAt least we get typescript, I guess.
- paxys 4y agoTypescript support has always been a one line addition to Node.js. What Deno did (moving ts-node to just work automatically behind the scenes) was nice to have but not exactly revolutionary.
- rektide 4y agoIf you are doodling around ts-node is great, but if you ever want to produce a ts library someone else might want to use it immediately becomes a endless eldritch nightmare maze of byzantine frustrating options almost all of which come with trade-offs. Having typescript built in, having zero complexity, none of these compile-down difficulties is just so liberating, so much bad you don't have to tangle with.
- soderfoo 4y agoWhen looking at my old code my internal dialogue flips between "What an idiot I was for writing this code" and "So brilliant and performant! I could never write code like this now."
- ljm 4y agoI imagine it like I'm on my PS5, playing something like Elden Ring, and I'm on a roll. Then I reach a boss and get it down to a sliver of health before I make one fatal mistake and it kills me. On the retry I still have the confidence from the previous attempt but I can barely get a hit before being completely destroyed. How hard could it be? I was one move away from victory last time. But now the challenge is far more apparent. This happens repeatedly as I use trial and improvement to learn the fight I so effortlessly put up in the first instance. It reminds me of just how much is down to chance and what you did in a moment in time. Trying to consciously recreate it, but better, is a Sisyphean task.
- tstrimple 4y ago> On the retry I still have the confidence from the previous attempt but I can barely get a hit before being completely destroyed. How hard could it be? I was one move away from victory last time. But now the challenge is far more apparent. One thing I've found with these types of games is getting into a "flow" works so much better than trying to consciously play the game. Unfortunately the only way to develop the muscle memory to be able to enter this flow state is to bash your face against enemies over and over until you're no longer thinking about how to react. I've also found that when I'm struggling with a boss, I'm playing in a much more conscious way which means I'm thinking about my responses instead of just reacting. When I get really close, but don't kill them, I often over focus on the piece which got me killed and which means my attention on the dozens of other things I've used to get to this point slips a bit and I get destroyed. At this point I usually know I'm too much in my own head and go off to areas I'm comfortable with to try to get back into a flow for the boss fight again.
- tstrimple 4y agoWe often hear about seeing our old bad code and cringing, but not as many people talk about seeing their old code and being impressed. I've experienced both as well.
- nonethewiser 4y agoThat is precisely the signal I received from this headline.
- MrOwnPut 4y agoI mean... not really? The goals of Deno and Node are different, the architecture is different. Adding a compatibility layer helps Deno grow while maintaining its original goals. I doubt this adds much complexity if done properly...
- joshmanders 4y agoClearly you've never seen the at least 2 talks that Ryan Dahl has given about how he viewed package.json and npm as the two biggest blunders of Node's life and he was going to correct that in Deno. And here we are.
- MrOwnPut 4y agoI have, but you glossed over my point. What's wrong with a compatibility layer with npm if it's implemented properly? His views on package.json and implementing a compatibility layer to help others transition from node are not mutually exclusive. The support for node is pretty simple. Using NPM packages is straight forward. Reading a package.json file and using those mappings isn't complex either. Deno does not use node_modules in any of those instances...
- joshmanders 4y agoHis point was that the mere ability was the issue, not some implementation. This is why Deno has gone so long without a true package manager. The problem here is now they're fighting for adoption so they're going against their original values because they know what they wanted isn't what the broader community wants.
- MrOwnPut 4y ago> His point was that the mere ability was the issue Can you elaborate? > so they're going against their original values because they know what they wanted isn't what the broader community wants. No, they are still sticking to everything, but added support for the existing ecosystem. Yes they are adding this to combat the network effect that node has, but it doesn't really go against anything. You simply prefix npm in front of npm imports. Now you could use a package.json file if you already have one, but you don't have to.
- deleted 4y ago[deleted]
- flohofwoe 4y agoHmm, I don't agree. I see Deno's package.json support as a pragmatic solution to interact with the rest of the world, but for my current use case (command line tools, switching over from Python) the npm registry is quite irrelevant, but the ability to directly import via URL is a real killer feature (also compared to Python). (edited)
- illiarian 4y ago> the direct URL import is vastly superior to external package managers. This is a tooling/ecosystem issue. E.g. in Elixir where the package manager is a part of the distribution, one-file scripts with dependencies are easy: https://fly.io/phoenix-files/single-file-elixir-scripts/ https://fly.io/phoenix-files/single-file-elixir-scripts/
- tarruda 4y agoDeno reminds me of how Python 3 decided to break compatibility in order to get rid of legacy code, and after finally replacing Python 2, has accumulated its own share of legacy.
- rektide 4y agoThis feels really short & snide & simplistic to me. I'd like to see you argue the other side of this discussion & see if you have the eye to appreciate what is better & nicer. There's a lot of complexity that's still way way way away in the rear view mirror. It's still super possible & super nice to use deps.ts to tackle a lot of the current situations. Very side mention on deps.ts, I think there is a bit of missing potential to pass your tree of deps into other packages deps, but this is definitely just working around import-maps's intended use case in userland.
- illiarian 4y ago> It's still super possible & super nice to use deps.ts to tackle a lot of the current situations. You mean: - manually import and re-export every dependency you depend on - cannot change resolution mechanism to a different package repository, for example, in a corporate setting. Especially not for dependencies of dependencies. You could probably automate it by providing a package.json of sorts, and reading from there...