The Deno Company
883 points by elisee 4 years ago | 431 comments- franciscop 4 years agoNice to see! How do they plan to monetize? I either became blind or missed it somehow. The article does say how they DON'T plan on monetize:
There are some hints though:"Rest assured that Deno will remain MIT licensed. For Deno to grow and be maximally useful, it must remain permissively free. We don’t believe the “open core” business model is right for a programming platform like Deno."
Does anyone have some insight into those? I haven't watch any Deno talk (maybe one actually?) so it feel a bit strange to make people watch technical talks to find hints of the monetization strategy."If you watch our conference talks, you will find we've been hinting at commercial applications of this infrastructure for years. We are bullish about the technology stack we've built and intend to pursue those commercial applications ourselves. Our business will build on the open source project, not attempt to monetize it directly."
PS, if I was a rich investor I'd throw money at this project even as a donation, so no complain at all, but I'm very curious on the monetization plan.
- srmarm 4 years agoLooks like https://deno.com/deploy will be a managed service - the implication seems to be that the default option will be to use their CDN to run code with an option to DIY if you prefer.
- qbasic_forever 4 years agoHow does this business model survive Amazon AWS making a blog post, "Here's a template to run your deno code on Lambda!"? They'll never beat AWS on costs in the long term. They can burn VC cash to stay afloat and try I guess.
- carlosf 4 years agoLambda has a ton of caveats and limitations... but it seems their platform is full of limits as well:
https://deno.com/deploy/docs/pricing-and-limits
AWS sucks hairy balls at providing things that are simple for developers to use, so that could be their competitive advantage, but I'm just guessing here.
- tnolet 4 years agoThere are many, many companies competing with AWS on products that strictly speaking AWS also has.
I mean Zoom has no right to exist because you can use Chime?
There is always room for better UX, better support, different approach etc.
- jppope 4 years agoLambda uses containers vs. cloudflare workers use v8 isolates. v8 Isolates are much much faster and more secure for serverless functions.
Deno seems to be targeting cloudflare as a competitor for their service... But it's probable that AWS will release a cloudflare worker competitor themselves if deno continues with the MIT license.
- IgorPartola 4 years agoThey can always get acquired by Amazon first.
- minxomat 4 years agoThey compete much more with Cloudflare Workers, not Lambda. So much so that Deno Deploy is worker API compatible
- carlosf 4 years ago
- paxys 4 years agoI'll be very surprised if "quick and easy hosting" is still a viable business model, considering how crowded the space is by now.
- chrisco255 4 years agoEh, Vercel pulled it off rather well with Next.js. Given that Guillermo Rauch is an investor in Deno, I wouldn't be surprised if they partnered in some way.
- sneak 4 years agoQuick, easy, and cheap hosting will always be a viable model, for varying definitions of cheap.
- chrisco255 4 years ago
- qbasic_forever 4 years ago
- nerdponx 4 years agoThis is probably a stupid question, but is AGPL/commercial dual-licensing a viable option for something like this? Instead of relying on goodwill donations & maybe assigning 1-2 devs from major corporations, just explicitly charge them money if they refuse to ship source code to end-users.
- dangoor 4 years agoMany companies would just never touch an AGPL package, and while there are other languages out there with commercial licenses (e.g. Delphi), those are not nearly as mainstream as the open & freely available ones.
Deno is competing against Node.js, which is MIT-licensed. Deno is arguably better, but it would have to be _so much better_ to get people to even give it a second look if it was commercial.
- hctaw 4 years agoThat's why you dual license, which is significantly more approachable. "This is AGPL/GPL unless you pay $200/month per developer seat" is a common licensing scheme for frameworks, people aren't scared by it.
- threatofrain 4 years agoUnfortunately Deno gave up on their most unique differentiator, the TS [runtime].
- hctaw 4 years ago
- breck 4 years agoI would say no. I think they should go public domain, as that's the future.
One of the funniest/best business models out there is SQlite (https://sqlite.org/copyright.html). They give it away to the public domain, but some lawyers wrongly claim that that is not enough, so they will "sell" you a warranty asserting it is all public domain.
- rhencke 4 years agoThose lawyers are correct.
Not all jurisdictions of the world legally recognize the concept of 'public domain'.
- kwertyoowiyop 4 years agoPatent/copyright insurance? Sounds good, and not difficult to get a check written for, considering how much is spent on the service of open-source scanning.
- rhencke 4 years ago
- dangoor 4 years ago
- timqian 4 years agoI guess the "commercial applications" should be https://deno.com/deploy
- not_knuth 4 years agoGlad to see I'm not the only one having a hard time figuring out just how they intend to make money. My best guess was that they will offer a tailored Deno to companies that want to embed it (my comment about it is swimming somewhere here).
Other than that, there is the following vague statement at the end of the post:
> The Deno company hopes to enable the millions of web programmers out there to maximally leverage their craft in other domains.
- franciscop 4 years agoAh I read that statement in the end like it'll enable front-end devs to also write back-end code, like Node.js but better (APIs follow more the browser than in Node.js), but I didn't think it'd be related to the monetization?
- franciscop 4 years ago
- xiaq 4 years agoSounds to me that they will build some sort of hosted service or maybe PaaS based on the Deno runtime (like AppEngine or AWS lambda), but yeah it's pretty vague.
- DyingAdonis 4 years agoLooks like CDN with Serverless edge functions.
- brundolf 4 years agoHeroku doesn't (yet) officially support Deno. That's the main reason I don't use Deno for my personal site. So I'd say there's a market there.
- throwaway99x99 4 years ago> Sounds to me that they will build some sort of hosted service or maybe PaaS based on the Deno runtime (like AppEngine or AWS lambda)
or like Joyent
- skrebbel 4 years agoHow did Joyent manage to turn Nodejs into money though? I mean weren't they mostly selling unix services?
- skrebbel 4 years ago
- colesantiago 4 years agolooks like a crowded space.
vc's will issue course correction very soon.
looks like a repeat of docker.
- Freknf 4 years agoIn other words, capitalise on the decreasing quality of software engineers by offering services to them at a high price because they don't have the ability to make any of these services themselves.
- sbarre 4 years agoThis is a rather naive take I think..
There's a semi-joke that goes "all companies are software companies now" but there is a lot of truth to that..
It comes to down where a company wants to put its effort.
Do you want to own/operate/maintain all your infrastructure and services (and all the challenges that come with retaining scarce talent that is capable of that work), requiring you to substantially invest in an area that is not core to your business?
Or do you want to spend that money (and let's be real, less money too) to pay a trusted third party provider who will do a better job than you would anyways, because that's their area of expertise?
Then you can focus your (likely limited) resources on delivering value to your business instead.
- sbarre 4 years ago
- DyingAdonis 4 years ago
- bob33212 4 years agoAny of the big 10 tech companies wouldn't mind owning this if it becomes the standard way of developing back end JS. It gives them influence and the ability to lock out competitors.
- luma 4 years agoI know this isn't the SV-approach to things but maybe they intend to offer consulting services for those looking for some expertise with the ecosystem, bill hours, and retire in their 50s as millionaires instead of billionaires.
This might be surprising, but not everyone is looking to be a unicorn.
- fasicle 4 years agoThe article says they "raised 4.9 million dollars of seed capital" so I expect their investors will want a decent return over the next few years.
- fasicle 4 years ago
- srmarm 4 years ago
- elisee 4 years agoHappy to see Deno get some financial backing!
I've been building my new multiplayer games website [1] with Deno over the last 4 months and apart from some minor growing pains, it's been a joy to use.
The lack of unnecessary package management, and the TypeScript-by-default approach makes Web dev much nicer. We're also using TypeScript on the client-side, relying on VSCode for error reporting. We use sucrase to strip the types just as we're serving the script files, so that there is no extra build time, it feels like TypeScript is Web-native and we can share typed code with the server.
[1] Not yet launched but we ran a preview past weekend with hundreds of players over WebSockets: https://twitter.com/MasterOfTheGrid/status/13757583007179735... - https://sparks.land
- iends 4 years agohttps://sparks.land doesn't load properly on mobile (iOS, Firefox)
- elisee 4 years agoAh thanks for the heads up. It requires WebGL 2 which isn't yet in iOS's Web engine I believe? And IIRC all browsers have to use it on iOS. It does work on Android.
- soylentgraham 4 years agoNo webgl2, but there are a lot of webgl2 extensions supported. The biggest omission for me is not being able to render to float textures. (Although a lot of android devices cant do this either)
- soylentgraham 4 years ago
- elisee 4 years ago
- sbarre 4 years agoPeeking at sparks.land I see that you're serving .ts files, I assume that's what you mean by using sucrase, you're transpiling "live" instead of building/deploying bundles offline?
I notice your script files are all pretty small, have you run into any upper limits on performance or scalability so far with this approach?
- elisee 4 years agoCorrect! In production we've got Cloudflare in the middle, so we're only using sucrase on-the-fly for each .ts file during development. So far it's unnoticeable in terms of loading times.
> I notice your script files are all pretty small, have you run into any upper limits on performance or scalability so far with this approach?
Not that I can tell. But if we need to, we can always do a minified bundle in production later on. So far it's just nice to not have to even think about it!
- sbarre 4 years agoWait, so you're running Sucrase in a Cloudflare Worker?
It compiles, and then caches the output I assume?
That's a really cool use case I hadn't thought of..
- sbarre 4 years ago
- elisee 4 years ago
- samjmck 4 years agoIs the VSCode support good? I tried using Deno with WebStorm a few months ago and it wasn't a great experience.
- elisee 4 years agoIt's getting there! They finished a rewrite of the extension recently and it's quite nice.
If you're on Windows like me, sadly there's still a nasty bug with path mismatches between the LSP server and the VSCode extension (https://github.com/denoland/deno/issues/9744) which requires reloading the window to fix spurious errors, but I'm sure it'll be fixed soon enough.
- searchableguy 4 years agoJetbrains extension hasn't been updated much since release and doesn't interface with the official LSP. The experience is poor and outdated.
Vscode extension is maintained by the official team and will provide the best experience. There are unofficial plugins for sublime and Vim. They use LSP too and provide a comparable experience.
- elisee 4 years ago
- tin7in 4 years agoHey, the Discord invite link is not active anymore.
- elisee 4 years agoWhich one? The home page one seems to work for me. Otherwise try: https://sparks.land/discord
- elisee 4 years ago
- cozuya 4 years agoAre you running multiple cores/threads of deno? If so how are you holding/communicating state server side?
- elisee 4 years agoThere's a central Deno server program called the switchboard, which serves static content, runs a small REST API for account management / login, and starts a WebSocket server for game servers to register themselves.
Each game server (a stand-alone Deno program that might or might not run on its own machine) connects to the switchboard over websocket and authenticates itself with an API key (since people will be able to make their own game servers).
When a player wants to join a server, they POST a request to the switchboard, which gives them back a token that they can send to the game server after establishing a WebSocket connection to it. The game server checks the token with the switchboard and gets back public user account info if it's valid.
Each game server's logic is currently single-threaded. I guess we might end up offloading some work to WebWorkers later on.
A server can publish some state info through the switchboard that will be broadcasted to other servers from the same user. This is used to show player counts in game rooms from a lobby, things like that.
I run the whole thing on a couple cheap Scaleway servers, with Cloudflare in front (no AWS nor containers or anything of the sort). My previous platform, built with Node.js (https://jklm.fun) is able to sustain at least 2000 concurrent players like that, though admittedly those are board-like games which are not very demanding, unlike the games for Sparks.land which will be more fully-fledged... so we'll see how that holds up!
- cozuya 4 years agoThanks I run something similar that can only really do 300 players before it starts to lag badly but TBH needs to be rewritten as its all single threaded and 1 process controls the lobby, every game, all chats, etc. Don't do what I did -_-
- mrjoelkemp 4 years agoFor completeness, you should check out Elixir and Phoenix (channels and presence) for the server. Easy websockets, isolated player processes, non-blocking VM, plus deep introspection for debugging issues. https://youtu.be/JvBT4XBdoUE. We see more and more indie games being built with Phoenix LiveView.
- cozuya 4 years ago
- elisee 4 years ago
- iends 4 years ago
- davnicwil 4 years agoWhat I find most exciting here is:
> Our infrastructure makes it possible to... create custom runtimes for different applications [like] Cloudflare Worker-style Serverless Functions
Fascinated to see what happens here. The serverless / edge compute paradigm fits Javascript hand-in-glove philosophically, but until now it's always felt quite clunky to me. When I've tried it out, I've always been left thinking "but this would just be so much easier with a server".
Reading this has made it click for me why that is. A new paradigm needs a new set of tools native to that paradigm.
The entire server-side JS ecosystem is currently structured around Node, a fundamentally stateful-server paradigm. You can try to abstract over it, but only so far. It's not the serverless paradigm that's clunky, per se, it's that the tools right now were built for another way of doing things.
As a concrete example - Deno has an import system based on URLs, rather than on-disk node_modules. I thought that was a cool feature for convenience, less overhead, more open and sharable packages, etc. But now I realise the full intent of it. It's much more than all that, it's a fundamental shift in the paradigm: no implied dependency on stateful disk in the runtime itself.
- qwtel 4 years agoThere's lots of things going on this this space. It seems every other day I discover another Cloudflare Workers-like implementation (granted, most of them are for testing/development). I'm cataloging them here for anyone who's interested: https://workers.js.org
- resonantjacket5 4 years agoNot against url-based imports but I don't quite understand why is "no implied dependency on stateful disk in the runtime itself." a big deal?
- webmaven 4 years ago> Not against url-based imports but I don't quite understand why is "no implied dependency on stateful disk in the runtime itself." a big deal?
I think that lets you deploy to things like edge devices that don't have a hard drive, and even more ephemeral environments.
- webmaven 4 years ago
- dgellow 4 years agoYep, that will be something to follow. It will be really interesting to see what kind of market emerges here by allowing new custom runtimes to compete, with specializations for a different niches and environments.
- unityByFreedom 4 years agoTheir comparison to Cloudflare workers doesn't seem right. The benefit of cloudflare workers is that they run on the edges of a CDN. Putting Deno on one server wouldn't achieve that.
- lucacasonato 4 years agoThen you put Deno on the edge : https://deno.com/deploy
- youngtaff 4 years agoWhere is the edge in Deno terms though?
It's the same issue with Netlify, Vercel etc. where their edge is very different to say Akamai, Cloudflare or Fastly's edge.
- youngtaff 4 years ago
- lucacasonato 4 years ago
- qwtel 4 years ago
- kostarelo 4 years ago> Extending web programming beyond the browser is not a novel idea. Indeed, we have done that with moderate success in our “Node.js” project. But over a decade later, we find server-side JavaScript hopelessly fragmented, deeply tied to bad infrastructure, and irrevocably ruled by committees without the incentive to innovate. As the browser platform moves forward at a rapid pace, server-side JavaScript has stagnated.
wow lots of bold statements there. And another one for the usual "JavaScript is fragmented, let's create another tool to fix 'em all.".
- TechBro8615 4 years agoRyan Dahl (author of the announcement post) is the creator of Node.js, so I think he's got a right to say these things! Also see "10 things I regret about Node" [0]
- cphoover 4 years agoRyan Dahl left the leadership of the Node.js pretty early in its development. A lot of people can be considered "the creator" of Node.js to be fair.
- nrmitchi 4 years agoWhile I'm not going to argue the history of if/when he left the project, my understanding is that it's fairly agreed upon that he is the creator of Node.js. If you google "node js creator", he's an embedded answer (not a search result).
The first line on Wikipedia in the nodejs history section is "Node.js was written initially by Ryan Dahl in 2009".
You can make whatever point you want, but maybe try to do it without rewriting history, or changing the agreed-upon definition of "creator".
- murukesh_s 4 years ago>Ryan Dahl left the leadership of the Node.js pretty early in its development. A lot of people can be considered "the creator" of Node.js to be fair.
Don't think so. I have been using Node.js since 2010 and following the ecosystem. Node.js is the child of Ryan Dahl. Other than Ryan, perhaps Isaac Schlueter is the most influential person who developed the NPM as a separate project and later merged into Node. Ryan could have done it himself or embedded it in Node.js, but guessing from Deno he is not keen on a centralised package repository so could have let Isaac build NPM as a separate project.
From what I could observe, the overall API is still pretty much the same from 2010. What's changed is V8 getting updated to newer versions (and thereby supporting new ES features) and other performance optimizations. But no one can't deny or take away the creator credit from Ryan.
- brookside 4 years agoNo. Ryan Dahl was the initial individual creator of Node.
- nrmitchi 4 years ago
- cphoover 4 years ago
- sbarre 4 years agoYeah, no kidding.. shots fired...
As someone who uses Node but doesn't closely follow the steering/proposals side of things, I can't say I had this impression of that process..
Is Node really that bad compared to how JS/ES is innovated on in the browser?
- jokethrowaway 4 years agoThat's very subjective
As an outsider who likes to lurk, I have the impression both ECMA and Node committees are stuck in the "we're nice and therefore right" field.
They made technological choices that broke the platform (eg. require vs import). It took ages of pain to innovate on things that matter (eg. promises, async)
I wish Deno the best, but I'll just try to stay away from JS from now on (same as I've been avoiding Python after the 2to3 migration).
- bliteben 4 years agoyeah the dream of being able to share at the very least data types client and server side is pretty elusive. Most projects you could probably build twice before you could get client and server side sharing much code. Also just shocking me to me how averse the whole nodejs community is to shell commands like
https://guides.rubyonrails.org/v4.2/command_line.html#custom...https://docs.djangoproject.com/en/3.1/howto/custom-managemen...
I guess though, the people in the Ruby / Django community are actually building projects and the node community are padding their resume with new npm packages.
I hope deno or dart can make the JS world better, but I suspect they will both end up just making it more fragmented. One thing I really like on flutter / dart is they do try to rate / otherwise rank / categorize support of their packages aside from stars https://pub.dev/packages?sort=popularity / downloads which are easy to manipulate. IMO deno should do this as well or let someone willing to takeover as the primary package manager https://deno.land/x/lodash@4.17.19
- hitekker 4 years ago> "we're nice and therefore right"
Golden phrase to describe a lot of folks. If I were to translate, it's behaving pleasantly and politely in order to justify poor decisions.
- sbarre 4 years agoInteresting... thanks for sharing some insight.. :)
- bliteben 4 years ago
- beaconstudios 4 years agoNode is only just now getting around to adding promise based APIs to the core. Any time you interact with the Node core APIs you have to drop back to using callbacks - that's at least one area where Node is behind the times.
- prussian 4 years agoutil.promisify() seems to work for many of the node stuff I use a lot, like pipeline(), readFile(), etc. Perhaps require('xyz/promises') is a newer development.
- pharmakom 4 years agoOr use the ubiquitous NPM to install a promise orientated package... I don’t see this as a big problem honestly.
- prussian 4 years ago
- jokethrowaway 4 years ago
- airstrike 4 years agoI hear you, but I'll also give them some credit—you can't create anything worthwhile without a clear vision which basically requires an opinionated sense of purpose.
- burlesona 4 years agoRight behind the giant understatement of calling Node a “modest success.”
- myko 4 years agoA modest understatement if you will
- myko 4 years ago
- yulaow 4 years agoIt feels like the old IO.js vs node.js. I hope this time too the two ecosystems get merged, but this time it feels much harder to happen
- sbarre 4 years agoWasn't that more of an ideological than technical split?
Deno is more of an ecosystem reboot than a fork, I would think.
- yulaow 4 years agoYeah, with the use of "it feels" this time I was literally trying to express the feeling of "oh no, another big divergence in js" like it felt at the time (even if it was indeed ad "ideological split" as you say, I remember clearly at the time a lot of blog posts about how it meant that in the long run we COULD have different ways of doing things / calling apis / build frameworks / etc... )
- yulaow 4 years ago
- sbarre 4 years ago
- bayindirh 4 years agoRelevant XKCD: https://xkcd.com/927/
Can't we have a chuckle? No? OK.
- kybernetikos 4 years agoIt doesn't really apply here.
When you create something in a field that already has other entrants, that's a completely different thing from trying to unify all the other entrants, and ending up just creating another also-ran.
There's nothing wrong with identifying an area that you think you can contribute something innovative to and building something opinionated for it.
- user-the-name 4 years agoLiterally everyone has seen this. There's no chuckle.
- kybernetikos 4 years ago
- TechBro8615 4 years ago
- sublimefire 4 years agoDeno makes sense in a variety of situations. The build pipelines of Typescript are excessively complicated and Deno hides that complication away (less dev effort).
Furthermore Node has its own maintenance/risk issues in production systems (think permissions), and Deno reduces those with custom built runtimes.
I cannot see it replacing Node though. Node has created a vast ecosystem that includes modules (npmjs), client side bundlers (eg webpack), serverside frameworks (eg express), etc. But because Deno is solving some of the issues for those who run sensitive code in production (eg Lambda functions) it'll most likely gonna become another VM on the public cloud providers' list.
All in all Javascript interpreter is becoming something like a JVM. Everyone wants to use it but without writing vanilla Javascript.
- tomxor 4 years agoThis probably either sounds nuts or over opinionated but I don't think the NPM ecosystem is as valuable as people think it is... stuff is deprecated continuously anyway - when you find a way to move away from 10k dependencies (because your shortsighted previous self decided to depend on a single package without looking closer), it's a damn relief. I hate how needlessly complicated the NPM ecosystem is, I would actually like it if no one built bridges to Deno, it could be a clean start with lessons learned.
Most of the packages on NPM are complete garbage - most not all - (and I say this as a full time JS dev who actually likes JS), liking the technology does not have to mean liking what people do with it, and JS is the worst, both in terms of the crap on NPM and the web.
- sublimefire 4 years agoYour thoughts and experience resonate with me.
Although I would look for similar examples elsewhere to understand where it is all headed. And one of those could be the rise and adoption of the JVM. There are a bunch of old dependencies, multiple repositories (compared to just one popular npmjs), a couple of build tools (ant, maven, gradle) compared to npm, yarn, then multiple languages (invented for somewhat similar reasons as Typescript). One thing is sure that the dependencies stay somewhere for-almost-ever, and all else kind of evolves around it.
It seems that the main problem at the moment is the developer (me, you, everyone) who instead of writing 20 lines of code uses a dependency that has 10 other transient ones. You cannot fix it but rather challenge those situations at work and reduce the tech debt for good. Maybe there should be a build tool that throws errors depending on the amount of dependencies. Maybe there should be a frontend framework which will only need 10 dependencies for the helloworld instead of 1500; otherwise we kind of think that if a boilerplate template has 1500 deps then surely adding another 100 will not make much harm.
- TimTheTinker 4 years ago> I don't think the NPM ecosystem is as valuable as people think it is
Its value is less about the existing dependency tree of libraries and more about how many apps directly depend on libraries that are npm-hosted.
There are many 200+ kloc apps out there making millions/yr each that deeply depend on libraries and frameworks hosted in npm.
- cloverich 4 years agoI mostly agree with this, after using Node the last several years. IMHO the primary valuable components are making it free to implement the commenest kinds of concurrency correctly. I.e. most programmers don't even know they are doing it, other than "Oh I have to use `await` here". Even in something as simple as Go, you still have to intentionally set it up. And in Java, I run into very slow very low volume apps all the time because programmers don't realize they added a blocking call somewhere.
- kybernetikos 4 years ago> I don't think the NPM ecosystem is as valuable as people think it is
I generally think the NPM ecosystem is pretty cool, but I have noticed that even simple stuff like creating a RESTful service doesn't seem to have stablised in the ways I would have expected given node's target audience, and you end up writing a lot of the boilerplate yourself. Hopefully this will result in hundreds of replies telling me how I should be doing it, but even the fact that it's not trivial to find that out is a sign of a fragmented ecosystem.
- notJim 4 years ago> Most of the packages on NPM are complete garbage
And don't do anything. I'm amazed by how often I read the source for a package I'm interested in, only to find it's about 10 or 20 lines of code.
The convenience of adding a package means that if you're not sure how to do something, you can easily just add a package to do it rather than figuring out how to do it yourself. A lot of the time, you can just read the source and adapt it rather than installing the package.
- ggregoire 4 years agoSo if you need that package in your 10 projects, do you copy those 20 lines of code in your 10 projects? Yikes. Then what happens when it requires a change? Do you make the change in all your projects? Double yikes. When it becomes 30 lines, do you still copy/paste those 30 lines in all your projects? Do you also copy/paste the tests related to those 30 lines in all your projects? ...
Having reusable code wrapped into packages is basic software engineering.
- tomxor 4 years agoI'm not afraid to say I agree with you, i'm not sure why you are being down voted... This is one of the attributes that is part of my argument against NPM, packages which are at the extreme end of too small, delivering almost no value at the cost of a lot of risk.
This is also an opinionated subject, and as with most things in life there is a balance somewhere in between the two extremes. However the NPM packages you refer to (and yes I have seen the <10 line offenders you refer to) are clearly at a stupid end of extremely useless shared code that amount to the most trivial stackoverflow JS examples.
In response to the sibling comment on duplication: all I can say is that it cuts both ways, deduplication to the extreme also has downsides: when someone changes that code you don't control, it now affects a large number of dependencies that the author may not care about. But even ignoring those issues and assuming you package-lock everything and never look back, extreme de-duplication in general can result in highly illegible code due to a lack of holistic view: whether it's achieved with thousands of tiny external packages or thousands of tiny 3 line functions in the same file - many have covered this topic in detail before, deduplication for deduplication sake never ends well, abstractions always have a cost.
- ggregoire 4 years ago
- sublimefire 4 years ago
- brundolf 4 years agoI think the JS ecosystem has such a huge amount of raw developer-attention that even if Deno only gets 10% of the market, that's probably enough to bootstrap all those foundational packages/frameworks.
Also: if you're porting from Node, the only things that really have to change are the system/IO API calls. The import style is a bit different but that could pretty much be automated. It's still just TypeScript at the end of the day; your core logic will be the same.
- Freknf 4 years ago>All in all Javascript interpreter is becoming something like a JVM. Everyone wants to use it but without writing vanilla Javascript.
Except not because lots of people prefer to write JavaScript and those other JVM languages are usually less verbose rather than more verbose.
- sublimefire 4 years agoBut why people create Coffescript, Typescript, Kotlin (which compiles to JS), and many more? Why are we compiling ES7,ES8,ES9 to compatible version of basic javascript then? Why do we use wasm?
I think this shows the lack of willingness to write a vanilla, all-compatible javascript. Also it seems people use new features without understanding how those get compiled to a lower version.
Sorry when I meant vanilla I did not mean ES9.
- sublimefire 4 years ago
- oblio 4 years agoI think raw (framework-less), modern (no J2EE, Spring) Java is most likely a much better language than raw, modern Javascript.
Plus, aren't Deno libs compatible with Node libs?
- sublimefire 4 years ago> much better language
Maybe but who cares when your code does not execute instantly on Lambda and requires you to use GaalVM to convert bytecode to binary. Besides you have a lot of people who would say Kotlin is better.
Javascript, like Python wins here. Well Javascript kind of wins because it is interpreted but devs do not use it directly but rather with a bundler/compiler.
> Plus, aren't Deno libs compatible with Node libs
Not really, if your dependency relies on say `https` module then it'll not work on Deno as it does not have it. And in the case of Deno modules, they are not on `npm` to begin with but even if you import them then they are written in Typescript.
- murukesh_s 4 years agoBetter language or not Java is reigning king in enterprise companies. We have built our platform on top of Node.js assuming it would gain popularity but Node.js is nowhere near production use in large enterprises. Somehow the enterprise adoption has been miniscule. JVM performance is top notch. Many features like distributed transactions, messaging support, official libraries for enterprise applications like SAP is severely lacking in Node.js and hindering its adoption in enterprises.
- sublimefire 4 years ago
- tomxor 4 years ago
- ravenstine 4 years agoA lot of people seem to think the difference between Deno and Node is trivial, but having actually used Deno, I think they're wrong. Here's why:
- Typescript as a first class citizen
- An actual `window` global with familiar browser APIs
- Sandboxing w/ permissions
- URL-based imports (no need for NPM)
- Bundling into self-contained binaries
- Things like top-level-await which Node.js still treats as experimental.
- Better-designed APIs than the Node standard lib (esp. when it comes to promises instead of callbacks)
To me, those aren't just minor details. This has the potential to create a new epoch in server-size JavaScript.
- hctaw 4 years agoMy personal view is that syntactic debate over imports (including whether it's in an import/require/url/package.json/whatever) are basically meaningless except for surface level debate. How "nice" it is to write imports is pretty worthless to me.
The structural and semantic differences between imports are a much more important discussion. Import syntax is the front end to the languages meta programming semantics. It's meta programming in the sense that your code and other code is the data, but what you're really programming is a task runner with specific instructions about how to find and satisfy the requirements to build and/or run the software.
Integrating package resolution into the language itself is a really important distinction for contemporary designs - passing that buck to external tools but simultaneously coupling them to the runtime is a mistake that I think we should learn from. Deno is a good step in that direction.
- ivan888 4 years ago> URL-based imports (no need for NPM)
What happens when there is the next Codehaus-like shutdown, and so much source code just won't work? Or when a bad actor takes control of a domain that commonly hosted packages (perhaps through completely legitimate means, such as registration expiration), can get a completely legitimate SSL certificate for it, and responds to requests for packages with malicious code? I think the abstraction, and to some degree the centralization, of package management is generally a good thing
- goodoldneon 4 years agoURL-based imports aren't less secure. They just make an existing attack vector more obvious. Is NPM really keeping you safe? What happens if a package maintainer is compromised and the attacker adds malicious code?
The fact that URL-based imports make you uncomfortable is good. Let that discomfort guide you to adopt some extra security measures to protect yourself from third-party dependency exploits
- ivan888 4 years agoI would argue that NPM and other centralized package managers have the ability to add security: if npm made 2FA a requirement (or publicized the status of a package maintainer having 2FA enabled like GitHub does, which is perhaps a security concern itself), there would be some assurance that a maintainer is not compromised.
If we are using URL-based imports, the scope of security assurances are much broader: an SSL certificate doesn't say anything about whether the current owner of a domain was the owner at the time of a dependency being safe. There is no one authority who we can expect to take swift (or even slow) action to remove malicious packages from being available on the myriad hosting protocols that are accessible through an environment like Deno
- Normal_gaussian 4 years agoa note for many: yarn v2 provides '0-config' fully cachable dependencies (zips in lfs). This makes it possible to fully vet dependencies and enforce change approval and analysis in CI/CD.
- dmitryminkovsky 4 years ago> Is NPM really keeping you safe?
I wish there was something like Docker Hub's automated builds in the Node world because the way NPM works right now, what comes from NPM is an unknown. The only thing you know is if you download a specific version once, you'll always get that same version again, unless it's invalidated. Otherwise, whatever the package author wants to upload and include, that's what you get and you can't know that what you're seeing in some Git commit is what's running in your application. I wish that was the state of the art.
- ivan888 4 years ago
- sod 4 years agoAnswered in https://deno.land/manual@v1.8.2/linking_to_external_code#but...
Also: Nobody prevents you from using a package manager anyway. Just because you can use urls in imports doesn't mean you have to. But it is very convenient that deno downloads exactly the code that is imported. A package manager will always just throw everything at you. Some packages in node.js try to fix this by splitting the project into submodules like @babel/core, @babel/env, .... But that made installing dependencies worse. Just let deno figure out what is required is way more elegant IMO.
- nawgz 4 years agoNot sure I understand, are you implying Deno does automatic tree-shaking on package imports? If not, how does "deno download exactly the code that is imported" and not just a whole package?
Also, from your link:
"In Node this is done by checking node_modules into source control. In Deno this is done by pointing $DENO_DIR to some project-local directory at runtime, and similarly checking that into source control:"
I disagree with this. In my opinion, this is done by using a pull-through cache that caches every package developers request and so inherently has a cache of the packages that will go to production.
Is it possible to do this in deno today? I don't really get that sense.
- nawgz 4 years ago
- searchableguy 4 years agodeno has a lock file like other package managers. If you use a lock file, deno will refuse to run if the file has been modified.
Deno caches everything offline and only reloads if you use --reload flag.
I would recommend going through the manual to learn more about deno workflow.
- jansommer 4 years ago"Deno can store and check subresource integrity for modules using a small JSON file." - https://deno.land/manual/linking_to_external_code/integrity_...
- ivan888 4 years agoUnfortunately this won't help those who add dependencies based on shared snippets, without the context of a project. Or the innocent mistake (or choice?) of not checking the lock file into version control. But yes good point, existing projects that have checked in the integrity file will be safe against future malicious modifications of the resource
- ivan888 4 years ago
- pknopf 4 years agoThere will likely be some kind of npm at some point.
- forty 4 years agoYes, i think recreating an npm kind of central place for your project dependencies seems almost required if you want to avoid depending on a different version of a lib in each file of your project.
I cannot understand the benefit of this scheme honestly. I would have preferred they fix something npm is lacking, like adding the ability to sign packages
- jhgb 4 years agoIf the goal is to get rid of NPM, why would you add another one in the future?
- forty 4 years ago
- goodoldneon 4 years ago
- hombre_fatal 4 years agoThose still are all trivial in the "too little too late" sense.
URL-based imports are already something you can do in package.json if you really thought that was great. Top-level await really is trivial. The permissions system does very little for you since they are process-level permissions when I'm scared of transitive dep attacks. Typescript in Node is good and Deno has to catch up in tooling.
If Deno was where it is today but like 8 years ago, it would have made a splash. Now it just looks like someone made a few creature comforts to Node.
- hn_throwaway_99 4 years agoThanks, I agree 100%. Perhaps I'm getting unnecessarily cocky in my old age, but this really does feel like other cases I've seen in the past where people (including the original founder) want "a clean slate", because of course there are warts and lessons learned from the original implementation, but the cost of workarounds for those warts is actually lower than the cost of switching to an entirely new competing technology for most people. Going back to the original list:
- Typescript as a first class citizen: Agreed, it's not hard to get TS set up in Node, and it's a "one and done" cost.
- An actual `window` global with familiar browser APIs: I've never needed or wanted this, though I could see how the server-side rendering crowd could benefit, but I still have to believe there would by necessity be enough difference between the browser-based window that implementing SSR is still non-trivial.
- Sandboxing w/ permissions: I honestly think this is going to be useless. As you stated, if you're really running untrusted code better to rely on process permissions. This actually reminds me of many of the overly complicated security/permissions architecture in the Java SecurityManager stuff that I rarely if ever actually saw being used.
- URL-based imports (no need for NPM): NPM certainly has its warts, but I think a lot of Deno supporters woefully underestimate how most server-side JS developers love having a single primary global package repo.
- Bundling into self-contained binaries: Again, this is nice, but also gets a "Meh, I don't really care" from me.
- Things like top-level-await which Node.js still treats as experimental: Once you learn how to do an IIFE who really cares?
- Better-designed APIs than the Node standard lib (esp. when it comes to promises instead of callbacks): Again, a minor nice-to-have, especially with Util.promisify.
- ericlewis 4 years agotop-level await isn't really trivial implementation or action wise. But as a feature it seems obvious until you step into all the edge cases it can create.
- ravenstine 4 years agoCare to share some examples of said edge cases?
I write a lot of short JS files that aren't part of a big cohesive backend, and little things like top-level await make the code somewhat easier to read. Yes, you can just do an async IIFE, but that's just another thing for the eye to parse and feels quite vestigial.
EDIT: And since I can't respond to your other comment, I'll ask this here; what do you consider great and important about Deno that doesn't fall under the bullet-points I listed? I'm simply curious.
- hombre_fatal 4 years agoIt's cute for scripts. Otherwise there's the trivial top-level wrapper runProgram.catch(console.error) entry point. It's just not a detail that does much to sell Deno.
Though I admit it's not that fun for me to come in here to poopoo Deno.
- ravenstine 4 years ago
- hn_throwaway_99 4 years ago
- schnable 4 years ago> An actual `window` global with familiar browser APIs
This doesn't seem good?
- ericlewis 4 years agoit's not. actually I would argue any sort of global state like this should go away.
- kinjba11 4 years agoI agree with the spirit of what you're saying, but there billions of lines of JavaScript code that can't "just go away". Being able to use e.g. 'window.crypto' without worrying about whether I'm in Node, Deno, some other runtime or a browser is great news for reusing huge amounts of code.
- ravenstine 4 years agoWell, okay, but it's pretty much here to stay and doesn't have that great of a drawback that it's worth breaking any cross-compatible code that currently exists.
If there is going to be a global object, then it might as well be the same one used in the browser, which everyone who writes JS is familiar with.
- kinjba11 4 years ago
- ericlewis 4 years ago
- ericlewis 4 years ago- AFAIK - it still compiles into normal JS nor does the TS team work on deno (hope I am wrong) so it's not really FCC as most would think
- this doesn't make sense, its bad API design and shoe horning in a completely different paradigm is not a good idea, it should have moved somewhere less familiar and more oriented to the environment (I know that sounds weird but giving a quick answer, there are better solutions and this aint a browser)
- not bad, but seems odd to me as a language feature in some ways, there are plenty of ways to achieve this. (macOS will do this to your node scripts even itself, why do we need more of it)
- this is subject to the same problems NPM could have, but I guess it is easier? Now you have to lexically parse all files to determine an import and you also have to remember where you keep your 3rd party packages without a centralized way to know it (edit: this seems to harm the previous point)
- bundling isn't that interesting in this context as it just bundles the whole runtime with the package, which is terrible for size of packages and doesn't net a lot of benefit since they are also now tied together - if there is a security flaw you now must fix the entire binary and hopefully it still compiles. (edit: technically swift did this a long time too... but they also were reasonably sure they could include their runtime with the OS itself once ABI was stable, I am not sure if Deno has a path for this or if we just get fat binaries forever)
- top level await is a weird one to me, there are valid reasons its not in node currently. but yeah- no one likes having to write janky init code to work around this
final edit: I have a lot of opinions on this and would love to learn more about why deno is great. from what I can tell, its just a faster language of js which, imo, is great. But the points drawn from GP are just bizarre to me.
- j-pb 4 years ago- I've had the typescript compiler do WEIRD errors on me, depending on configuration, a zero configuration, no brain environment is a godsent
- it makes a ton of sense if you don't want to maintain two different versions of the same library. With WASM there is zero need for Node native modules anymore, so there is no need to have platform specific idiosyncrasies that go beyond Web APS's. Is the fact that it's called "window" a favourite of mine? Certainly not, but when you try to get a library running that you really need, that was originally written for the browser or vice versa, you don't care what the thing is called, as long as it's backwards compatible.
- defense in depth, multiple sandboxes are better than one
- this has to do with the window point, it's a lot easier to make code cross platform compatible if you only have to reference publicly accessible http endpoints
- maybe that's not interesting for you, but I've had to deliver command line tools as binary, and I'm super duper happy that I could do so in JS, the security I gain from controlling the runtime version is also much better than what I'd get from that being the users responsibility, besides that fact that not knowing exactly which runtime your code is gonna end up on is also a big source of security vulnerabilities
-
- ericlewis 4 years ago- TS also lets anyone do whatever they want so not a great thing to support, I have always said TS would be better if people couldn't configure it without a PR to TS itself
- we have the chance to define a new and better API, we should do it - you are already adopting something different
- I agree, but its not a selling point, these things are probably in containers already and my OS should be doing most of the work
- window: just no, call it global if you must. perpetuating ideas like this isn't good for anyone but the lazy.
- I think the cmd aspect of shipping a whole binary is cool for sure, but lets not conflate this as a "compiled language" its not. you are shipping a runtime and a scripting language together.
- ericlewis 4 years ago
- seer 4 years agoWhile I also think url based imports are a weird idea, it might just stem from the fact that I haven’t used it much, it might be wonderful, who knows.
But what I’d like to question is why the idea of parsing everything is considered bad. Semver itself, while miles ahead of what came before, is still just lies we tell the compiler.
You can never actually rely on the fact that a miner fix will not be a breaking change and the like.
Rich Hicky had a great talk on the subject of imports and breakage, and the conclusion that I agree with was to actually load and check every function in all the libraries you use, so that if there is an incompatible change you will not be none the wiser.
I’m glad people are trying to experiment here, as package management is far from a solved problem and issues with it cause sweat, tears and blood to most devs during their careers.
- ericlewis 4 years agoI've used imports in this manner before and the issue with having a non-centralized place where packages defined has 2 sides:
1. people will import packages willy-nilly and not think about what they are doing and it becomes harder to understand WHAT they imported (the why becomes more clear imo), I am aware that is very much so JS culture today but I also believe that to be harmful.
2. Having to parse all files to find deps takes time, obviously not a ton of time, but it takes time, it simply doesn't scale appropriately
Working in finance - I think personally that it is really important to make changing the dependency chain something everyone should be VERY aware of.
- ericlewis 4 years ago
- woah 4 years agoHave you used it?
- ericlewis 4 years agoI have. And I am not saying it doesn't make sense, but the GP reasoning are probably some of the worst aspects of what it can do.
edit: but at the same time now I realize why people are attracted to it, they are desirable features wether or not they actually make sense.
- ericlewis 4 years ago
- j-pb 4 years ago
- Already__Taken 4 years agoI was just looking for git tooling and found a few node base projects with npm-install instructions. I thought deno is going to eat these things up for teams. We don't want C++ devs to need a node tool-chain for one tool.
- LunaSea 4 years agoHighly disagree on the impact of those points.
> - Typescript as a first class citizen
This doesn't seem to add much besides having to install `tsc` or `ts-node` and also not having the choice of the TypeScript compiler version you use.
- An actual `window` global with familiar browser APIs
Node.js has a `global` global object and the only API I would understand having in common with the `window` object is the `fetch()` API.
- Sandboxing w/ permissions
Sandboxing is so basic that any large project will have to enable all permissions.
- URL-based imports (no need for NPM)
I would consider this a disadvantage.
- Bundling into self-contained binaries
Again, I would say that this is rarely useful in a world where a lot of operations use container technology.
- Things like top-level-await which Node.js still treats as experimental.
This is trivially solved by anonymous self-executing functions
- Better-designed APIs than the Node standard lib (esp. when it comes to promises instead of callbacks)
I think that this is the strongest advantage, however I would argue that this is not a reason to start a completely new backend platform. Also, I think that it might be a disadvantage in some high performance scenarios because Promises are much, much slower than callbacks currently.
- ravenstine 4 years ago> This doesn't seem to add much besides having to install `tsc` or `ts-node` and also not having the choice of the TypeScript compiler version you use.
Depends on your point of view. With TypeScript being built in, you don't have to think about using tsc or whatever version of TypeScript you have. It's just what version of Deno you use. If someone doesn't like that, then they still can have the option of using TypeScript by itself.
> Node.js has a `global` global object and the only API I would understand having in common with the `window` object is the `fetch()` API.
It also supports `addEventListener`, which is commonly used by browser code on the window object.
Just the existence of something defined as `window` makes more sense than a `global` which never existed in browsers in the first place.
> Sandboxing is so basic that any large project will have to enable all permissions.
That's pretty dismissive. Why should an app that doesn't interact with the file system be allowed to write or even read from it? I don't know how this feature can be considered a drawback. Don't like it? Don't use it. I don't see how it detracts objectively from Deno.
> I would consider this a disadvantage.
Then you can still use NPM. Others of us get the option to just import packages from a URL instead of publishing it to a central repository.
> Again, I would say that this is rarely useful in a world where a lot of operations use container technology.
Why? Building Docker images requires extra software, Linux images, time spent running apt-get or apk, time spent downloading and installing your runtime of choice, and so forth. Having Deno build a binary can give you a bit of a shortcut in that you have one tool for running and bundling code, and you don't need to deal with as many OS-level nuances to do so. Docker and k8s are there for anyone who needs something beyond that.
> This is trivially solved by anonymous self-executing functions
That's your opinion. Just promise me you don't go on to say that JS is a bad language, because people keep saying that yet are opposed to reducing complexity they consider "trivial". If using IIFE for the mere purpose of accessing syntax makes more sense to you than making `await` syntax available, then I really don't know what to tell you. What exactly is the argument for not implementing this feature besides "all you have to do is type some extra characters", to loosely paraphrase you.
> I think that this is the strongest advantage, however I would argue that this is not a reason to start a completely new backend platform. Also, I think that it might be a disadvantage in some high performance scenarios because Promises are much, much slower than callbacks currently.
> I think that this is the strongest advantage, however I would argue that this is not a reason to start a completely new backend platform. Also, I think that it might be a disadvantage in some high performance scenarios because Promises are much, much slower than callbacks currently.
I honestly have to wonder if you are joking. This is exactly why people invent new backends, new libraries, and new languages.
My only response to your point about Promises is that perhaps one shouldn't be using JavaScript if Promises are that much of a bottleneck. What you're saying is totally valid, though.
- searchableguy 4 years agoOn the sandbox part, you can use workers to offload risky code. There is cost to doing it but it can be minimal depending on what you are using it for.
An example I shared few days ago here: https://news.ycombinator.com/item?id=26560464
https://deno.land/manual@v1.8.2/runtime/workers#specifying-w...
- LunaSea 4 years ago> That's pretty dismissive. Why should an app that doesn't interact with the file system be allowed to write or even read from it? I don't know how this feature can be considered a drawback. Don't like it? Don't use it. I don't see how it detracts objectively from Deno.
Because any app of a medium size and above will require access to all permissions. Also Deno had some obvious security vulnerabilities around symbolic links for example which really detracts from the supposed security goal.
> Why? Building Docker images requires extra software, Linux images, time spent running apt-get or apk, time spent downloading and installing your runtime of choice, and so forth. Having Deno build a binary can give you a bit of a shortcut in that you have one tool for running and bundling code, and you don't need to deal with as many OS-level nuances to do so. Docker and k8s are there for anyone who needs something beyond that.
But you are going to need some kind of operating system image anyway due to other tools that will need to live with your app like log shipping, load balancers, DNS caches, firewalls, daemons, etc. So in the end you will need to describe this somewhere and why not also describe the dependencies of your apps at the same time.
> If using IIFE for the mere purpose of accessing syntax makes more sense to you than making `await` syntax available, then I really don't know what to tell you.
If using IIFE is so heavy that a new backend platform needs to be built I don't know what to tell you. In the apps I see, there is exactly one top level IIFE that is needed in the whole application.
> This is exactly why people invent new backends, new libraries, and new languages.
New libraries yes, new languages no. The util.promisify() already makes 90% of the cases work painlessly and some promise wrappers for existing core libraries already exist on top of that. Since core is moving to promises slowly anyways I fail to see how this advantage will carry on being one in the future.
> My only response to your point about Promises is that perhaps one shouldn't be using JavaScript if Promises are that much of a bottleneck.
Yup, that's absolutely true. I would say that there is always an advantage in having leeway in a programming language between the convenient option and the fast option so that when something becomes a bottleneck you have easier options than porting it to another language. But of course this might not be the most common case.
- searchableguy 4 years ago
- ravenstine 4 years ago
- dmux 4 years agoFirst class in all but its REPL.
- hctaw 4 years ago
- kibleopard 4 years agoThe issue with Deno, personally, is that it feels like it doesn’t deviate enough from NodeJS to even make it worth taking the time to learn/migrate projects over to it. From what I recall, the only really new and nice features are: a) sandboxed by default b) no need for a node_modules folder since you can directly import from a URL
And is that really worth dumping loads of money into developing further? I just find it hard to believe people are going to bother with Deno any time soon - we’ve gone too far down the NodeJS road.
- cloverich 4 years agoThe standard library will be a killer feature. Even for people that know the existing ecosystem (as I do), as more libraries fall out of fashion or become abandoned, and people have to pick up (several) new libraries from scratch for basic tasks, they'll realize (as I did) its not actually any different than just using Deno. I don't know if that will be enough, but that's one of the angle's I'm watching closely now. I'm partly biased because I like playing with streams, and those can be a nightmare in Node.
- cdaringe 4 years agoHard pass. There are globs of features and design changes that make it worth the switch immediately if your use context can allow for it. I've now done a handful of apps and libraries in it, and given the option, I'd never look back to node. I don't say that lately. Node's was the best. These new designs are more than marginally overcoming the shortcomings of node. The motivation for migration is strong, and if best proven through experimenting. If you are TS saavy, do yourself a favor and try it out.
- fendy3002 4 years ago> I just find it hard to believe people are going to bother with Deno any time soon - we’ve gone too far down the NodeJS road.
It depends on migration effort. Take typescript for example, it's very similar with JS that migrate the codebase is not that painful. If the standard library and package manager can prove to highly useful, we'll see two possible scenario that aren't mutually exclusive:
1. People migrating to Deno
2. Newer nodejs version follow what Deno has
In the end it's good for us
- leodriesch 4 years agoI think the biggest missing piece right now are the big libraries: Webpack, Babel, Next.js, ESLint (maybe this will no be needed with `deno lint`), NestJS. Stuff like that. I'd think it's hard right now to spin up a project that you would've usually used these frameworks for without writing a lot of infrastructure code yourself.
- adkadskhj 4 years agoI feel like sandboxing could be huge, but WASM might be cutting the legs out from that feature.
Sandboxing doesn't sound so unique or innovative when WASM is coming along and doing the same thing, and with a much wider audience and thus more likely to have massive traction.
- afiori 4 years agoThey compete on different use cases, most js/ts apps cannot be (reasonably) compiled to wasm and also wasm sandbox doesn't limit what the environment can do.
As a glaring strawman if you expose eval to wasm it will not help you.
Deno's sandbox will allow you to crate a dedicated worker with no network/disk access to handle sensitive informations, or to force your application to use a specific worker as a proxy (by making it the only thing with network acess)
- afiori 4 years ago
- clarle 4 years agoI think sandboxed by default can make a lot of sense for the large companies that can potentially suffer heavy losses if an unauthorized attacker got into the file system.
The other feature is TypeScript as a first class citizen which is pretty great for devs.
- cloverich 4 years ago
- not_knuth 4 years agoIf I understood correctly this is how they intend to make money:
> Not every use-case of server-side JavaScript needs to access the file system; our infrastructure makes it possible to compile out unnecessary bindings. This allows us to create custom runtimes for different applications: Electron-style GUIs, Cloudflare Worker-style Serverless Functions, embedded scripting for databases, etc.
So it's basically more of a Redhat approach to making money from open source? They intend to build tailored services on top of Deno for companies that request them?
- sbarre 4 years agoI'm not sure that they meant those specific runtimes would be premium products.
My read was that anyone could more easily configure a runtime to expose (or not expose) the underlying bindings that it requires, vs. just having them all in there by default.
I think "us" in that statement is the Deno community, not Deno the company.
But maybe I'm wrong.
- not_knuth 4 years agoClicking around the website and reading more comments leads me to believe that this is the product they intend to monetize with:
I still find it strange that there is no mention of it in the post...
- sbarre 4 years agoThat makes sense...
So if you're up for it, you can still roll your own deployment infrastructure and tailor your builds as needed etc.. and support all of that internally.
Or you can pay Deno to handle it for you and you can focus on building your apps.
- sbarre 4 years ago
- not_knuth 4 years ago
- 4 years ago
- qbasic_forever 4 years agoThat's a description of a command line flag or feature of the runtime, not a business model.
- denkquer 4 years agoI recall Ryan regreting nodes full-permission approach. Not every script should be able to access the fs for securities sake.
- Griffinsauce 4 years agoDeno's permissions are per-process though, it's a big jump for sure, but also still leaves the door wide open for abuse by dependencies of any serious project.
- e12e 4 years agoIt does allow for some coarse grained improvements for certain services, though.
You might write an smtp daemon that only delivers email on to another service via LMTP - thus without ability to write to (or read from, depending on configuration) the file system, for example.
Yes, you can accomplish this via containers, too - but it's nice to get as much out of process isolation as possible, not to mention it is likelier easier to test and debug the closer to the surface of the runtime limitations are implemented.
- tannhaeuser 4 years agoHow is that different from Node.js which also runs in a single process? Or does Deno create per-request processes (or v8 "isolates" etc) like CGI does?
- e12e 4 years ago
- Griffinsauce 4 years ago
- why_Mr_Anderson 4 years agoJavascript embedded scripting for databases .../shivers
- sbarre 4 years agoWhy?
I think the point being made here is that it will be easier to create purpose-built runtimes that only provide needed bindings, making them more secure and possibly also more performant?
JS/TS as languages are here to stay, so let's give them the best possible ecosystem.
- qbasic_forever 4 years agoStuff like CouchDB have been around for a decade now, it's fine. All of NPM still runs on it...
- sbarre 4 years ago
- sbarre 4 years ago
- munro 4 years agoI know this sounds crazy on the surface level, but I really wish I could do data engineering and machine learning with TypeScript instead of Python. TypeScript's type system is so good, it makes refactoring large projects so easy. Python's typing module leaves a lot to be desired, and on top of that PyCharm doesn't properly support everything. Perhaps I should switch to VSCode--but I do like IntelliJ, and it works really well for TypeScript.
- breck 4 years agoThere are a number of newer projects in this area. Arquero from Heer's Group (https://observablehq.com/collection/@uwdata/arquero), TensorFlowJs (https://github.com/tensorflow/tfjs), and (biased) CoreTable from OurWorldInData (https://github.com/owid/owid-grapher/tree/next/coreTable).
- searchableguy 4 years agoDeno has built in support for web gpu. You might wanna check that out. It's very early stage.
- 4 years ago
- breck 4 years ago
- madjam002 4 years agoI have never used Deno, but I just wanted to say that I really love the branding and graphics on the website, especially https://deno.com/deploy
- oauea 4 years agoI've always been very skeptical of the value-add of Deno over Node, and this only increased my skepticism. Good luck making money, I guess.
- gorjusborg 4 years agoI've only dipped my toes in the water with Deno, but it solves a few pain points I've felt with Node. Direct deps via url vs npm as middleman, a standard library (thank goodness!), and single binary distribution. Types are great too, but these other things would be enough for me.
- hobofan 4 years ago> a standard library (thank goodness!)
Then what are all these modules, if not a standard library? https://nodejs.org/api
- aenario 4 years agolibuv bindings ?
- aenario 4 years ago
- yulaow 4 years agoHonestly a standard library was needed since a decade but... I would have preferred a coordinated effort between browsers and node/deno. At this point even if just the browsers and deno get two different stdlib we risk _a_lot_ of useless fragmentation and headaches.
- wperron 4 years ago_If_ the browsers do get a std lib akin to what we've built for deno, I would be comfortable archiving the deno_std repo and pointing people to use the browser one. We're not yet 100% compatible with browsers in the stdlib, but being compatible as much as possible is one of our goals, specifically to address the browser/server-side divide and generally make it simpler and more enjoyable to program in JavaScript
- wperron 4 years ago
- FunnyLookinHat 4 years agoThe built-in Typescript support is amazing, but the selling feature for me was the ability to generate static binaries. Shipping is much easier when your built process can produce a single output!
- tannhaeuser 4 years agoYou've been able to do that with Nexe for Node.js apps since basically forever.
- speedgoose 4 years agoA NodeJS Docker container is a few lines. I agree Deno's single binary is a nice feature but it's not very interesting for everyone.
- tannhaeuser 4 years ago
- tannhaeuser 4 years ago> a standard library (thank goodness!)
What's a "standard" for you? Whatever definition, I think it implies there are > 1 implementations of it.
Node.js is based on CommonJS APIs, an initiative lead and implemented by earlier server-side JavaScript (SSJS) runtimes at the time such as v8cgi/TeaJs, Helma, etc. until Node.js dominated SSJS around 2011. Remember, SSJS is as old as the hills, starting 1996/7 with Netscape's LifeWire, and arguably has seen even longer use than Java as a mainstream server-side language.
Also not a "standard" in the above sense is TypeScript.
As to "standard library", the core packages on npmjs plus package.json are the standard library of Node.js on top of core Node.js APIs, and were developed in that spirit.
- gorjusborg 4 years agoUsing the word 'standard' was probably a mistake in my parent comment, I just parroted the terminology from the docs.
Really what I mean by 'standard' in this context is a batteries-included experience for most day-to-day programming problems.
I can appreciate the minimalist view where every project selects a core set of libraries for the given challenge. On the other hand, a core set of libraries that are good enough for most things just reduces decision fatigue, and makes it easier to just code.
- gorjusborg 4 years ago
- hobofan 4 years ago
- gorjusborg 4 years ago
- syrusakbary 4 years agoExcited to see a commercial company centered around the TypeScript ecosystem (both server and client) and betting on WebAssembly. Any successful Open Source must provide commercial value to become sustainable. Funnily enough that assures its longevity long term.
Keep up the great work Ryan, Bert & team. Exciting times!
- alfl 4 years agoI met Bert in the StrongLoop days after the IBM acquisition. Good guy and good luck to him.
We were consultants scaling node to production for a major international bank, circa 2016.
Love the security improvements in deno, will have to give it a look.
- turadg 4 years agoDeno seems well poised to replace Nodejs for isomorphic Web programming.
The leading app framework for that is Nextjs and I hope the Rauch Capital investment sígnals Vercel will be supporting Deno.
Anyone know?
- Woung1938 4 years agoIt seems there are many toothing problems with Deno. I just tried stuff from their blog (https://deno.com/blog/v1.8):
(A dependency got removed?)$ deno run --unstable --allow-write=output.png https://raw.githubusercontent.com/crowlKats/webgpu-examples/f3b979f57fd471b11a28c5b0c91d0447221ba77b/hello-triangle/mod.ts Download https://crux.land/2arQ9t Download https://crux.land/api/get/2arQ9t error: Import 'https://crux.land/api/get/2arQ9t' failed: 404 Not Found at https://raw.githubusercontent.com/crowlKats/webgpu-examples/f3b979f57fd471b11a28c5b0c91d0447221ba77b/deps.ts:4:0
Another one:
(The site is a 404 returning status code 200... just... why?)$ deno run https://deno.land/v1.8/permission_api.ts error: An unsupported media type was attempted to be imported as a module. Specifier: https://deno.land/v1.8/permission_api.ts MediaType: Unknown
- wperron 4 years agoThanks for reporting, we recently moved our blog to deno.com/blog and haven't updated the post -- we'll fix that as soon as possible
- wperron 4 years ago
- kostarelo 4 years agoFrom the last paragraph:
> But JavaScript and TypeScript scripts calling into WebAssembly code will be increasingly common.
Why is WebAssembly a key concept here? How does Deno uses it?
- lucacasonato 4 years agoWe use it for the hash module in our standard library for example: https://deno.land/std@0.91.0/hash. The wasm version is magnitudes faster than a pure JS implementation. Another example is sqlite, running in WASM: https://deno.land/x/sqlite@v2.4.0. Fully sandboxed sqlite :-)
- int_19h 4 years agoIt will be the ultimate irony if, 20 years down the line, Deno is still around, but solely as a de facto standard / cross-platform WebAssembly execution engine.
- e12e 4 years agoWhy would that be ironic?
It's essentially the route Java is taking with graal/truffle - allowing heterogeneous mix of languages to be compiled and optimized.
Why not allow typescript to use Fortran numeric libraries via wasm?
- e12e 4 years ago
- int_19h 4 years ago
- tsujp 4 years agoYou can write in other languages beyond JavaScript or TypeScript and generate WebAssembly. This means that say someone wrote a nice library or utility in C# you can compile that C# down to WebAssembly and use that library or utility in JavaScript or TypeScript (or anything else that can access WebAssembly).
This is analogous perhaps to C# and F# within .NET currently. C# and F# have the same BCL (base common layer) so you can use C# code in F# and vice versa. WebAssembly is like that and much more.
- int_19h 4 years agoWebAssembly would be analogous to CLI (Common Language Infrastructure) in .NET land, which includes CIL (Common Intermediate Language - bytecode) and CLR (Common Language Runtime - VM).
.NET BCL is the Base Class Library. Outside of a few classes in it that are fundamental to the runtime (e.g. Object, String, Array), it's not actually required for cross-language interop on .NET platforms. E.g. if you have two different C compilers both outputting CIL, they can interop just fine without any objects in the picture. WebAssembly interop is really more like that, and doesn't have the high-level object model layer that .NET also has (and which is used in practice).
- int_19h 4 years ago
- lucacasonato 4 years ago
- jedahan 4 years agoTrying to signup for Deno Deploy, it asks for the 'Act on your behalf' github permission to make an account.
Clicking on 'Learn more about Deno Deploy' leads to https://github.com/apps/deno-deploy , which does not tell me more.
What does 'act on your behalf' mean for Deno Deploy?
- jacobwg 4 years agoI believe it's a very poorly written description in the newer GitHub App permission system. My understanding it describes something akin to "can act on your behalf, but only in the scope of what other permissions are being requested" but it's overall very unclear wording.
- jedahan 4 years agoDeno's response here seems to confirm that https://github.com/denoland/deploy_examples/issues/15
- jedahan 4 years ago
- jacobwg 4 years ago
- huhtenberg 4 years agoWoah. Clicking on this link crashes Firefox. Version 86 on Windows. I don't remember seeing FF crash in several years now.
Anyone else is running into this?
- pqb 4 years ago> [...] Firefox. Version 86
Few days ago, there was new version released (87). In certain situations, when silent upgrade had been made during using the browser it displays an "Oops, something went wrong" notification with a button to refresh. If you will close and reopen the Firefox the problem will vanish. It is less kind of crash but more likely as problem to free/monkeypatch resources.
I have run into the same problem on Linux but I have quite complicated Firefox configuration with at least few extra profiles (about:profiles).
- jetrink 4 years agoNo problems with 87.0 on Windows for me.
- pqb 4 years ago
- mellosouls 4 years agoI understand that the authors have very strong pedigree in their field, but given a lot of the motivation stems from regretted node design decisions, is the rust etc expertise on the project deep enough to not make equivalent mistakes that will be rued in another few years?
Genuine question (I assume it is, but presumably it was before with c++) - it just strikes me that once something becomes as successful as node, and given that nothing is ever perfect it might be useful to clarify why the technical insight might be better this time around - at least regarding the idioms of the underlying tech; the added experience at the architectural and implementation side a given.
- VWWHFSfQ 4 years ago> Of the myriad ways to program computers, scripting languages are the most effortless and practical variety. Of these, the web browser scripting language (JavaScript) is the fastest, most popular, and the only one with an industrial standardization process.
I haven't fully investigated in a few years, but isn't it still true that LuaJIT is is faster than V8 JavaScript? The last I saw it was outperforming V8 by a lot. The practical use of LuaJIT is still very niche though. The lack of a comprehensive standard library, and being forever stuck on Lua 5.1 makes it even less generally appealing. I still love it for programming Nginx though..
- gutino 4 years agoProbably the benchamark you saw was just a iteration of any math calc. In real programs V8 js is orders of magnitude faster than LuaJit
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- spion 4 years agoAFAIK it hasn't been faster for a while, especially not in the GC area.
- gutino 4 years ago
- 4 years ago
- spark3k 4 years agoI feel like the mass adoption tipping point of Deno will be when Create React App moves over to it or has a Deno specific branch.
- feb 4 years ago>>> Our investors are Dan Scholnick from Four Rivers Ventures, Guillermo from Rauch Capital, Lee Jacobs from Long Journey Ventures, the Mozilla Corporation, Shasta Ventures, and our long-time collaborator Ben Noordhuis.
Why is the Mozilla Corporation an investor in a Chrome based technology startup ?
- afiori 4 years agoDeno poses itself partially as node with web standards, Mozilla likes when things are webby
- kizer 4 years agoWell, Deno is using Rust extensively and V8 is the only "Chrome" part.
- hu3 4 years agoDidn't Mozilla fire a substantial amount of their Rust developers?
And all Servo developers according to: https://paulrouget.com/bye_mozilla.html
- steveklabnik 4 years agoNo, they laid off a substantial amount of their Rust team, but the number of overall developers employed by Mozilla was quite small.
Mozilla continues to be interested in Rust even though they did that, they’re a founding sponsor of the Rust Foundation, for example, and are continuing to use Rust even though they do not employ people to work on the language itself.
- steveklabnik 4 years ago
- hu3 4 years ago
- afiori 4 years ago
- nilshauk 4 years agoFrom a distance I think Deno has a lot of promising features going for it. Expressing modules as URLs seems like a small difference but I believe it has big ramifications. With clever use of DNS resolving and caching I wonder how fast new instances will be able to spin up. I'm guessing it'll be fast!
My only gripe with the Deno company is that taking investor funding is a double-edged sword. Yes, they'll get to hire very skilled developers. However naturally the investors want a tidy exit, and I wonder if that would be to be bought out by Amazon, Microsoft or Google.
Edit: Just realized that there's a key difference in that Deno does not have something like NPM to be bought and sold because dependencies are URLs and thus decentralized. Also, Deno itself is open-source.
- paperwork 4 years agoI'm excited about Deno, but I'm finding that the docs still need to be improved. For example, I'm trying to build a tcp server. I'm not able to get information on how back-pressure is handled.
I can see that Deno.listen returns an object which implements reader and writer interfaces, but it isn't clear to my how to look for events, such as disconnect or that new data is available.
I wish there were examples showing how to correctly parse frames or implement protocols.
I'm sure these things will be expanded over time, partly by programmers in the community, but from the outside, things are still a bit rough.
- TheMagicHorsey 4 years agoThis is probably unpopular here, but I wish people would just stop using Javascript on the server.
Well, I wish they would stop using it period, but at least in the browser it makes some sense.
Edit: to be clear, I have no beef with Typescript, Dart, Clojurescript, and the many other languages that compile into JS. It's JS itself I have issue with. I feel like it gives too much flexibility to young programmers to screw things up. There don't seem to be enough safeguards or training wheels. On large projects its my nightmare.
- speedgoose 4 years agoIf you have to use JavaScript, you can configure eslint with some plug-ins to have pretty good safeguards or training wheels. You will still miss some strong typing but eslint will warn or prevent most of the awful or stupid code.
- e12e 4 years ago> be clear, I have no beef with Typescript
One of Deno's main selling points is that it runs typescript out of the box?
- speedgoose 4 years ago
- xixixao 4 years ago> The Deno company hopes to enable the millions of web programmers out there to maximally leverage their craft in other domains.
I know this might be hard to see, but Rust is actually in the same domain. It is also, among other things, enabling product/frontend/web engineers to build backend/native/browser-less applications.
I'd bet Rust will be more successful here, especially given its amazing ability to change itself and innovate.
- shusson 4 years ago> It is also, among other things, enabling product/frontend/web engineers to build backend/native/browser-less applications.
Care to explain? I can imagine web programmers being productive in deno in a few minutes vs however long it takes to learn an entire new language, not to mention a language that requires memory management.
- xixixao 4 years agoSee the Rust Foundation announcement: https://foundation.rust-lang.org/posts/2021-02-08-hello-worl...
> "A language empowering everyone, but especially folks who thought that systems programming wasn’t for them.”
- xixixao 4 years ago
- shusson 4 years ago
- latexr 4 years ago> Many developers, we think, prefer web-first abstraction layers.
Many developers, I think, don’t look past web-first abstraction layers.
I can’t tell you how many times I’ve seen CLI tools which are huge chunks of node wrapping a thin bash command. They are multiple files, orders of magnitude larger than they need to be, and require external dependencies because these developers are fixated on their proverbial hammer.
- 4 years ago
- 4 years ago
- bullen 4 years agoIf you want hot-deployed distributed Java VM HTTP app. server + JSON database you can use my open-source alternative: http://host.binarytask.com
It uses comet-stream instead of WebSockets.
But it's fully "joint" parallel on all cores.
- loopback_device 4 years ago> To provide a modern, productive programming system that adheres to browser APIs.
In my opinion, the best part of node is (or was) that it didn't adhere to the browser APIs. That brought in some fresh air, and gave us buffers, native bindings, streams etc.
- searchableguy 4 years agoWeb does have streams and buffers. Web assembly seems to fill in the gaps for native code but deno supports rust plugins which removes any sandbox guarantees so it's a trade off.
- searchableguy 4 years ago
- rglover 4 years agoThis is cool and exciting to see. I've mostly watched Deno from the sidelines, only playing with code a little bit, but it's clear Ryan and co. are serious about applying the lessons learned from Node. Best wishes to him and the team.
- justicezyx 4 years agoThis is a great news!
Ryan and the team should be capturing some of the value produced by their creation. And because of Deno's a developer tool, it's actually capturing the far minor part of the whole value and enable a much bigger value creation!
- Freknf 4 years ago>But over a decade later, we find server-side JavaScript hopelessly fragmented, deeply tied to bad infrastructure, and irrevocably ruled by committees without the incentive to innovate.
Trying to sell something based on FUD is always a bad sign.
- ChrisArchitect 4 years agoArticle left me wondering what the plan is for them here - why is it becoming 'The Company Deno'... other than they have a bunch of investors. Is it just to get a team in to properly manage the project as a whole?
- _qua_di_q_ 4 years agoIt's the absolutely right move to get investors. Deno has substantial advantages over NodeJS.
However, I personally would prefer Go or .NET Core for my backend any day. We need to wait and see where it's going ...
Good luck and success anyway!
- PudgePacket 4 years agoThis is super cool to see! Deno is really refreshing coming from node fulltime.
- colesantiago 4 years agocongrats, i guess but not a fan of the VC route, we all know how this ends.
- zomglings 4 years agoThey figured out a way to fund work that they care deeply about.
With respect, and without impugning your right to make this criticism, I find your criticism shallow.
I don't know what your particular circumstances are, but I see your view expounded a lot by developers who are getting their salaries from companies that can afford to pay them because they took VC money in the first place.
We are certainly not entitled to Deno for free (although the MIT license is in their best interests for now). I am glad they found a way to sustain its development for the near future.
- krainboltgreene 4 years ago> They figured out a way to fund work that they care deeply about.
No, they figured out a way to delete that problem.
VC money isn't a gift. It's a loan.
- zomglings 4 years agoIt is most definitely not a loan. It is time/runway, purchased with equity and eventual loss of control.
Edit: There is more to it, of course. It is also entry into a somewhat exclusive network of future investors + customers if you choose your VCs wisely.
- zomglings 4 years ago
- krainboltgreene 4 years ago
- spark3k 4 years agoWhich route on an independent MIT licensed project would you suggest?
- rukshn 4 years agoIt is matter of time until they release a proprietary version which is better than the MIT version.
Chrome vs chromium etc
- lucacasonato 4 years agoThe blog post specifically says that that will not happen
- lucacasonato 4 years ago
- colesantiago 4 years agosell some of the deno artworks [0] as an NFT?
- rukshn 4 years ago
- zomglings 4 years ago
- camdenlock 4 years agoPrediction: Microsoft will be buying Deno. Screencap this.
- hu3 4 years agoIt's cheaper and gentler to the ecosystem to just add Typescript support to node and call it a day.
- hu3 4 years ago
- appleflaxen 4 years agoDeno is licensed as MIT. Awesome! But how will they prevent from being freeloaded?
My sense is that GPL3 gets a ton of criticism on HN, but isn't it the perfect defense against freeloaders?
* license the code for proprietary use in your stack * use GPL3 if you have a non-commercial use, and are willing to accept the requirement to open source your own code.
I don't understand why this option isn't used more by open source projects that want to be able to fund themselves.
Can anyone explain? (Even better if there are examples / case studies)
- jen20 4 years ago> I don't understand why this option isn't used more by open source projects that want to be able to fund themselves.
One possible reason is that such dual licensing requires copyright assignment from external contributors.
- breck 4 years agoThe best IMO is to go public domain. SQLite is a great example: (https://sqlite.org/copyright.html).
- hu3 4 years agoSQLite's case is super interesting.
It is said that they can get away with having it as Public Domain because a key part of their business is SQLite's reliability which is asserted by their large and closed source test codebase.
- breck 4 years ago> which is asserted by their large and closed source test codebase.
Oh I didn't know (or forgot about) this! Super interesting. I love that strategy.
That's competition at its best. Don't assert any control over someone else, but do keep a few secrets to yourself so people know to come to you for the best stuff.
- breck 4 years ago
- hu3 4 years ago
- jen20 4 years ago
- kizer 4 years agoI hope that Deno can maximize TS performance. Right now they compile TS internally, but especially with this new financially-backed focus I hope that they can perhaps modify V8 or fork it to create a TS engine that takes advantage of type information for optimization. That's really what's needed; in a "no implicit any" application performance would near native.
Also, it's nice that they're using Tokio for the HTTP server instead of a JS implementation (from what I understand). I want to see Deno near the top of the TechEmpower benchmarks.
- semitones 4 years ago"We are bullish about the technology stack we've built" - I would sure hope so!
- csbartus 4 years agoI'm very pleased Javascript / Node evolves. But thanks, too late, I'll skip it as soon as possible. It has so many unpleasant surprises. I'll move the ladder up, to something which compiles to Javascript, or whatever else, but no Javascript anymore please.
- turdnagel 4 years agoYou can write TypeScript natively with Deno.
- turdnagel 4 years ago
- 4 years ago
- 4 years ago
- skratlo 4 years ago> Of these, the web browser scripting language (JavaScript) is the fastest, most popular, and the only one with an industrial standardization process
Haha, this made me laugh hard, stopped reading
- celeritascelery 4 years ago> Many are more familiar with the Chrome DevTools console than they are with a Unix command-line prompt. More familiar with WebSockets than BSD sockets, MDN than man pages. Bash and Zsh scripts calling into native code will never go away. But JavaScript and TypeScript scripts calling into WebAssembly code will be increasingly common. Many developers, we think, prefer web-first abstraction layers.
Every time I read something like this I realize how much in the minority I am. I am not a web developer. I have never written JavaScript before in my life. I hate working with “web-first abstractions”. I feel like it is just massive bloat on top of true native application. But given the popularity of things like electron, react-native, Node, and Deno I don’t speak for the majority.
And the thing is, I don’t know if I just learned web dev if I would love this new approach to software that is eating the world and I would “get it”. Or if it just exists because JavaScript developers don’t want to learn something new.
- bilalq 4 years agoThis is a common misconception. Javascript, and the web as a whole, have one of the lowest barriers to entry. You don't need to learn how to use a shell, install a programming language, or anything. You can literally open the developer tools in a browser you already have installed and try playing around with programming. When it comes time to ship, your users already have the runtime ready to go. This low barrier to entry means that many people who are new to software development end up choosing it. Some of these go on to become serious software developers, some learn enough to make a small career in a niche without picking up the skills of a generalist developer, and some keep it as a hobby. There are quite a few people that fall in those last two camps, but there's nothing inherently wrong with that.
I'm a fairly seasoned developer with experience shipping things written in Java, Scala, Ruby, Python, Perl, and JavaScript/TypeScript to large and high traffic systems and services. The tooling and developer experience of working with TypeScript is still the most pleasant I've interacted with. On the UI side, it isn't even close.
- IAmNotAFix 4 years agoThe web is eating the world because it's the easiest way to ship an application. It has nothing to do with whether developers like to do it or not.
- dgellow 4 years agoAnd because web app publishers have full control. If I have a web application, I can update it right now and it will be updated for ALL my users at the same time. No store policies bullshit, no need to somehow notify users that a new version has to be downloaded and installed, no fragmentation of your user base because half of your customers stay at an old version due to whatever reasons out of your reach.
- threatofrain 4 years agoBut you don’t get full control, and that’s why people go native. Because platforms rightly distrust web apps. This will likely be true for a long time as security becomes a bigger deal everyday.
- threatofrain 4 years ago
- burlesona 4 years agoThe OP didn’t sound like it was referencing client / server applications, rather writing native applications using web abstractions.
- breck 4 years agoA Venn diagram of top coders in world and coders passionate about democratization of technology:
There is just enough overlap to bring any/all of the best ideas from the non-web world to web tech.Deno are in overlapy | | | /--- /--- -- | /- \--- /--- \-- | /- Best | | Coders \|- coders \ / passionate /-|\-- in | | about - \- world \ \ democratization - | | of -\ - \ technology -/ -\ -/ |---\ -/ -\ -/ ---- -\ -/ --
- dgellow 4 years ago
- oblio 4 years ago> Or if it just exists because JavaScript developers don’t want to learn something new.
It's probably a big reason. But if you think about it from the other angle... you don't want to learn Javascript, which would be new to you :-)
- int_19h 4 years agoSpeaking for myself, I have already learned JavaScript - I just don't want to have to use it.
- bluejekyll 4 years agoWith WebAssembly, now you don’t have to. You do need a JS shim to load the WebAssembly, but after that, pick your favorite source language that can target wasm.
- hinkley 4 years agoWhat I learned about myself working as a NodeJS developer:
I’m okay writing JavaScript as long as I don’t have to spend all day every day writing it.
- bluejekyll 4 years ago
- celeritascelery 4 years agoTouché. I will admit I am resistant to learning JS. Part of this is that it seems like no one actually "likes" to program in it, they just have to because it is so ubiquitous. But I guess that just goes back to the Bjarne Stroustrup quote: "There are two kinds of programming languages: The ones people complain about and the ones nobody uses."
- richeyryan 4 years agoI like to program in JS. I've written non trivial amounts of code in Java, PHP, Clojure and OCaml. I've written approaching trivial amounts of code in Go and Rust.
JS has warts, undoubtedly so. But I try to approach it like I would Clojure and it makes the experience much better for me. I think JS has the bones of a Lisp if you're willing to look for them. Sure it doesn't have macros or decent conditional expressions or immutability but using something like Ramda gets you some of the way there. And there are proposals for pattern matching and immutable data structures though they are fairly far off.
I think JS is at its worst when people try to code it as poor version of Java or C#. I have a bit of a love hate relationship with Typescript for this reason. Some aspects of its type system are great like being able to make a union out of anything, I wish OCaml had that. But I think denying Javascript's inherent dynamic nature is a mistake.
Overall I've learned to ignore its worst parts and just focus on what made it good from the start, being a weird cousin of Scheme that runs in the browser.
- arcturus17 4 years ago> Part of this is that it seems like no one actually "likes" to program in it
JavaScript consistently ranks as one of the most loved languages in Stack Overflow surveys...
I find plenty of counter-examples of this point on HN too - engineers who have worked across many different stacks and rank JS/TS as one of the best dev experiences they've had (there is one such comment in this comment tree)
Anecdotally, I feel as if pre-ES6 a lot of the complaints you read online were from users of the language. Nowadays, it's as if most of the complaints are from people who don't use it.
I think there is something to be said about refusing to learn anything but JS, as knowing different languages can be a boon for an engineer, but I believe it's an excellent tool to have in one's belt nowadays.
- ronyeh 4 years agoI love it, but I use Typescript, which has a few niceties (e.g., stronger typing) beyond modern JS.
- cdash 4 years agoFor me, Typescript changed everything. I don't enjoy programming in plain old JS but I love Typescript.
- richeyryan 4 years ago
- FpUser 4 years agoI learned JS when it first showed up. Still write backend servers in C++ and JS libraries to interact with those servers from a browser.
- int_19h 4 years ago
- de6u99er 4 years agoI replaced recently an unreadable bash-script through a small maintainable JS program. It's doing the same thing as the bash script and accepting the same parameters but does not require a black belt in regexp and going through hundreds linux/unix command man pages to understand what it does.
I think you'd be surprised how many modern applications are written in JavaScript or Python.
One of the more prominent ones is VSCode.
- arcturus17 4 years agoThere's that famous Knuth exchange with another programmer where Knuth develops a super-complex data structure and algorithm to solve a problem, and the other programmer responds "that's cool, but I can do that in a single command line by piping three Unix commands".
There is a case to be made for programmers being at least familiar with Unix utilities and shell scripting so that they can unlock the superpowers described in that anecdote.
However, I largely agree with your sentiment - I pretty much do all of my scripting in JavaScript and Python and would not be particularly happy to have to deal with a large bash script.
- arcturus17 4 years ago
- ksec 4 years agoIt is time to post this again. The Birth & Death of JavaScript ( 2014 )
https://www.destroyallsoftware.com/talks/the-birth-and-death...
- bin_bash 4 years agoElectron and React Native aren't popular because they're in JS. They're popular because you can write the application once and use it cross-platform. Mac/Windows or Android/iOS.
- scotty79 4 years agoElectron is popular because when your application is in JavaScript writing and improving plugins for it is a breeze.
That was what propelled Atom and VSCode.
What you said is valid of course when you look at Slack and such, but you ommited most important cross-platform target.
Your app can run on Windows/Linux/Mac .. and the Web.
- fabiospampinato 4 years agoIf you consider the web as a platform then you'll see immediately how writing an app in JS rather than in C++ can be advantageous.
- scotty79 4 years ago
- 40four 4 years agoMaybe I got a little too worked up in my other comment. Maybe you didn’t mean the tone that I took your comment as.
But in a serious answer to your last sentence ” And the thing is, I don’t know if I just learned web dev if I would love this new approach to software that is eating the world and I would “get it”. Or if it just exists because JavaScript developers don’t want to learn something new.”
My opinion is the answer is a resounding “No, you will not just get it”.
This is a complicated question of course, but to distill my thoughts down
1) You do not need to view web development as a threat to your skill set. You didn’t say specifically what stack you work in, but I have to believe that you will be able to continue making a living in it.
2) Tools like Deno are specifically designed for and intended for web developers to be able to easily leverage their skill set in other areas like systems.
So if your not a web developer, and you don’t have a particular interest in learning web languages/ APIs, then don’t worry about it. Just because it’s trendy right now doesn’t make it a better approach technically speaking. It’s quite possibly worse than the approaches you know.
So what I’m saying is this tool isn’t meant for you. And that’s ok. Just because it makes HN front page and web development is huge right now, doesn’t diminish the tech you know to be good.
Last sentence of the blog post: ”The Deno company hopes to enable the millions of web programmers out there to maximally leverage their craft in other domains.”
- auganov 4 years agoA lot of modern software has to ship a browser version and this simple fact can be all it takes to inform downstream choices.
Let's go with WebSockets as an example. You decide you need them in the browser. This will likely mean some other component will have to support them too. By now you need a pretty good reason to reimplement it over something else. If you need a handshake you may exploit the fact that WebSockets open with a standard HTTP request. Your handshake over another socket may look pretty different. DDoS services, proxies etc may support WebSockets but not arbitrary TCP or they may support it differently. A WebSocket "message" doesn't exist in plain TCP, will you make your TCP protocol work the same or will you handle frames differently?
Point is - your choice may be between just WebSockets or WebSockets AND something else.
- spark3k 4 years agoTypescript / Javascript have significant reason to exist in their own right.
- juancampa 4 years agoThere's a big difference between "interpreted" and "JIT compiled". Both of these end up JIT compiled in most cases
- juancampa 4 years ago
- marcosdumay 4 years ago> Or if it just exists because JavaScript developers don’t want to learn something new.
Looks to me like they don't want to write stuff twice, and they would have had to write for the web anyway.
The web stack is not good by any measure. The native GUI toolkits are suffering form abandonment, so the web-based toolkits are among the best available (but not at the top). But if you don't have any reason to expect to create web code, your life will be better if you ignore the stack.
- vinay_ys 4 years ago> The native GUI toolkits are suffering form abandonment
SwiftUI is new.
Flutter is new.
Both have taken birth recently and have huge investments and usage.
- vinay_ys 4 years ago
- burlesona 4 years agoThey answered this at the end of the article: “The Deno company hopes to enable the millions of web programmers out there to maximally leverage their craft in other domains.”
It takes time to learn an ecosystem, and when people know one ecosystem and not another, most people would rather do high skill, high value work in the ecosystem they know than start over as a noob in a new one.
The only thing unique about the web / JavaScript land is its ubiquity and size due to its place as the language of the browser. So anyone who can make an abstraction that lets JavaScript developers do stuff outside the browser without learning much new has a virtually guaranteed large audience of developers who are likely to think “I would love to be able to build X, I just don’t have time to learn a new ecosystem.” Those folks are then thrilled to dive in and use the new abstraction. And there are a lot of those people. And that’s why we are all stuck using Electron apps for so much stuff. :)
But that doesn’t have to be a bad thing. Electron can evolve to be less of a resource hog, and better alternatives are being tested all the time. The same is true for other non-browser applications of JavaScript.
I don’t know if this vision is reality, but I think that it may be that we’re in the early days of a transition toward the browser stack being the new “GUI.” Which is to say, back in the 80s there was a lot of debate around GUIs and whether they were a good idea etc., and while most people liked them to some degree, they also lamented the idea of losing the command line. But in the end, GUIs didn’t shrink the number of CLI tools in the world, rather they increased the size of the domain that computers are used for my making it more accessible to more people. I think that so far the web vs native debate seems to be following a similar trajectory.
- scaladev 4 years ago> It just exists because JavaScript developers don’t want to learn something new.
Are you sure? I started building a desktop application recently. As much as I abhor Electron and refuse to touch anything built on top of it, there basically wasn't any other choice due to the absolutely massive amounts of libraries written for the web. I threw a couple of them in and it saved me at least 90% of work compared to what I would have to do if I'd chosen Qt (or anything else native). Would I rather spend a week and have something to show to my client, or roll up my sleeves and re-implement everything myself (which would take about half a year before I'd have anything working at all)?
(For the record, I didn't downvote you. I consider it a shitty practice to downvote somebody for their opinion, without even replying.)
- BackBlast 4 years agoPWA installs are another way to get onto a system. It's less resource intensive as you leverage the browser already installed on the system.
It doesn't work if you need extensive access to local hardware. But if you're mainly on the network anyway to operate, it's very frictionless and relatively lean.
With my last app, the network asset bundle is about 2MB, uses only ~11 MB on disk on my Mac and ~25MB RAM when running.
- burlesona 4 years agoYeah, and I meant that with a wink then wrote at lengthy justification for that thinking, lol. Oh well, I rephrased to take out the jest.
I don’t disagree with you about why people use Electron. There’s a positive feedback loop around ecosystem sizes. The bigger the platform the more devs use it the more tools they make the more libraries are made the more it’s the easiest way to do X the more applications are written for it the bigger the platform gets.
Anything you can offer to a large group of developers that lets them extend their existing high skill level to new domains where they would otherwise be novices is very likely to be adopted.
- BackBlast 4 years ago
- scaladev 4 years ago
- 40four 4 years agoRespectfully, your comment is way off topic, and nothing to do with discussing The Deno Company, and what it means for the Deno ecosystem. Not to mention, this is a very worn out, tired complaint that's been talked about ad nauseam. Reading angry swipes at web developers is not very interesting.
Ok, you're not a web developer. So you stick to what pays the bills, why would you learn Node or Typescript? Same for web developers, why would they learn C++ or haskell? Some will take interest and cross over, some won't.
Who cares? Pretend like Deno doesn't exist and the world will continue to turn.
- ivan888 4 years agoI think you took the wrong tone from the parent comment; it sounds like this person was genuinely interested in sparking a real conversation about how people feel about the environment that they spend time in, and whether that could have dramatically shifted based on what they decided to or had to learn
- otde 4 years agoI feel like if this person was interested in “sparking a conversation,” they wouldn’t open said conversation with “I hate how bloated web abstractions are, but I guess they’re popular for some reason,” with the exact same digs at electron that have been rehashed in every HN comment section.
I agree, to be clear — I use many of said abstractions, and they’re often quite bloated and everything else this person is complaining about. This just doesn’t strike me as someone who’s asking for insight; it’s just complaining, and it’s fine to point that out.
- 40four 4 years agoOthers said they didn't get the same tone as I did, so maybe I'm off there. I'm willing to reconsider.
I'll just give my opinion on the final sentence which I guess is the conversation we should be on.
"And the thing is, I don’t know if I just learned web dev if I would love this new approach to software that is eating the world and I would “get it”. Or if it just exists because JavaScript developers don’t want to learn something new."
I think the answer to this is a resounding "No, if you're not a web developer you will not 'just get it'".
I don't think one approach or the other is 'better', but it just depends on what your background is and how you got into programming, and that's fine.
These tools are meant for web developers. We are talking about the next iteration of NodeJS here. It's the whole point is that it merges web programming with systems programming. So if you're not a web developer, there really is no good reason to jump over unless you are just curious.
From the blog post: "The Deno company hopes to enable the millions of web programmers out there to maximally leverage their craft in other domains."
- otde 4 years ago
- rpdillon 4 years ago> Respectfully, your comment is way off topic, and nothing to do with discussing The Deno Company,
My take from reading the blog post was that the Deno Company's entire thesis is that the developer community will increasingly be moving away from these older abstractions and towards web-based abstractions, and Deno is positioning itself to fuel that migration. GP's comment addresses this directly; it seems rather on-topic to my reading.
- 40four 4 years agoFair enough. But I don't see it as the community will be moving away from older approaches. The old ways will always be there. I see it as this is a on-ramp for web developers to get into systems programming.
The reality is there is a huge wave of new developers in the last decade who entered into programming through web. I guess the OP sees this a 'threat' to his way of doing things somehow, but I don't think it's a threat at all. Normal to feel that way though.
These tools are meant for web developers, and if you are not one that's okay. There is probably no good reason to make the jump unless you are just curious or bored.
Last sentence of the blog post: "The Deno company hopes to enable the millions of web programmers out there to maximally leverage their craft in other domains."
- 40four 4 years ago
- 55555 4 years agoWhen I read the parent comment I didn't infer any of the spite you seem to have felt. It's an interesting question, rephrased: "Is this the best way forward? Or is it only better because people don't need to learn a new language? What are the advantages and disadvantages? Will my current approach to development go out of fashion?"
- 40four 4 years agoFair enough, maybe I misinterpreted. But things like "Or if it just exists because JavaScript developers don’t want to learn something new", are very divisive. As if there is something different about Javascript developers that make them lazy, and C programmers are infinitely curious and learn everything new they can.
Edit:
I don't believe one way or the other 'better' technically speaking. Usually the 'best' way forward is the one you have the most skill in. So yes, the one you don't need to learn a new language. Tools like Deno are designed for web developers. Just because they are popular and you hear about them a lot doesn't mean someone else's way of doing things it threatened.
- 40four 4 years ago
- ivan888 4 years ago
- numpad0 4 years agoThe New Way prints money much more reliably. It gets more people involved in the process. It forces deeper coordination across communities in and out of tech, strengthening connections.
The old way gets _your_ job done _effortlessly_. idk, I guess that’s not ideal in the meat world.
- bilalq 4 years ago
- rvz 4 years ago> In order to vigorously pursue these ideas, we have raised 4.9 million dollars of seed capital. Our investors are Dan Scholnick from Four Rivers Ventures, Guillermo from Rauch Capital, Lee Jacobs from Long Journey Ventures, the Mozilla Corporation, Shasta Ventures, and our long-time collaborator Ben Noordhuis. This investment means we will have a staff of full-time expert engineers working to improving Deno. We will ensure that issues are addressed, bugs are fixed, timely releases are made; we will ensure Deno is a platform others can build on with trust.
From there I stopped reading.
- ignoramous 4 years ago> From there I stopped reading.
Why? Is it https://news.ycombinator.com/item?id=6845286 ?
Because the next paragraph goes:
Rest assured that Deno will remain MIT licensed. For Deno to grow and be maximally useful, it must remain permissively free. We don’t believe the “open core” business model is right for a programming platform like Deno. We do not want to find ourselves in the unfortunate position where we have to decide if certain features are for paid customers only. If you watch our conference talks, you will find we've been hinting at commercial applications of this infrastructure for years. We are bullish about the technology stack we've built and intend to pursue those commercial applications ourselves. Our business will build on the open source project, not attempt to monetize it directly.
- KingOfCoders 4 years ago"it must remain permissively free."
... until the VCs change their mind or AWS uses our code to make more money than we do.
- rvz 4 years ago> ... until the VCs change their mind or AWS uses our code to make more money than we do.
That is the correct answer.
Amazon (AWS) can lift Deno and use it as a service on AWS for devs and effortlessly compete, out scale and out do them 100 times over and supersede the Deno Company. Thanks to using the '...permissively free' MIT license (Being AGPL will also make no difference) AWS can do just that.
Just like how they did that to MongoDB, Redis and Elasticsearch who were all victims of Amazon's ruthless tactics on open-source.
- nindalf 4 years agoI just don't understand this. This project uses distributed version control. This implies 2 things
1. It is impossible to delete every copy of this project. If the authors wanted to restrict access by taking the repo private, they can't. It will always be out there.
2. Every commit is licensed with MIT. So even if there is a licensing change, you have access to every commit licensed by MIT. You've lost nothing except rights to future work.
Even if they change their mind, you can still use their existing code to run your software. If it's popular enough to be forked by the community, you can use the fork if you prefer.
You only need to be concerned if you're heavily invested on their platform and it's not popular enough for community support and you need new features added. In this unlikely scenario, yes, you won't have any option but to buy in to their new business model.
- rvz 4 years ago
- KingOfCoders 4 years ago
- ignoramous 4 years ago
- gnrlst 4 years agoI'm incredibly slow, and only just realized that Deno is an anagram of Node.
- psim1 4 years ago> Of these, the web browser scripting language (JavaScript) is the fastest, most popular, and the only one with an industrial standardization process.
Most popular, I can agree. Fastest, & only one with industrial standardization process? Have they met Erlang?
edit: you have to be kidding me, downvoted to oblivion for an honest observation. Sorry I hurt javascript's feelings.
- iends 4 years agoErlang is compiled to bytecode, right? So is it considered a scripting language?
- eatonphil 4 years agoI don't understand the connection being made between having a bytecode compiler and being a scripting language.
- glutamate 4 years agoJava is definitely not a scripting language
- glutamate 4 years ago
- psim1 4 years agoIt "feels" like a scripting language and is run in a runtime shell environment. But I would concede to your point, as well.
- eatonphil 4 years ago
- iends 4 years ago
- Freknf 4 years agoSounds like total bullshit. Deno hasn't put any dint in nodejs and never will because nobody is rewriting all of their stuff for the new API. It is just that all the scummy founders and rockstars of silicon valley have found that offering higher level services is a great way to scam people of their money because it is the only way the new "average" programmer can even make anything. The only problem is long-term the people using these services will need to find actual programmers.