Very cool! I believe “which” does not work on powershell because it’s not Unix. been using on bash/zsh “where” to list all, and “command -v” in place of “which”.
Now, type does exist in both Command shell and PowerShell (as an alias to Get-Content), but it acts more like cat (which happens to be another alias for Get-Content).
Also, where (and ?) in PowerShell is an alias to Where-Object, which is used to select objects from a collection piped into it based on criteria.
PS> Get-Command type, Get-Content, where, Where-Object | Format-Table -AutoSize
CommandType Name Version Source
----------- ---- ------- ------
Alias type -> Get-Content
Cmdlet Get-Content 7.0.0.0 Microsoft.PowerShell.Management
Alias where -> Where-Object
Cmdlet Where-Object 7.4.1.500 Microsoft.PowerShell.Core
Not really sure why bun exists in the first place, tbh. It’s flattening all your tools into one tool, sure, but then you have edge cases where you need to dive into those individual tools to tune behavior anyways, and now you’re locked into yet another tool in your JS stack.
I’ve been using it and I think it’s great. Some things are better done in the shell (external commands, gluing together pipelines) and others are better done in JS (real data structures, using JS libraries). Often they overlap and I need to do both in one script, and Bun’s $ syntax makes it really convenient. I also find doing things concurrently in JS with Promise.all, etc. is much nicer than backgrounding jobs in shell.
I’m not one to follow web trends (I just stick with nextjs and npm) but I’ve been interested to try Bun and see what all the hype (and venture funding) is about
You’re likely set in your tools for Node.js but imagine if all those tools just came with Node.js in the first place. In my line of work just having the typescript transpiler built into the runtime is a huge win.
Honestly a compelling argument, but I had hopes for Deno and it seems to be a constant hobby project - a joke I hear is the only production Deno software is the Deno homepage.
There’s also jsr.io that popped up recently too. I may experiment a bit with Bun, assuming Next.js works fine with it!
What makes you say that? I’ve got a good handful of Deno projects in production and am a huge fan at the moment. The tooling, Deno std lib, and npm compatibility make the project pretty compelling for me.
Oh it’s just a general vibe, anecdata not fact, I’m not aware of any businesses using Deno in production but I’m sure there are! What sort of products have you built with Deno currently? I’m quite curious how it stacks up against the rest - particularly in hiring/longevity discussions etc. (which is why I typically tend to advise companies I work with to just stick with the most boring and widely used tools)
Ah gotcha! As far as businesses using Deno, Slack is using it for their new automation platform, Netlify and Supabase for their serverless/functions offering, etc. It has some big deployments out there for sure!
The main Deno application we have in production is a small service that collects analytics on internal tools’ usage and reports it up to Datadog. It’s nothing big or shiny, but it works wonderfully and the repository is one of the simplest in our collection.
And I think your advice is correct, just for the record ;)
Very cool! I believe “which” does not work on powershell because it’s not Unix. been using on bash/zsh “where” to list all, and “command -v” in place of “which”.
I was using the
typeshell builtin, but I don’t know if it’s in Powershell.In PowerShell there’s
Get-Command(and the aliasgcm), which is the analog of thetypebuiltin on bash/zsh, orwherewith the-Allflag.Now,
typedoes exist in both Command shell and PowerShell (as an alias toGet-Content), but it acts more likecat(which happens to be another alias forGet-Content). Also,where(and?) in PowerShell is an alias toWhere-Object, which is used to select objects from a collection piped into it based on criteria.POSIX, you mean? https://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html
Yes, thanks for the correction.
Because JavaScript is not a shell scripting language?
I’m not sure what is the advantage of having this bundled into the runtime instead of using a library (like Google’s
zx).Not really sure why
bunexists in the first place, tbh. It’s flattening all your tools into one tool, sure, but then you have edge cases where you need to dive into those individual tools to tune behavior anyways, and now you’re locked into yet another tool in your JS stack.Bun’s biggest selling point is performance for short lived tasks, not tool consolidation.
They are trying to support all existing tooling too, not replace them.
I’ve been using it and I think it’s great. Some things are better done in the shell (external commands, gluing together pipelines) and others are better done in JS (real data structures, using JS libraries). Often they overlap and I need to do both in one script, and Bun’s
$syntax makes it really convenient. I also find doing things concurrently in JS withPromise.all, etc. is much nicer than backgrounding jobs in shell.Of note, Windows support is now official.
Finally! I can try it on my computer!
I’m not one to follow web trends (I just stick with nextjs and npm) but I’ve been interested to try Bun and see what all the hype (and venture funding) is about
You’re likely set in your tools for Node.js but imagine if all those tools just came with Node.js in the first place. In my line of work just having the typescript transpiler built into the runtime is a huge win.
Honestly a compelling argument, but I had hopes for Deno and it seems to be a constant hobby project - a joke I hear is the only production Deno software is the Deno homepage.
There’s also jsr.io that popped up recently too. I may experiment a bit with Bun, assuming Next.js works fine with it!
What makes you say that? I’ve got a good handful of Deno projects in production and am a huge fan at the moment. The tooling, Deno std lib, and npm compatibility make the project pretty compelling for me.
Oh it’s just a general vibe, anecdata not fact, I’m not aware of any businesses using Deno in production but I’m sure there are! What sort of products have you built with Deno currently? I’m quite curious how it stacks up against the rest - particularly in hiring/longevity discussions etc. (which is why I typically tend to advise companies I work with to just stick with the most boring and widely used tools)
Ah gotcha! As far as businesses using Deno, Slack is using it for their new automation platform, Netlify and Supabase for their serverless/functions offering, etc. It has some big deployments out there for sure!
The main Deno application we have in production is a small service that collects analytics on internal tools’ usage and reports it up to Datadog. It’s nothing big or shiny, but it works wonderfully and the repository is one of the simplest in our collection.
And I think your advice is correct, just for the record ;)
The folks at val.town are also using it in production in the current iteration of their runtime.
Oh snap! I didn’t realize val.town was using Deno! I’ll need to take a second look!
Oh nice, that’s much better than I thought, I’m glad Deno is seeing some success in the enterprise world! Thanks 😁
Yeah, never again the bullshit of having to figure out node-ts/ts-node. It should just run.
I’m loving Bun, just sad that it doesn’t work with Nest.