298 points · by kiyanwang · 4y ago · 324 comments
> Out-of-the-box .env, .toml, and CSS support (no extra loaders required).
This makes a lot of sense. Node.js should be "sherlocking" (integrating into the core) the most popular/common features devs use. It's crazy to me that, after 10+ years of `.env` being a common abstraction to manage environment variables, you still need to install a separated library because Node.js doesn't know to read the file itself. Same with yaml or toml.
Same with features like fetch(), which took 5 years from the Issue to be implemented in Node.js (and not for lack of collaborators, but for lack of wanting to merge it).
I'm happy though that Node.js is finally approving web features, and that the move to ESM has been finished, but they are moving so slow that I can def see a focused small team (might be too much for one person) overtaking Node.js.
I know this shouldn't ever happen, but you can well imagine plenty of legacy/badly configured setups where it would. More pertinently, where it would no matter how loudly you warn about it in release notes etc.
When you're as mature and used a platform as node, you just can't risk things like this, unfortunately, no matter how more convenient it would be for the vast majority of users.
The solution is not to "warn loudly" here; specify a Node.js version in your package.json, and your code will continue working on that version. Upgrade the Node.js engine version, and then it's on the person upgrading making sure that nothing breaks. That's how virtually all platforms work (except the web itself, but that's not "versioned" so it's fair).
It's a bit more troublesome when changing core packages and considering dependencies, but the same could apply there.
Not sure what things you are referencing here in terms of Apple's breaking API changes but if it's the sort of breaking change where previous code just doesn't compile or run on the new version it's a different matter in my view - as in, it's something far easier to catch in dev or testing and not only affect prod.
Currently I don't see big gaps between web and node anymore, but I still find the APIs a bit messy and to e.g. do work with files I have to import all of the three `node:fs`, `node:fs/promises`, `node:path`. It'd be nice if at least `node:fs/promises` ALSO included non-promises from `node:fs`, like "createReadStream()" to avoid having to import another core module for that. Also WebCrypto should define the variable `crypto` as a global, like `fetch()` and `URL` do, for compat with the browser.
Just some ideas/examples from the top of my head, no much search/research was put into this so def take with a pinch of salt.
.env would be nice but I personally do not miss .yaml/.toml at all so there's likely some subjectivity in these feature-requests and keeping it in user-space has a value too (simple, rock-solid core)
being able to run typescript code (without type checks) is in my opinion the biggest improvement in deno, I don't care about their own formatting or linting and I especially don't care about their LSP and opinionated way of file urls (requiring .ts suffix everywhere). Also, webgpu is nice but it shouldn't be in the core, etc.
BTW: Speaking of complexity, Deno takes 140M of memory, bun and node are both around 10M.
I think bun has huge potential to replace node, especially because it's not written in C++ nor in rust, both of these languages are extremely hard to master and that limits contributions (and FUN) to some extent. Safety is important but it seems to harm productivity a lot.
I.e. Bun is improving "bun install" time for projects with large node_modules, and that's great, but what about, after it's on disk, having to parse+eval all of it from scratch every time I run a test?
As admitted, this is a very naive ask due to the interpreted/monkey-patching nature of the JS language, but I'll hand wave with "something something v8 isolate snapshots" + "if accomplishing this requires restrictions on what packages do during module load, deno is rebooting npm anyway..." and hope someone smarter than me can figure it out. :-)
So, admittedly I was using "node_modules" as a shorthand for "the code that makes up my dependencies", and that AFAIU Deno has not implemented this "use a v8 snapshot to cache preloaded/pre-evald dependencies" optimization.
I.e. I want something like:
For example if I define an environment variable and some script deep inside the modules folder reads that variable and does something with it. You'd need to make sure the environment is identical before everything is loaded. There are other things as well like a script defining a global (perhaps for polyfill) and it needs to load before some other script.
The Nix package manager is probably a good place to look at how this should be done. However it's all based on strict constraints and other functional principles that I don't think npm packages are anywhere near of satisfying.
As mentioned in the article Bun still has a lot of incompatibilities with Node. For example, as far as I could tell scripts designed to be run with npx don't work right now. And I'm not sure what to make of binary lock files. Sure, it's more efficient but how do you know a `bun add` didn't change something it absolutely shouldn't have changed?
Deno has really fast TypeScript compilation and file watching built in which is awesome. I always loathed using tsc together with nodemon or some custom file watcher thing. And permissions are great. But the package index is more or less the most valuable asset of Node and Deno doesn't provide (and doesn't aim to provide) compatibility with most of it. Also, while I do like the idea of using URLs for dependency management, the way Deno does it with import maps and lock files feels extremely convoluted and too easy to mess up for me. NPM is more intuitive.
which packages did you have issues with/need that didn't work? my understanding was with node compat flag deno supported quite a bit...
Additionally, I'm currently using at least one function in "fs/promises" that doesn't seem to be supported yet ("opendir") and the "vm" module to evaluate some (trusted) JS.
Most of those issues can be worked around, I just decided to go with Node instead for the time being.
[1] https://github.com/uNetworking/uWebSockets/discussions/1466#...
it's been a long time since i've used node's built-in http module since I've found uwebsockets.js.
We have some thin wrapper for uWebSockets.js that lets us do the following:
- parse request json
- parse request multipart data
- serve response json
- serve response buffers
- serve response streams
- serve response static files
- support async handler
- support multiple async handlers (middlewares)
links are here
- https://github.com/joshxyzhimself/modules/blob/main/uwu.mjs
- https://github.com/joshxyzhimself/modules/blob/main/uwu.d.ts
- https://github.com/joshxyzhimself/modules/blob/main/uwu.test...
internally we just serve http, then it goes through caddy or haproxy depending on the project's needs such as tls, caching, etc.
there are other similar projects too that tries to deliver express-like api:
- https://github.com/kartikk221/hyper-express
- https://github.com/nanoexpress/nanoexpress (defunct)
I actually use Deno right now because I only use a handful of third-party dependencies in my project, and I can use Deno’s bundler instead of webpack (even though that’s not its intended use). I’d rather simplify away the stuff that’s slow and complicated rather than making it faster and more complicated (less correct, less compatible).
If so, wouldn't it be very hard to beat V8's performance, given that there has been so much engineering effort for many years towards making it fast?
Or are we taking into account the speed of the package managers and bundlers as well?
Disclaimer: I haven't saw the benchmarks, if any.
The other stuff he benches is built into the runtime ... HTTP requests, copying files, and a webserver Bun ships with. Presumably the Bun team wrote these tools with performance in mind, but the article doesn't compare features. I'm skeptical the webserver in particular is at feature parity with the ones he benched against, which makes the numbers look pretty watery to me.
It does not address the runtimes of JavaScriptCore (Webkit/Bun) vs V8 (node/deno) which, as you pointed out, are probably very similar.
Someone wrote a barebones V8 wrapper called Just Js, which is based on V8 just like Node, but it crushed Node in the Techempower benchmarks [1].
[1] https://www.techempower.com/benchmarks/#section=data-r21&tes...
Bun is powered by JavascriptCore which is webkit. Webkit is developed by Apple. Safari typically outperforms Chrome on benchmarks.
I’d be super interested in seeing just how much faster Just-JS would get using JSCore (like Bun uses).
I don't think Jared's benchmarks were benchmarking Bun and Node so much as V8 and JSC.
I don't think benchmarking Bun against justjs is going to change much.
There is clearly a big difference between different wrappers and how to handle different things. For example some of them delegate most of HTTP handling to a native lib while IIRC node does a lot of that in its js stdlib.
Package manager perf: Bun (presumably) wrote a C++ or zig package manager that's integrated, and speaks NPM. I guess you could aruge that this benches their fast one against the npms V8 runtime, but.. that's a bit of a stretch for me.
Copying large files: I'd be surprised if any of the benched distributions rely on the javascript runtimes to copy files on disk.
HTTP Requests: Maybe distributions actually call into JSC/V8 for these .. I have no idea. I'd guess not, but this one sounds the most plausible case for "benching V8 against JSC".
(edit): https://github.com/oven-sh/bun#why-is-it-binary (though this does not answer the last question, and only partially the second)
That said, I'm not super convinced that performance would necessitate this; if parsing the text file was really that slow, I think you could instead have a separate binary file created whenever the lockfile is changed that has a serialized representation of the lockfile along with a checksum to ensure that it's not out-of-sync, then hash the lockfile before using the binary representation. I guess it's possible that if the tooling is brittle or people try to edit their lockfile by hand, this might end up detecting an out-of-sync lockfile more often than not, but at that point I think the issue isn't really with the lockfile format.
Discord is a blackhole for information that search engines cannot index, it is not a replacement for documentation.
I hate Discord with such a bloody passion, and this is one of the biggest reasons. People think "just ask on discord" is appropriate as a means of documentation, it absolutely is not.
An aside, but as a non-native speaker and haven't heard of Bun before, an all-capitalized title is very confusing. "Who is Will Bun"?
People choose the "fastest" language or framework, then add a bunch of lazy ORM queries without really knowing how to properly leverage a performant database, stitch together a bunch of "microservices", adding multiple HTTP trips across the wire, and by that time the performance of the core language is a rounding error.
Also, having a slower runtime only marginally push people to code more efficiently (e.g. people wanting to use an ORM will do so either way)
Of course,if you're doing microservices correctly, it should be easy to separate the parts where performance is important and write them in a language optimized for that.
An "?" at the end would have helped a lot though.
* Documentation is limited, but Bun’s Discord is very active and a great source of knowledge.
I'm not interested in becoming part of a community, I want to use the tool. Without official docs, I'll pass until the project has matured.
* Bun is not 100% compatible with Node yet. Not every npm package works. Express, for instance, is not yet functional.
I don't expect full bug-for-bug Node compatibility but if extremely popular packages such as Express don't work, I'm not sure if any of my projects will even run with this runtime.
Hopefully, this project will turn into a proper Node replacement because the Javascript ecosystem can use a big performance boost. It'll be a while before it'll become part of any pipeline I have a say in, though.
1. Lots of people like realtime chat. It's worth having something that fills that niche (the old "mailing list + IRC" combo used to work well)
2. Forum software is usually fairly awful. I don't want to install some 15 year old pile of PHP with bad UX.
3. A "Stack Overflow" style site requires a lot of moderation and either annoys users for being too messy or annoys users for being too strict
4. I actually still have some fondness for Google Groups but Google's brand is too tainted for most people.
5. Nobody under 30 seems to use email any more so mailing lists are out but something that syncs with email is a must (reply notifications etc)
I am also hoping for something free but very easy to install. (SaaS with a free tier, one-click docker or similar). And easy on resources ideally (I guess $10/month for hosting is about our limit at the moment)
Yeah. I'm asking for a lot.
I'm not convinced it's better than irc+proper mailing lists - but given that real users are stuck in awful mail clients (like web/Gmail or outlook) - mailing lists isn't a great option any more.
Main thing I miss from zulip is a proper weechat plug-in (like wee-slack) - although the official cli client isn't terrible - it's just not irc-like.
Isn't Discourse an answer to that?
I am not seeing a lot of projects adopting it and I wonder why because it seems quite good to me
Discourse and Flarum are even worse, in my experience.
However, having chat services does not substitute for having documentation; you should also have good documentation, too; you should not expect someone to only ask questions.
Really? There's no way to do verbatim searches and it's "very" generous in deciding what it thinks you meant to search for. It's almost useless for searching technical posts (or anything when you need to disambiguate similar words)
But on the other hand, when I look at Bun I think it has heaps more going for it than Deno. The fundamental value prop of offering better performance (both runtime and developer experience) is huge, and something that would get me to want to use it. Contrarily, while I see a number of improvements in Deno, the vast majority of them seem to be "niceties" that solve some initial "setup" issues that can be painful in Node - but since I already have taken care of a lot of those Node issues in my own projects, there is not a ton that I see compelling in Deno.
Point being, if I were a betting man, I'd easily put all my chips on Bun vs. Deno. It's a "plan where the puck is headed" vs. a "plan where the puck is now" approach, and from that perspective I see a lot more value in Bun.
I felt this way too before using Deno for a while. So far I enjoy:
- Breaking from npm/node modules support on purpose turns out to be a real plus for me. It's refreshing to have dependencies referenced by URL, and it's good to have them cached centrally by default (in $HOME/Library/Caches/deno on macOS and $XDG_CACHE_HOME/deno or $HOME/.cache/deno on Linux, for example).
- Use of web platform APIs (https://deno.land/manual/runtime/web_platform_apis ) and the work to standardise those across platforms (https://wintercg.org/ ) is encouraging.
- `deno lint` and `deno fmt` make adopting and using JS/TS feel more like Rust/Go/other languages with good built-in ceremony-free tooling.
- Fresh is turning into a very nice Next.js/Astro alternative (https://fresh.deno.dev/ ) that I found very easy to learn and deploy, with great performance and developer experience out of the box.
Bun is interesting, but I wish it didn't embrace node modules: perpetuating its use instead of attempting to move the community on by recognising it for the mistake it was feels sad to me. (See Ryan Dahl's “Design Mistakes in Node” PDF or talk for more: https://tinyclouds.org/jsconf2018.pdf and https://www.youtube.com/watch?v=M3BM9TB-8yA )
This is one of engineering things that happens year over year. We all understand the value of good docs. Yet it keeps happening. Why?
Users don't search for documentation for the sake of finding documentation. They search for documentation because they want to know how or if our product can solve a particular problem they have. My hypothesis is that the documentation discoverability problem is really just a symptom of the product discoverability problem, and that centralizing docs in 1 searchable website to make docs "discoverable" is only addressing the symptom, when that effort can be much better spent addressing the root cause by making the product itself more discoverable and deeply integrating useful documentation into it.
a searchable docs website is the most important thing for me. having to "discover" an api by stepping through code and comments is a waste of time--only useful when you already know the basics, which requires documentation
* Easily get an overview of the entire API. I may just be scouting the library, so I want to understand what the API looks like.
* Examples as a starting point. How do I use your API?
* Makes your product more discoverable / approachable to potential users.
Think of your users like a funnel - how are they using the library? What are the common reasons you’re losing potential users? What are the common reasons you’re losing existing users? Users are also different so you have to analyze by cohort.
Now can something better be done? Maybe It takes a lot of work and would have to address the above issues and I don’t know if it would necessarily change the need for something centralized.
A perfect example of this is documentation generated from docblock comments. Some projects only have such docs, and expect users to go from there. It's as if programmers envision their audience as another machine to program.
I feel similarly about business/marketing aspects of software projects. Many programmers seem to assume, "If you write it (the program), they will come."
Successful software is so much more than just the code, it usually involves a communal effort of various skills, especially human communication, including writing good documentation.
So for the early stages of a project it makes sense to keep the overhead low and work with a small group of focussed early adopters.
As projects grow, mature and become more stable, more investment into learning material becomes important. Doing it too early burns valuable resources.
As I add new features I update the docs to reflect the changes, trying to keep those documentation updates in the same commit as the tests and implementation.
Since I started doing this the quality of documentation I produce has gone up a ton, because I'm constantly exercising those muscles.
It's been a huge win for my coding quality and productivity too - I don't have to remember as much stuff because I can refer back to the docs, and documenting as I go along causes me to make much better design decisions.
Worth noting: I'm a native English speaker writing documentation in English, and I've been blogging frequently and writing online for over twenty years so I've accumulated a LOT of writing experience. So what's easy for me may not be easy for other people!
I'd argue if should replace as. The point being docs are all but essential for growth (and added participation). To neglect them is self-defeating.
Put another way: Docs are an investment. They have a known return.
Again, we've seen this. We know this. Yet again and again there's case after case of docs denial.
In 2017 I stopped working on the project entirely: I'd coded up a new major version of the library but never released it because knowing I had to overhaul and re-document so many different pages, demos, etc ... like a dementor, it sucked all joy from me.
Then in 2019 I recoded the entire project from scratch. This time I thought about the documentation first, before I wrote a line of code. I decided the best approach was to generate the main documentation from inline comments. I did this for both core code, and for demo examples - the demos stopped being standalone afterthoughts and became instead my end-to-end testing suite. To present the documentation to any developers who might show an interest in the library, I coded up the library's website in a way so that the core documentation[1] and the demos[2], with easily accessible code, could be very easily copied over to the website whenever I rebuilt the library (which regenerates all the documentation). I also added a set of lessons to the website, and a set of "How do I" articles - both of which are an ongoing project.
The library's website doesn't have any functionality where users can ask questions - but that's what the GitHub issues and discussions pages[3] are for.
The system isn't anywhere near perfect (I still need to automate the demo testing, for example, and there's no CI for copying stuff from the repo over to the website, etc) - but, given the depressing messes I've managed to fall into in the past ... it's working really well for me!
[1] - https://scrawl-v8.rikweb.org.uk/documentation/
Many people won’t read them at all, no matter the quality, and so it can feel like work wasted.
Plus writing docs is a different skill set than writing code that many simply don’t like to do.
Engineers have to decide where to spend their time, and taking time away from feature development when your early-stage product doesn't have many features is not a winning move.
not necessarily. with the latter, you know the constraints of a solution and can make an accurate judgment on whether it's worth using
It takes a lot discipline to do things right.
Docs !== community
Docs === Odds of gaining traction
To your point, achieving community is a whole other beast to battle.
And to your point, writing docs *is* something to consider when building the team. As is making sure the culture has a reward system if such behavior is important.
Because doing anything is is irrational?
Time is finite, only a rounding error number of projects (especially open-source ones) are going to be successful, with or without docs.
Only an irrational developer would think that they are going to hit the 1-in-a-thousand jackpot with their project.
Any time spent producing documentation is time not spent on adding features and fixing bugs.
Spending time on documentation over and above the bare necessity needed to get out a working product "just in case we win the jackpot" is simply irrational.
This is probably why you don't find many projects spending significant startup time on good, clear and comprehensive docs (as opposed to a README and an FAQ and nothing more): the ones that do as you suggest mostly die before even getting users.
TLDR; don't treat your startup project as if you already have 5m users who depend on you. The odds are that you are never going to get to that point without a good product, and the better the product, the fewer the docs needed.
if you spend your time making sure your product works but don’t write thorough documentation, it can become a breakout hit even though some hacker news commenters may complain about a lack of good documentation
if you spend your time writing great documentation, the product will suffer and nobody will use it
This is an unfortunate perspective. And I could say the opposite is true. If you don’t spend time writing great documentation, your product will suffer and nobody will use it.
Documentation gets neglected because developers don’t feel like doing it. If you are building a product for developers, documentation is critical.
[Not a fan of Bun] In Bun, you can pin versions with package.json just like in node.js
What would address the malware injection when someone chooses to auto-update packages as part of a build?
What sort of knowledge are we talking about?
This says nothing of what a terrible choice it is for a knowledge base, especially long term. The only way you choose Discord is if you aren’t thinking beyond the “next release”. That’s a huge red flag in a fundamental framework project like this.
That's not unexpected given that it has voice and video chat functionality.
if you aren’t thinking beyond the “next release”.
I think that lack of long-term thinking is endemic to the JS community in general, unfortunately.
Their new “Fresh” framework is a nice touch too along with the Deno deploy infrastructure and good documentation.
I’ve used it for a few projects now, no issues.
:-1: I loath to use discords search interface to look for information. I'm sure the Bun team doesn't see this as an end goal, but I wish forums were still a thing. At least they're mostly indexed.
— Matt Lee https://www.linuxjournal.com/content/opinion-github-vs-gitla...
Instead we opted for Sourcehut and irc and have been pretty happy with the results.
https://gitlab.com/gitlab-org/gitlab/-/issues/22578
https://gitlab.com/gitlab-org/gitlab/-/issues/556
I think Codeberg is a better option:
Anyways, GitLab vs. GitHub is a myopic lens for the quote I posted. All proprietary software choices have consequences, and it this case we're focusing on the parent's issues with Discord vs. open alternatives.
This support by discord or community only on discord trend needs to stop. It's just creating toxicity and those with malice/narcissism personality dominates.
Rarely do fast response times create a sane knowledge based community, it only agitates and lots of noise is created as a result.
JS started to get a bit sane, but I guess we are going back to fragmenting and madness pretty soon.
Try not to give into FUD. The JS universe is fine.
Was listening to this chat [0] recently. Jarred Sumner is doing really cool things with this! Excited to see where it goes.
As a drop in replacement for Node it has a long way to go. A promising start, but I'll check back in a year
It's far too early to be asking this question. Deno has been around for longer, and it hasn't decrowned Node yet.
As both a dev and as a package publisher, those are either not an advantage, or a straight disadvantage. npm, for all the downsides it has (and it does have them), IMHO has been a huge net positive for the JS/web community. Explicit permissions on the land of 100-dependencies is just a non-starter. Web compat is def the biggest advantage as a dev myself, but Node.js has finally woken up and catching up. I don't use TS so won't comment.
IMHO the main advantage of Deno, like IO.js back then actually, has been to make Node.js stop being sluggish and actually accept PRs/new challenging features.
Don't believe me? Just wait and see how this turns out in three years.
There's quite a lot of developers at stodgy Fortune 500 non-tech companies that are sort of forced to use Windows for development. Either explicitly, or though poor enterprise support (vpn connectivity, local admin restrictions, difficult path to purchase a Mac, etc).
It's one reason things like Gitbash, WSL, Docker Desktop, etc, are very popular.
"Quite a lot"? There are more developers at Fortune 500 than FAANG for sure.
In that sort of company it’d take 2 years to get approval to install it anyway. If you submit the paperwork now there’ll probably be a windows port by the time it’s approved.
https://medium.com/codex/jetbrains-django-developer-survey-r...
It's naive to assume that Windows isn't prolific. There's probably no good way to quantify numbers, but it's a major player still and likely always will be. WSL certainly helped keep that a reality.
I don't see how rimraf is related in any way. If you want to remove folders by calling a shell command (with full knowledge of all potential security and portability risks), your code is going to be platform dependent - it's not Node's responsibility to reimplement bash and/or GNU coreutils to make it magically work. Therefore, you need a Node re-implementation of the same functionality, either in the standard library or as a package.
And besides, rimraf has been unnecessary for a couple of years now, as Node's standard library includes a direct replacement: https://nodejs.org/docs/latest/api/fs.html#fsrmsyncpath-opti....
I kind of have to as of late, because due to corporate security policy I get around a minute of internet access from WSL and then the antivirus steps in and blocks it.
https://github.com/sakai135/wsl-vpnkit/commit/94a85aaf4db365...
It's possible to create command line tools that work across Windows and UNIX-oids, and I appreciate this, but it's a lot of additional work (even 'cross-platform' solutions like Python don't fully wrap this stuff, even though they do their best).
* What IDEs/editors I have access to
* What image editing tools I have access to
* How easy it is to get my server’s backend running on my local machineas a dev environment
The last one is most relevant to this conversation. If I’m working on a bun-based project, not being able to run a local dev copy on Windows easily is a nontrivial obstacle.
One of the reason WSL exists is to solve this problem.
(assuming bun doesn't work on native windows but works under wsl)
Safari often has bugs and rendering issue which aren't present on Chromium or Firefox and need fallback.
Things like "www-authenticate: Negotiate" in an SSO environment, people pasting rich text into web forms, handling environments with private certificate authorities, and so on.
I have bad luck with Macs, getting dev tools properly installed seems as hard as on Windows and everything falls apart a few times a year. The OS also seems to break itself and crawl to a halt sometimes (>1 minute to open settings). Linux distros were stable only if I can stayed on the happy path (single monitor, integrated graphics, don't try to sleep/hibernate) with close to default config. Windows can seemingly tolerate a lot more fiddling, at least since 7.
So basically, there will never be Windows support until JavascriptCore is able to be used on Windows and I'm not entirely sure on the state of that. My guess is that it has limited to no support for that scenario.
I wonder how much of Bun's immaturity is due to Zig's own immaturity.
There are so many projects which do well without a native Windows port. It may fade away in three years, but lack of Windows support will not be the primary reason for it.
ASP.NET + Windows, sure that makes total sense. Even C++ + Windows is solid and very performant. But node.js has always been a second class citizen with Windows support (it wasn't until Microsoft themselves put fulltime devs working on node that it supported Windows) and it's a huge bet to take with very little benefit and tons of potential failures.
Not having windows compatibility is not uncommon working on the web.
As an example, out of 100 developers of my company working on a web product, zero are using windows in my knowledge.
I still read often in HN that "most people use iPhones" and "almost no dev uses Windows".
Makes me question if my own beliefs have these enormous misconceptions too.
Even Microsoft themselves recognise it indirectly, that's the whole reason why they built WSL.
Yes but how many JS developers use Windows?
How many developers are really working on Windows? That's got to be a rounding-error of zero.
There are so many programming tools with basic or non-existent support for Windows and nobody notices.
I think most programmers are actually using Windows as their development environment.
https://insights.stackoverflow.com/survey/2020#technology-de...
If you use windows, you are VERY unlikely to use Linux and OSX. Conversely, almost EVERYONE who uses Linux or OSX will still have to use Windows. If even just half of the Linux users checked Windows, but rarely used it, then Windows would drop to 3rd place.
The overwhelming majority of servers are Linux (even Azure was announced to be majority Linux a few years ago). Despite this, only a fraction of "windows users" also used WSL. Trying to build UNIX software on Windows is fraught with difficulty. The fact that this number is so low either indicates a sampling bias for Stackoverflow or a lot of people checking the Windows box despite not using it a lot.
Also, looking at some strictly web development surveys, Windows is behind Mac/Linux: https://medium.com/codex/jetbrains-django-developer-survey-r...
I'm also a front-end dev using Windows since decades, and I had like 0 problem using this OS.
If we move to .NET5 or higher I might use linux at work too.
This is still a new project — anyone interested in using a new, cutting-edge beta JavaScript runtime is certainly capable of using bun through WSL.
Your comment is unnecessarily antagonistic. It comes across as if you’re personally offended that bun wasn’t launched with native windows support.
Also, this made me laugh:
> …this project will never takeoff until it treats windows as a first-class citizen.
I think you seriously over estimate the number of developers still on windows.
I don't remember any specific "wtf" details, but generally it was kind of a non-starter. I got node installed, but then there were issues with using that runtime for my simple server demo. The whole attempt was frustrating. Tried installing the pseudo Linux shell thing for the command prompt and I gave up trying to use that pretty quickly.
Obviously I'm not a native Windows developer. This was just me experimenting. I'm not sure how Win devs actually work these days on non-Win applications in any productive capacity.
I can easily get stuff done on MacOS and Linux but Windows is just this multi-decade old black box of cruft.
WSL. It's trivial to drop into Linux for development these days.
That said, I generally haven't had issues with Node on native Windows.
I know quite a few people who do, I actually wouldn't be surprised if their number was higher than pure Windows users for web dev.
https://medium.com/codex/jetbrains-django-developer-survey-r...
- Bun lacks Denos best feature which is the permission system / sandboxed by default operation
- Deno lacks Bun's best feature which is backwards compatibility with NPM
But the key attraction of deno for me is being able to delete node_modules, package.json, package-lock.json etc etc. I don't want to bring them back.
Don't know if that qualifies as having the "crown".
The response a month later: "No docs? Pfft. Useless."
I woudn't call it unfair. There's space for both.
On my machine (M1 pro), Bun calling into a C library and running a no-op is 15x faster than Python calling a no-op function. V8 has never had stable bindings but Bun is changing the game with a TinyCC JIT-compiled FFI that yields a simple API.
$ bun bench.js
3.5331715910204884 nanoseconds per iteration
$ python3 -m timeit -s 'def f(): pass' 'f()'
5000000 loops, best of 5: 53.8 nsec per loopShort answer: not any time soon.
Long answer: Maybe, in the long term. Node is really entrenched in orgs and 99.999% compatibility is probably a must have before they’d would consider switching. Also, don’t underestimate the strength and persistence of Google’s V8 team. Year over year incremental performance improvements may prove to be enough to ensure Node’s dominance for another 10 years.
Or don't. But don't make assertions then without looking into the facts.
"Bun uses the JavaScriptCore engine, which tends to start and perform a little faster than more traditional choices like V8. Bun is written in Zig, a low-level programming language with manual memory management."
I conflated these two.
However, I am a bit afraid of the rapid growth of the project. I could appreciate a slower growth in order to think twice about the direction of the project. It could be terrible to have new tools' specifics in a world already crowded by them.
There was a list of super ambitious goals, like replacing Node.js, NPM, Webpack, etc. It's been impressive to watch how the project is making such progress in achieving them.
So I think the rapid growth is a good sign that the project has communal support and momentum. I'm looking forward to seeing what Bun becomes, maybe more excited about it than Deno.